📋 SOAL UAS PRAKTIKUM WEB PROGRAMMING

Login & CRUD REST API - Semester Ganjil 2025/2026
⏱️ Waktu: 120 Menit 📖 Sifat: Open Book 👤 Individu

🎯 PETUNJUK UMUM

Setiap mahasiswa mendapat Mini App yang UNIK berdasarkan NIM. Implementasikan REST API lengkap dengan:

📦 Yang Harus Dikumpulkan: Upload file ZIP berisi semua source code PHP, file database.sql, file README.md, dan file .htaccess
🔐 User Default untuk Testing:
Username: admin | Password: 123456

📊 BOBOT PENILAIAN

Komponen Bobot Keterangan
Struktur MVC 15% Folder dan file sesuai standar
CRUD REST API 35% Semua endpoint berfungsi
Autentikasi 20% Login + Token + Protected routes
Database 15% PDO, Prepared Statements, Relations
Dokumentasi 10% README dengan contoh request/response
Kerapian Kode 5% Indentasi, penamaan, komentar

🎮 DAFTAR MINI APP PER MAHASISWA

1

Sistem Manajemen Perpustakaan

NIM: 2141016

Bangun REST API untuk perpustakaan digital dengan fitur peminjaman buku.

Tabel Database

Tabel books
id INT PK AUTO Primary Key
isbn VARCHAR(20) UNIQUE Nomor ISBN
title VARCHAR(255) Judul Buku
author VARCHAR(100) Penulis
stock INT Jumlah Stok
Tabel borrowings
id INT PK AUTO Primary Key
user_id INT FK ID Peminjam
book_id INT FK ID Buku
borrow_date DATE Tanggal Pinjam
status ENUM borrowed/returned

Endpoint API

POST   /api/login
GET    /api/books              GET    /api/borrowings
GET    /api/books/{id}         GET    /api/borrowings/{id}
POST   /api/books              POST   /api/borrowings
PUT    /api/books/{id}         PUT    /api/borrowings/{id}
DELETE /api/books/{id}         DELETE /api/borrowings/{id}
2

Sistem Rental Kendaraan

NIM: 2341004

Bangun REST API untuk rental mobil/motor dengan fitur booking.

Tabel Database

Tabel vehicles
id INT PK AUTO Primary Key
plate_number VARCHAR(15) UNIQUE Plat Nomor
brand VARCHAR(50) Merek
type ENUM car/motorcycle
price_per_day DECIMAL(12,2) Harga Sewa/Hari
Tabel rentals
id INT PK AUTO Primary Key
user_id INT FK ID Penyewa
vehicle_id INT FK ID Kendaraan
start_date DATE Tanggal Mulai
total_price DECIMAL(12,2) Total Biaya

Endpoint API

POST   /api/login
GET    /api/vehicles           GET    /api/rentals
GET    /api/vehicles/{id}      GET    /api/rentals/{id}
POST   /api/vehicles           POST   /api/rentals
PUT    /api/vehicles/{id}      PUT    /api/rentals/{id}
DELETE /api/vehicles/{id}      DELETE /api/rentals/{id}
3

Sistem Klinik & Apotek

NIM: 2341013

Bangun REST API untuk manajemen obat dan resep dokter.

Tabel: medicines & prescriptions

POST   /api/login
GET    /api/medicines          GET    /api/prescriptions
GET    /api/medicines/{id}     GET    /api/prescriptions/{id}
POST   /api/medicines          POST   /api/prescriptions
PUT    /api/medicines/{id}     PUT    /api/prescriptions/{id}
DELETE /api/medicines/{id}     DELETE /api/prescriptions/{id}
4

Sistem Kursus Online

NIM: 2341022

Bangun REST API untuk platform kursus online dengan fitur enrollment.

Tabel: courses & enrollments

POST   /api/login
GET    /api/courses            GET    /api/enrollments
GET    /api/courses/{id}       GET    /api/enrollments/{id}
POST   /api/courses            POST   /api/enrollments
PUT    /api/courses/{id}       PUT    /api/enrollments/{id}
DELETE /api/courses/{id}       DELETE /api/enrollments/{id}
5

Sistem Event & Tiket

NIM: 2341025

Bangun REST API untuk penjualan tiket event/konser.

Tabel: events & tickets

POST   /api/login
GET    /api/events             GET    /api/tickets
GET    /api/events/{id}        GET    /api/tickets/{id}
POST   /api/events             POST   /api/tickets
PUT    /api/events/{id}        PUT    /api/tickets/{id}
DELETE /api/events/{id}        DELETE /api/tickets/{id}
6

Sistem Toko Buku Online

NIM: 2341026

Bangun REST API untuk toko buku online dengan fitur order.

Tabel: products & orders

POST   /api/login
GET    /api/products           GET    /api/orders
GET    /api/products/{id}      GET    /api/orders/{id}
POST   /api/products           POST   /api/orders
PUT    /api/products/{id}      PUT    /api/orders/{id}
DELETE /api/products/{id}      DELETE /api/orders/{id}
7

Sistem Restoran & Food Order

NIM: 2341027

Bangun REST API untuk pemesanan makanan di restoran.

