hub-pkp
2590 file · 28.1 MB
README
Hub PKP — Platform Pelayanan Perizinan Terpadu
Hub PKP adalah platform digital terintegrasi untuk pengurusan izin perizinan (IMB, SLF, Izin Lokasi, dll) dengan sistem manajemen proyek, konsultasi, kontrak, dan pembayaran dalam satu ekosistem.
✨ Fitur Utama
- Manajemen Proyek — Kelola proyek konstruksi/renovasi dari awal hingga selesai
- Perizinan Terpadu — Ajukan dan pantau status IMB, SLF, Izin Lokasi, dll
- Konsultasi Online — Konsultasi dengan arsitek & konsultan terpercaya
- Manajemen Kontrak — Buat, tandatangani, dan kelola kontrak digital
- Pembayaran & Escrow — Sistem pembayaman aman dengan escrow
- Dashboard Analytics — Pantau progress dan statistik proyek real-time
- PWA Ready — Dapat di-install sebagai aplikasi di mobile/desktop
🚀 Demo Langsung
🔗 Live Demo: https://hub-pkp.vercel.app
Akun Demo
| Role | Password | |
|---|---|---|
| Admin | admin@hubpkp.go.id | Admin@123456 |
| User | user@example.com | User@123456 |
| Consultant | konsultan@example.com | Konsultan@123456 |
Catatan: Demo berjalan dalam mode static data (tanpa database). Data akan reset ke kondisi awal setelah refresh halaman.
🛠 Tech Stack
| Layer | Teknologi |
|---|---|
| Framework | Next.js 14 (App Router) |
| Language | TypeScript |
| Styling | Tailwind CSS |
| UI Components | Radix UI + shadcn/ui |
| Auth | NextAuth.js v4 |
| ORM | Prisma (schema ready for PostgreSQL) |
| State | Zustand |
| Validation | Zod |
| Mobile App | Flutter (source di folder mobile/) |
📦 Deploy ke Vercel
1-Click Deploy
Klik tombol Deploy with Vercel di atas atau ikuti langkah manual:
Manual Deploy
-
Fork / Clone repository
git clone https://github.com/subkhanibnuaji/hub-pkp.git cd hub-pkp -
Install dependencies
npm install -
Setup Environment Variables
cp .env.example .env.localEdit
.env.localdan isi minimal:NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-random-secret-min-32-chars -
Run development server
npm run dev -
Deploy ke Vercel
npx vercel --prodAtau hubungkan repository ke Vercel Dashboard.
⚙️ Environment Variables
| Variable | Deskripsi | Wajib |
|---|---|---|
NEXTAUTH_URL | URL aplikasi (e.g. https://hub-pkp.vercel.app) | ✅ |
NEXTAUTH_SECRET | Secret key untuk JWT encryption (min 32 karakter) | ✅ |
NODE_ENV | development atau production | ✅ |
DATABASE_URL | PostgreSQL connection string (opsional untuk production mode) | ❌ |
Untuk mode demo,
DATABASE_URLtidak diperlukan. Project akan menggunakan static data adapter secara otomatis.
📁 Struktur Folder
hub-pkp/
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── api/ # API Routes (REST API)
│ │ ├── admin/ # Halaman Admin Dashboard
│ │ ├── dashboard/ # Halaman User Dashboard
│ │ ├── login/ # Halaman Login
│ │ └── register/ # Halaman Register
│ ├── components/ # React Components
│ │ ├── ui/ # UI primitives (shadcn/ui)
│ │ ├── auth/ # Auth-related components
│ │ └── shared/ # Shared components
│ ├── lib/ # Utilities & helpers
│ │ ├── prisma.ts # Prisma / Static Data Adapter
│ │ ├── auth.ts # NextAuth configuration
│ │ └── static-data.ts # Static demo data
│ ├── hooks/ # Custom React hooks
│ └── types/ # TypeScript types
├── prisma/
│ └── schema.prisma # Database schema (PostgreSQL)
├── public/ # Static assets
│ ├── icons/ # PWA icons
│ └── images/ # Image assets
├── mobile/ # Flutter mobile app
└── .github/workflows/ # GitHub Actions CI/CD
🔐 Autentikasi & Role
Project menggunakan NextAuth.js dengan strategi JWT dan role-based access control:
ADMIN— Akses penuh ke semua fitur dan admin panelUSER— Akses dashboard, proyek, perizinan, konsultasiCONSULTANT— Akses konsultasi, kontrak, dan portfolio
Middleware otomatis melindungi route berdasarkan role di middleware.ts.
📱 Mobile App
Source code aplikasi mobile (Flutter) tersedia di folder mobile/. Aplikasi ini terhubung ke backend melalui REST API yang sama (/api/v1/*).
🤝 Kontribusi
Kontribusi sangat diterima! Silakan buat Issue atau Pull Request.
📄 Lisensi
MIT License © 2025 Hub PKP Team.
File Utama
- .PWA_COMMIT_MESSAGE.txt
- .env.example
- .eslintrc.json
- .gitignore
- AGENTS.md
- API_CONTRACTS_SUMMARY.md
- API_IMPLEMENTATION_SUMMARY.txt
- API_ROUTES_INDEX.md