Initial BizOne portal setup
This commit is contained in:
40
README.md
Normal file
40
README.md
Normal file
@ -0,0 +1,40 @@
|
||||
# WA Dashboard Kit V6
|
||||
|
||||
Versi 6 fokus bikin flow dasar lebih terasa hidup.
|
||||
|
||||
## Added in V6
|
||||
- Login page skeleton
|
||||
- Frontend token helper
|
||||
- Contacts create form skeleton
|
||||
- Better auth notes
|
||||
- Realistic next-step structure for turning into full app
|
||||
|
||||
## Note
|
||||
Masih starter baseline, belum production-ready.
|
||||
|
||||
## Production Security Baseline
|
||||
- `JWT_SECRET`, `WEBHOOK_VERIFY_TOKEN`, dan `WEBHOOK_SHARED_SECRET` wajib kuat.
|
||||
- Di `production`, secret di atas wajib minimal 32 karakter dan tidak boleh pakai placeholder.
|
||||
- `JWT_EXPIRES_IN` harus ditetapkan eksplisit sesuai kebijakan sesi.
|
||||
- `PUBLIC_API_URL` dan `FRONTEND_ORIGIN` wajib `https` di `production`.
|
||||
- `WEBHOOK_ALLOW_UNSIGNED` tidak boleh aktif di `production`.
|
||||
- Jika SMTP dipakai di `production`, set lengkap `MAIL_HOST`, `MAIL_USER`, `MAIL_PASSWORD`, dan `MAIL_FROM`.
|
||||
- Login sekarang dibatasi oleh `AUTH_LOGIN_MAX_ATTEMPTS` dan `AUTH_LOGIN_WINDOW_MINUTES`.
|
||||
- Verifikasi 2FA dan forgot-password juga dibatasi lewat Redis:
|
||||
`AUTH_2FA_MAX_ATTEMPTS`, `AUTH_2FA_WINDOW_MINUTES`,
|
||||
`AUTH_PASSWORD_RESET_MAX_ATTEMPTS`, dan `AUTH_PASSWORD_RESET_WINDOW_MINUTES`.
|
||||
- 2FA sekarang mendukung backup recovery codes satu-kali-pakai.
|
||||
- Lihat `.env.example` untuk kontrak env terbaru.
|
||||
|
||||
## Local Run
|
||||
Frontend:
|
||||
`cd frontend && npm run dev`
|
||||
|
||||
Backend di environment ini lebih stabil lewat build output karena `tsx watch` gagal pada Node.js 25:
|
||||
`cd backend && npm run local`
|
||||
|
||||
## Legacy Prisma Baseline
|
||||
Untuk database lama yang sudah punya tabel tetapi belum punya histori `_prisma_migrations`, jalankan:
|
||||
`cd backend && npm run db:baseline:legacy`
|
||||
|
||||
Gunakan ini hanya jika schema database memang sudah setara dengan isi folder `prisma/migrations`.
|
||||
Reference in New Issue
Block a user