Tabel: menus & food_orders

POST   /api/login
GET    /api/menus              GET    /api/food_orders
GET    /api/menus/{id}         GET    /api/food_orders/{id}
POST   /api/menus              POST   /api/food_orders
PUT    /api/menus/{id}         PUT    /api/food_orders/{id}
DELETE /api/menus/{id}         DELETE /api/food_orders/{id}
8

Sistem Gym & Fitness

NIM: 2341031

Bangun REST API untuk manajemen gym dan membership.

Tabel: packages & memberships

POST   /api/login
GET    /api/packages           GET    /api/memberships
GET    /api/packages/{id}      GET    /api/memberships/{id}
POST   /api/packages           POST   /api/memberships
PUT    /api/packages/{id}      PUT    /api/memberships/{id}
DELETE /api/packages/{id}      DELETE /api/memberships/{id}
9

Sistem Hotel Booking

NIM: 2341035

Bangun REST API untuk reservasi kamar hotel.

Tabel: rooms & reservations

POST   /api/login
GET    /api/rooms              GET    /api/reservations
GET    /api/rooms/{id}         GET    /api/reservations/{id}
POST   /api/rooms              POST   /api/reservations
PUT    /api/rooms/{id}         PUT    /api/reservations/{id}
DELETE /api/rooms/{id}         DELETE /api/reservations/{id}
10

Sistem Travel Agency

NIM: 2341037

Bangun REST API untuk paket wisata dan booking tour.

Tabel: tour_packages & bookings

POST   /api/login
GET    /api/tour_packages      GET    /api/bookings
GET    /api/tour_packages/{id} GET    /api/bookings/{id}
POST   /api/tour_packages      POST   /api/bookings
PUT    /api/tour_packages/{id} PUT    /api/bookings/{id}
DELETE /api/tour_packages/{id} DELETE /api/bookings/{id}
11

Sistem Pet Shop

NIM: 2341039

Bangun REST API untuk pet shop dengan adopsi hewan.

Tabel: pets & adoptions

POST   /api/login
GET    /api/pets               GET    /api/adoptions
GET    /api/pets/{id}          GET    /api/adoptions/{id}
POST   /api/pets               POST   /api/adoptions
PUT    /api/pets/{id}          PUT    /api/adoptions/{id}
DELETE /api/pets/{id}          DELETE /api/adoptions/{id}
12

Sistem Laundry Service

NIM: 2341050

Bangun REST API untuk layanan laundry.

Tabel: services & laundry_orders

POST   /api/login
GET    /api/services           GET    /api/laundry_orders
GET    /api/services/{id}      GET    /api/laundry_orders/{id}
POST   /api/services           POST   /api/laundry_orders
PUT    /api/services/{id}      PUT    /api/laundry_orders/{id}
DELETE /api/services/{id}      DELETE /api/laundry_orders/{id}
13

Sistem Parkir

NIM: 2341063

Bangun REST API untuk manajemen area parkir.

Tabel: parking_slots & parking_records

POST   /api/login
GET    /api/parking_slots      GET    /api/parking_records
GET    /api/parking_slots/{id} GET    /api/parking_records/{id}
POST   /api/parking_slots      POST   /api/parking_records
PUT    /api/parking_slots/{id} PUT    /api/parking_records/{id}
DELETE /api/parking_slots/{id} DELETE /api/parking_records/{id}
14

Sistem Bioskop

NIM: 2341071

Bangun REST API untuk pemesanan tiket bioskop.

Tabel: movies & movie_tickets

POST   /api/login
GET    /api/movies             GET    /api/movie_tickets
GET    /api/movies/{id}        GET    /api/movie_tickets/{id}
POST   /api/movies             POST   /api/movie_tickets
PUT    /api/movies/{id}        PUT    /api/movie_tickets/{id}
DELETE /api/movies/{id}        DELETE /api/movie_tickets/{id}
15

Sistem Music Streaming

NIM: 2341073

Bangun REST API untuk platform streaming musik.

Tabel: songs & playlists

POST   /api/login
GET    /api/songs              GET    /api/playlists
GET    /api/songs/{id}         GET    /api/playlists/{id}
POST   /api/songs              POST   /api/playlists
PUT    /api/songs/{id}         PUT    /api/playlists/{id}
DELETE /api/songs/{id}         DELETE /api/playlists/{id}
16

Sistem Inventory Gudang

NIM: 2341047

Bangun REST API untuk manajemen inventaris gudang.

Tabel: items & stock_movements

POST   /api/login
GET    /api/items              GET    /api/stock_movements
GET    /api/items/{id}         GET    /api/stock_movements/{id}
POST   /api/items              POST   /api/stock_movements
PUT    /api/items/{id}         PUT    /api/stock_movements/{id}
DELETE /api/items/{id}         DELETE /api/stock_movements/{id}
17

Sistem Sekolah

NIM: 2341075

Bangun REST API untuk manajemen data siswa dan nilai.

Tabel: students & grades

