Add project handoff documentation
This commit is contained in:
149
HANDOFF.md
Normal file
149
HANDOFF.md
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
# Bizone Web Handoff
|
||||||
|
|
||||||
|
Dokumen ini menyimpan konteks kerja proyek supaya engineer atau AI lain bisa lanjut tanpa mengulang discovery dari nol.
|
||||||
|
|
||||||
|
## Ringkasan
|
||||||
|
|
||||||
|
- Project: website marketing `www.bizone.id`
|
||||||
|
- Stack: Next.js 16 App Router, React 19, TypeScript, Tailwind v4
|
||||||
|
- Repo: `https://git.iptek.co/wirabasalamah/BizOne-web.git`
|
||||||
|
- Branch utama: `main`
|
||||||
|
|
||||||
|
## Struktur penting
|
||||||
|
|
||||||
|
- `src/app`: routes Next.js
|
||||||
|
- `src/components`: komponen reusable
|
||||||
|
- `src/lib/site.ts`: data brand, kontak, alamat, link peta
|
||||||
|
- `src/app/api/contact/route.ts`: endpoint submit form kontak
|
||||||
|
- `src/app/api/contact/captcha/route.ts`: endpoint captcha
|
||||||
|
- `src/lib/mailer.ts`: SMTP transport
|
||||||
|
- `src/lib/contact.ts`: captcha signing, rate limit, helper IP
|
||||||
|
- `public/bizone.png`: logo utama
|
||||||
|
- `public/favicon.ico`: favicon utama
|
||||||
|
- `bizone-privacy-policy.md`: source konten privacy policy
|
||||||
|
- `bizone-terms-and-conditions.md`: source konten terms
|
||||||
|
- `bizone-website-content.md`: source copy marketing
|
||||||
|
|
||||||
|
## Yang sudah dikerjakan
|
||||||
|
|
||||||
|
- Website diubah dari kumpulan HTML referensi menjadi Next.js app.
|
||||||
|
- Halaman aktif:
|
||||||
|
- `/`
|
||||||
|
- `/features`
|
||||||
|
- `/solutions`
|
||||||
|
- `/about`
|
||||||
|
- `/contact`
|
||||||
|
- `/privacy-policy`
|
||||||
|
- `/terms-and-conditions`
|
||||||
|
- Header memakai `bizone.png`.
|
||||||
|
- Favicon memakai `public/favicon.ico`.
|
||||||
|
- Navigation aktif memakai underline pada text aktif.
|
||||||
|
- Halaman kontak:
|
||||||
|
- form bisa diisi
|
||||||
|
- submit ke backend internal
|
||||||
|
- kirim email ke `info@bizone.id`
|
||||||
|
- SMTP `mail.bizone.id:465`
|
||||||
|
- proteksi captcha sederhana
|
||||||
|
- honeypot field
|
||||||
|
- rate limit in-memory dasar
|
||||||
|
- `support@bizone.id` sudah dihapus dari tampilan website.
|
||||||
|
- Alamat kantor sudah diisi dari referensi `iptek.co/contact`.
|
||||||
|
- Peta kantor sudah ditambahkan ke halaman kontak.
|
||||||
|
- Privacy policy sudah disinkronkan dengan `bizone-privacy-policy.md`.
|
||||||
|
|
||||||
|
## Kredensial dan env
|
||||||
|
|
||||||
|
Jangan commit secret baru ke repo.
|
||||||
|
|
||||||
|
Environment yang dipakai app:
|
||||||
|
|
||||||
|
```env
|
||||||
|
SMTP_HOST=mail.bizone.id
|
||||||
|
SMTP_PORT=465
|
||||||
|
SMTP_USER=mailer@bizone.id
|
||||||
|
SMTP_PASS=...
|
||||||
|
CONTACT_TO_EMAIL=info@bizone.id
|
||||||
|
CONTACT_FROM_EMAIL=mailer@bizone.id
|
||||||
|
CAPTCHA_SECRET=...
|
||||||
|
```
|
||||||
|
|
||||||
|
File contoh:
|
||||||
|
|
||||||
|
- `.env.example`
|
||||||
|
|
||||||
|
File lokal developer:
|
||||||
|
|
||||||
|
- `.env.local`
|
||||||
|
|
||||||
|
## Command lokal
|
||||||
|
|
||||||
|
Dev:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
Build:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
Production lokal:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run start -- --port 3001
|
||||||
|
```
|
||||||
|
|
||||||
|
## Deploy server
|
||||||
|
|
||||||
|
Target deploy yang sudah dibahas:
|
||||||
|
|
||||||
|
- user Linux khusus: `bizone`
|
||||||
|
- app directory: `/srv/bizone-web`
|
||||||
|
- service name: `bizone-web`
|
||||||
|
- app port: `3006`
|
||||||
|
- reverse proxy: Nginx existing
|
||||||
|
|
||||||
|
Update di server:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo -u bizone -H bash -lc 'cd /srv/bizone-web && git pull origin main && npm install && npm run build'
|
||||||
|
sudo systemctl restart bizone-web
|
||||||
|
sudo systemctl status bizone-web
|
||||||
|
```
|
||||||
|
|
||||||
|
Contoh install SSL:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt install -y certbot python3-certbot-nginx
|
||||||
|
sudo certbot --nginx -d bizone.id -d www.bizone.id
|
||||||
|
```
|
||||||
|
|
||||||
|
## Git
|
||||||
|
|
||||||
|
Git user yang dipakai untuk commit lokal:
|
||||||
|
|
||||||
|
- `Wira Irawan`
|
||||||
|
- `wira.irawan@gmail.com`
|
||||||
|
|
||||||
|
Remote origin:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
https://git.iptek.co/wirabasalamah/BizOne-web.git
|
||||||
|
```
|
||||||
|
|
||||||
|
## Catatan operasional
|
||||||
|
|
||||||
|
- `next dev` sempat crash setelah `.next` dibersihkan karena Turbopack cache issue. Untuk verifikasi stabil, `next start` production lebih aman.
|
||||||
|
- CAPTCHA saat ini cukup untuk proteksi dasar, bukan proteksi kelas tinggi.
|
||||||
|
- Rate limit masih in-memory. Kalau app dijalankan multi-instance atau direstart, counter akan reset.
|
||||||
|
- Halaman legal masih hardcoded di route component. Jika sering berubah, lebih baik next step adalah render dari markdown source.
|
||||||
|
|
||||||
|
## Saran next step
|
||||||
|
|
||||||
|
- Ganti captcha sederhana ke Cloudflare Turnstile atau reCAPTCHA.
|
||||||
|
- Pindahkan legal pages agar dirender dari markdown source.
|
||||||
|
- Tambahkan mobile nav menu jika nanti dibutuhkan.
|
||||||
|
- Tambahkan analytics dan SEO metadata per halaman.
|
||||||
|
- Buat script deploy otomatis seperti `deploy.sh`.
|
||||||
@ -23,8 +23,10 @@ Lalu buka `http://localhost:3000`.
|
|||||||
## Catatan
|
## Catatan
|
||||||
|
|
||||||
- Logo memakai `public/bizone.png`.
|
- Logo memakai `public/bizone.png`.
|
||||||
- Konten legal masih perlu finalisasi alamat perusahaan sebelum publish.
|
- Favicon memakai `public/favicon.ico`.
|
||||||
- Bagian form kontak saat ini masih presentational dan belum terhubung ke backend.
|
- Form kontak sudah terhubung ke endpoint server dan mengirim email via SMTP.
|
||||||
|
- Form kontak dilindungi captcha aritmatika sederhana, honeypot, dan rate limit dasar.
|
||||||
|
- Alamat kantor yang dipakai saat ini: `Jl. Srengseng Sawah No.51 C, Kel. Srengseng Sawah, Jagakarsa, Jakarta Selatan, DKI Jakarta 12640`.
|
||||||
|
|
||||||
## Verifikasi
|
## Verifikasi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user