Web-based PWA untuk booking lapangan olahraga, loyalty points, dan operasional venue olahraga di Indonesia.
Lapangin diarahkan sebagai booking-first marketplace untuk sewa lapangan olahraga di Indonesia.
Fokus tahap awal:
- User bisa mencari venue, memilih slot, booking, bayar, dan cek status dengan cepat.
- User punya akun, history booking, loyalty points, dan nantinya referral/team invite.
- Owner/operator venue bisa mengelola lapangan, harga, jadwal, booking, pembayaran, dan laporan.
- Marketplace bisa menampung banyak owner/venue, tetapi publikasi venue tetap dikontrol platform admin.
Fitur komunitas seperti public session, roster tim, open play, sparring, dan turnamen adalah roadmap lanjutan setelah booking, payment, auth, dan owner operations stabil.
- Homepage — Hero section, kategori olahraga, venue populer
- Pemesanan — 5 langkah: Pilih Area/Olahraga → Pilih Venue → Pilih Lapangan → Isi Data → Pembayaran/Status
- Area Filtering — Area/lokasi dapat diteruskan dari halaman booking ke listing venue
- Cek Booking — Lihat status booking dengan kode booking
- Responsive — Mobile-first design, PWA ready
- Registrasi — Daftar akun dengan nama, email, telepon, password
- Login — Akses profil dan riwayat booking
- Loyalty Points — Dapat poin setiap transaksi yang dikonfirmasi admin/owner
- Profil — Lihat tier, poin, dan riwayat transaksi
- Login Terproteksi — Admin/owner/staff memakai JWT authentication
- Dashboard — Statistik booking, revenue, pelanggan
- Kelola Booking — Konfirmasi, tolak, lihat detail booking
- Kelola Lapangan — CRUD lapangan
- Kelola Harga — Atur pricing per lapangan
- Notifikasi — Riwayat notifikasi/log MVP
| Technology | Purpose |
|---|---|
| Next.js App Router | App routing & server rendering |
| TypeScript | Type safety |
| Tailwind CSS | Styling |
| JWT (HMAC-SHA256) | Authentication |
| bcryptjs | Password hashing |
| Mock Adapter | Local/demo DB |
| Google Sheets | Demo online database option |
| PostgreSQL | Production migration target |
# 1. Install exact dependencies from lockfile
npm ci
# 2. Copy environment file
cp .env.example .env.local
# 3. Edit .env.local, keep mock mode for normal local feature work
DATABASE_PROVIDER=mock
JWT_SECRET=replace-with-a-long-random-value-at-least-32-chars
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_APP_NAME=Lapangin
# 4. Check local readiness
npm run doctor
# 5. Run development server
npm run devOpen:
- Public app: http://localhost:3000
- Admin login: http://localhost:3000/admin/login
Generate a better local JWT_SECRET with:
openssl rand -base64 48For CLINE local work, read these first:
| Password | Role | |
|---|---|---|
| admin@lapangin.id | Admin123!@# | Super Admin |
| owner@lapangin.id | Owner123!@# | Venue Owner |
Login: http://localhost:3000/admin/login
Customer dapat daftar di: http://localhost:3000/register
Note: auth masih punya jalur demo/in-memory untuk MVP, tetapi password demo/customer sudah di-hash. Production tetap harus pindah ke database-backed auth.
| Sport | Icon | Venue |
|---|---|---|
| Futsal | ⚽ | Arena Futsal Pro |
| Mini Soccer | 🥅 | Arena Mini Soccer |
| Badminton | 🏸 | GOR Badminton |
| Padel | 🏒 | Padel Arena |
| Tennis | 🎾 | Tennis Club |
| Basketball | 🏀 | Basketball Center |
- User daftar akun customer.
- User melakukan booking.
- Booking masuk sebagai
waiting_paymentdan belum final. - User submit bukti pembayaran.
- Admin/owner confirm booking.
- Poin masuk setelah booking
confirmed.
Rate saat ini:
1 point per Rp 10.000 confirmed booking value| Tier | Poin | Benefit |
|---|---|---|
| 🥉 Bronze | 0 - 1.999 | Basic member |
| 🥈 Silver | 2.000 - 4.999 | Diskon 5% |
| 🥇 Gold | 5.000 - 9.999 | Diskon 10% |
| 💎 Platinum | 10.000+ | Diskon 15% + prioritas |
- Move all point awarding into
LoyaltyService - Prevent duplicate point awards per booking
- Add referral/event ledger
- Add reward catalog and redemption flow
- Add team invite bonus after invited user registers and joins/completes a booking
src/
├── app/
│ ├── (auth)/ # Login, Register, Profile
│ ├── (public)/ # Booking flow
│ ├── admin/ # Admin panel protected by middleware
│ └── api/ # API routes
├── lib/
│ ├── auth/ # JWT/session/password utilities
│ ├── adapters/ # Database adapters
│ ├── services/ # Business logic
│ ├── types/ # TypeScript types
│ └── validators/ # Input validation
├── components/ # UI components
└── middleware.ts # Route protection| Document | Description |
|---|---|
| Project Overview | Visi & arsitektur |
| Module Roadmap | Tahapan development |
| Testing Checklist | Daftar test |
| UI Optimization & Loyalty | Optimasi UI & modul loyalty |
| Final System Overview | Overview sistem |
| Stage 12 Hardening | Production-readiness checklist |
| System Truth | Sumber kebenaran status sistem |
| CLINE Local Workflow | Panduan aman kerja di VS Code + CLINE |
| Marketplace Gap Sync Plan | Prioritas gap sync sebelum fitur baru |
npm run doctor
npm run type-check
npm run lint
npm run buildAtau semua sekaligus:
npm run check# Create booking
curl -X POST http://localhost:3000/api/bookings \
-H "Content-Type: application/json" \
-d '{"customerName":"Test","customerPhone":"08123456789","sportId":"futsal","venueId":"venue-arena1","courtId":"court-f1","bookingDate":"2026-06-25","startTime":"10:00","endTime":"12:00","durationMinutes":120}'
# Submit payment proof by booking code
curl -X POST http://localhost:3000/api/payments/proof \
-H "Content-Type: application/json" \
-d '{"bookingCode":"BK-XXXXXX-ABCD","phone":"08123456789","proofUrl":"data:image/png;base64,..."}'
# Admin login
curl -X POST http://localhost:3000/api/auth/admin/login \
-H "Content-Type: application/json" \
-d '{"email":"admin@lapangin.id","password":"Admin123!@#"}' \
-c cookies.txt- Buka http://localhost:3000
- Pilih area/olahraga → venue → lapangan
- Pilih tanggal & jam
- Isi form booking
- Cek booking code di halaman status/sukses
- Submit bukti pembayaran
- Login admin di
/admin/login - Konfirmasi booking → cek status customer/loyalty
npm run build
vercel deployDATABASE_PROVIDER=mock
JWT_SECRET=your-secret-key-min-32-chars
NEXT_PUBLIC_APP_URL=https://your-domain.com
NEXT_PUBLIC_APP_NAME=LapanginFor real production booking, use PostgreSQL only after PostgresAdapter and migrations are fully implemented.
MIT © 2026 Lapangin