POST   /api/login
GET    /api/students           GET    /api/grades
GET    /api/students/{id}      GET    /api/grades/{id}
POST   /api/students           POST   /api/grades
PUT    /api/students/{id}      PUT    /api/grades/{id}
DELETE /api/students/{id}      DELETE /api/grades/{id}
18

Sistem Rumah Sakit

NIM: 2341076

Bangun REST API untuk manajemen pasien dan rekam medis.

Tabel: patients & medical_records

POST   /api/login
GET    /api/patients           GET    /api/medical_records
GET    /api/patients/{id}      GET    /api/medical_records/{id}
POST   /api/patients           POST   /api/medical_records
PUT    /api/patients/{id}      PUT    /api/medical_records/{id}
DELETE /api/patients/{id}      DELETE /api/medical_records/{id}
19

Sistem Real Estate

NIM: 2341077

Bangun REST API untuk listing properti dan inquiry.

Tabel: properties & inquiries

POST   /api/login
GET    /api/properties         GET    /api/inquiries
GET    /api/properties/{id}    GET    /api/inquiries/{id}
POST   /api/properties         POST   /api/inquiries
PUT    /api/properties/{id}    PUT    /api/inquiries/{id}
DELETE /api/properties/{id}    DELETE /api/inquiries/{id}
20

Sistem Job Portal

NIM: 2341078

Bangun REST API untuk lowongan kerja dan lamaran.

Tabel: jobs & applications

POST   /api/login
GET    /api/jobs               GET    /api/applications
GET    /api/jobs/{id}          GET    /api/applications/{id}
POST   /api/jobs               POST   /api/applications
PUT    /api/jobs/{id}          PUT    /api/applications/{id}
DELETE /api/jobs/{id}          DELETE /api/applications/{id}
21

Sistem Portal Berita

NIM: 2341079

Bangun REST API untuk portal berita dengan komentar.

Tabel: articles & comments

POST   /api/login
GET    /api/articles           GET    /api/comments
GET    /api/articles/{id}      GET    /api/comments/{id}
POST   /api/articles           POST   /api/comments
PUT    /api/articles/{id}      PUT    /api/comments/{id}
DELETE /api/articles/{id}      DELETE /api/comments/{id}
22

Sistem Task Management

NIM: 2341080

Bangun REST API untuk manajemen project dan tasks.

Tabel: projects & tasks

POST   /api/login
GET    /api/projects           GET    /api/tasks
GET    /api/projects/{id}      GET    /api/tasks/{id}
POST   /api/projects           POST   /api/tasks
PUT    /api/projects/{id}      PUT    /api/tasks/{id}
DELETE /api/projects/{id}      DELETE /api/tasks/{id}
23

Sistem Salon & Spa

NIM: 2441019

Bangun REST API untuk reservasi layanan salon dan spa.

Tabel: treatments & appointments

POST   /api/login
GET    /api/treatments         GET    /api/appointments
GET    /api/treatments/{id}    GET    /api/appointments/{id}
POST   /api/treatments         POST   /api/appointments
PUT    /api/treatments/{id}    PUT    /api/appointments/{id}
DELETE /api/treatments/{id}    DELETE /api/appointments/{id}
24

Sistem Donasi Online

NIM: 2441087

Bangun REST API untuk platform donasi/crowdfunding.

Tabel: campaigns & donations

POST   /api/login
GET    /api/campaigns          GET    /api/donations
GET    /api/campaigns/{id}     GET    /api/donations/{id}
POST   /api/campaigns          POST   /api/donations
PUT    /api/campaigns/{id}     PUT    /api/donations/{id}
DELETE /api/campaigns/{id}     DELETE /api/donations/{id}

📋 RINGKASAN MAPPING NIM - MINI APP

No NIM Mini App Tabel 1 Tabel 2
1 2141016 Perpustakaan books borrowings
2 2341004 Rental Kendaraan vehicles rentals
3 2341013 Klinik & Apotek medicines prescriptions
4 2341022 Kursus Online courses enrollments
5 2341025 Event & Tiket events tickets
6 2341026 Toko Buku Online products orders
7 2341027 Restoran menus food_orders
8 2341031 Gym & Fitness packages memberships
9 2341035 Hotel Booking rooms reservations
10 2341037 Travel Agency tour_packages bookings
11 2341039 Pet Shop pets adoptions
12 2341050 Laundry Service services laundry_orders
13 2341063 Parkir parking_slots parking_records
14 2341071 Bioskop movies movie_tickets
15 2341073 Music Streaming songs playlists
16 2341047 Inventory Gudang items stock_movements
17 2341075 Sekolah students grades
18 2341076 Rumah Sakit patients medical_records
19 2341077 Real Estate properties inquiries
20 2341078 Job Portal jobs applications
21 2341079 Portal Berita articles comments
22 2341080 Task Management projects tasks
23 2441019 Salon & Spa treatments appointments
24 2441087 Donasi Online campaigns donations

⚠️ CATATAN PENTING

  1. User default WAJIB ada: admin / 123456
  2. Gunakan PDO dengan Prepared Statements
  3. Semua endpoint kecuali login harus protected dengan Bearer Token
  4. Sertakan README.md dengan dokumentasi endpoint
  5. File ZIP maksimal 50MB