superapp-hub

hub-pkp

2590 file · 28.1 MB

Sistem informasi live — www.hubrumah.comBuka di tab baru

README

Hub PKP — Platform Pelayanan Perizinan Terpadu

Deploy with Vercel License: MIT

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

RoleEmailPassword
Adminadmin@hubpkp.go.idAdmin@123456
Useruser@example.comUser@123456
Consultantkonsultan@example.comKonsultan@123456

Catatan: Demo berjalan dalam mode static data (tanpa database). Data akan reset ke kondisi awal setelah refresh halaman.

🛠 Tech Stack

LayerTeknologi
FrameworkNext.js 14 (App Router)
LanguageTypeScript
StylingTailwind CSS
UI ComponentsRadix UI + shadcn/ui
AuthNextAuth.js v4
ORMPrisma (schema ready for PostgreSQL)
StateZustand
ValidationZod
Mobile AppFlutter (source di folder mobile/)

📦 Deploy ke Vercel

1-Click Deploy

Klik tombol Deploy with Vercel di atas atau ikuti langkah manual:

Manual Deploy

  1. Fork / Clone repository

    git clone https://github.com/subkhanibnuaji/hub-pkp.git
    cd hub-pkp
    
  2. Install dependencies

    npm install
    
  3. Setup Environment Variables

    cp .env.example .env.local
    

    Edit .env.local dan isi minimal:

    NEXTAUTH_URL=http://localhost:3000
    NEXTAUTH_SECRET=your-random-secret-min-32-chars
    
  4. Run development server

    npm run dev
    

    Buka http://localhost:3000

  5. Deploy ke Vercel

    npx vercel --prod
    

    Atau hubungkan repository ke Vercel Dashboard.

⚙️ Environment Variables

VariableDeskripsiWajib
NEXTAUTH_URLURL aplikasi (e.g. https://hub-pkp.vercel.app)
NEXTAUTH_SECRETSecret key untuk JWT encryption (min 32 karakter)
NODE_ENVdevelopment atau production
DATABASE_URLPostgreSQL connection string (opsional untuk production mode)

Untuk mode demo, DATABASE_URL tidak 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 panel
  • USER — Akses dashboard, proyek, perizinan, konsultasi
  • CONSULTANT — 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