# Evaluasi struktur project (Laravel + React SPA)

Tanggal: 2026-07-22 (diperbarui setelah cutover Vite)

## Monorepo

```
PADEBERKINEM/
├── api/                 ← Laravel 11 API (document root = api/public)
├── frontend/            ← React 19 + Vite SPA (build → dist/, tanpa Node di server)
├── docs/database/       ← referensi skema MySQL
├── nginx/
├── scripts/deploy/
├── DEPLOY_GIT.md
└── DEPLOY_FRONTEND_SPA.md
```

**Deploy production:**
- API: PHP/Laravel di `api/public`
- Frontend: upload isi `frontend/dist/` ke document root `mcbdl.site` (Apache + `.htaccess` SPA)
- **Tidak perlu** Node.js App di cPanel

Opsional (satu domain): salin `dist/` ke `api/public` + catch-all non-`api/*` → `index.html`. Saat ini domain terpisah (API vs web) sudah cukup dengan CORS + JWT Bearer.

## Struktur `api/` vs Laravel 11

| Path Laravel | Status |
|--------------|--------|
| `artisan`, `bootstrap/`, `public/`, `routes/` | ✅ |
| `app/Http`, `Models`, `Services`, `Middleware` | ✅ |
| `config/`, `storage/`, `database/` | ✅ |
| `resources/views` | tidak perlu (API JSON) |

## Frontend (`frontend/`)

| Item | Status |
|------|--------|
| Vite + React Router | ✅ menggantikan Next.js App Router |
| Shim `next/link`, `next/navigation`, `next/image` | ✅ |
| `npm run build` → `dist/` | ✅ (~35 route client-side) |
| Auth JWT (localStorage + Bearer) | ✅ |

Lihat: [DEPLOY_FRONTEND_SPA.md](../DEPLOY_FRONTEND_SPA.md)
