diff --git a/.docs/AGENTS.md b/.docs/AGENTS.md
new file mode 100644
index 0000000..b5d7aef
--- /dev/null
+++ b/.docs/AGENTS.md
@@ -0,0 +1,41 @@
+# .docs/ -- Engineering Documentation Center
+
+## Fungsi
+
+Pusat dokumentasi internal engineering: architecture decisions, technical guides, design docs, testing strategy, deployment, security, AI collaboration.
+
+## Aturan Penggunaan
+
+- Baca dokumentasi yang relevan SEBELUM memulai task baru
+- Update dokumentasi SETELAH ada keputusan atau perubahan berarti
+- Bahasa Indonesia wajib untuk semua dokumentasi
+
+## Struktur
+
+| Folder | Isi |
+| ------------- | ----------------------------------- |
+| product/ | Visi produk, roadmap, feature specs |
+| design/ | Design system, UI/UX guidelines |
+| technical/ | Tech stack, dependencies |
+| engineering/ | Coding standards, workflow |
+| architecture/ | System architecture, data flow |
+| adr/ | Architecture Decision Records |
+| api/ | API documentation |
+| testing/ | Testing strategy |
+| deployment/ | Deployment pipeline |
+| security/ | Security policies |
+| ai/ | AI agent collaboration |
+| onboarding/ | Developer onboarding |
+| glossary/ | Terminology |
+
+## Best Practices
+
+- Setiap folder memiliki README.md dengan template
+- ADR untuk keputusan arsitektur penting
+- Dokumentasi sifatnya living document
+
+## AI Do's / Don'ts
+
+- Boleh: membaca .docs/ sebelum task, mengupdate dokumentasi
+- Tidak boleh: menghapus dokumentasi tanpa deprecation notice
+- Wajib: baca .docs/ai/ sebelum berinteraksi dengan project
diff --git a/.docs/README.md b/.docs/README.md
new file mode 100644
index 0000000..e775290
--- /dev/null
+++ b/.docs/README.md
@@ -0,0 +1,87 @@
+# .docs -- Pusat Dokumentasi Engineering
+
+> Dokumentasi internal untuk pengembangan project ini.
+> Bukan dokumentasi user -- ini adalah **engineering knowledge base**.
+
+---
+
+## Tujuan
+
+Folder `.docs` adalah pusat dokumentasi engineering yang berfungsi sebagai:
+
+- **Single source of truth** untuk keputusan teknis dan arsitektur
+- **Knowledge base** untuk developer dan AI agent
+- **Onboarding hub** untuk anggota tim baru
+- **Decision log** untuk mencatat why di balik setiap keputusan
+
+---
+
+## Struktur Folder
+
+| Folder | Fungsi |
+| --------------- | -------------------------------------------------------- |
+| `product/` | Visi produk, roadmap, user stories, feature specs |
+| `design/` | Design system, UI/UX guidelines, component patterns |
+| `technical/` | Tech stack, dependencies, konfigurasi, development setup |
+| `engineering/` | Engineering practices, code review, coding standards |
+| `architecture/` | System architecture, data flow, module boundaries |
+| `adr/` | Architecture Decision Records -- keputusan arsitektur |
+| `api/` | API documentation, endpoint specs, request/response |
+| `testing/` | Testing strategy, test types, coverage goals |
+| `deployment/` | Deployment pipeline, environments, infrastructure |
+| `security/` | Security policies, auth, authorization, data protection |
+| `ai/` | AI agent collaboration guide, prompt conventions |
+| `onboarding/` | New developer onboarding, setup guide |
+| `glossary/` | Project terminology, abbreviations, definitions |
+
+---
+
+## Cara Menggunakan
+
+1. **Baca dulu** -- cek folder yang relevan sebelum memulai task baru
+2. **Update secara berkala** -- tambahkan insight, keputusan, dan pelajaran baru
+3. **Jangan hapus** -- dokumentasi adalah aset. Deprecate, jangan delete
+4. **Gunakan template** -- setiap folder menyediakan template untuk konsistensi
+5. **Bahasa Indonesia** -- semua dokumentasi wajib Bahasa Indonesia (kecuali kode)
+
+---
+
+## Prinsip Penulisan
+
+| Prinsip | Penjelasan |
+| ---------------- | ------------------------------------------------------- |
+| **Professional** | Hindari bahasa informal, emoji, atau subjective opinion |
+| **Clear** | Jelaskan konteks, bukan hanya apa yang terjadi |
+| **Practical** | Berikan contoh nyata, bukan teori abstrak |
+| **Up-to-date** | Jika informasi berubah, update dokumentasi |
+| **Searchable** | Gunakan judul dan struktur yang mudah dicari |
+
+---
+
+## Format Dokumen
+
+Setiap dokumen sebaiknya memiliki struktur:
+
+```markdown
+# Judul Dokumen
+
+## Tujuan
+
+[Mengapa dokumen ini dibuat]
+
+## Konteks
+
+[Latar belakang, keputusan yang melatarbelakangi]
+
+## Isi
+
+[Konten utama]
+
+## Referensi
+
+[Link ke dokumen terkait]
+```
+
+---
+
+_Dokumentasi adalah investasi. Setiap menit yang dihabiskan untuk menulis docs menghemat berjam-jam kebingungan di masa depan._
diff --git a/.docs/adr/README.md b/.docs/adr/README.md
new file mode 100644
index 0000000..bc0d0f7
--- /dev/null
+++ b/.docs/adr/README.md
@@ -0,0 +1,125 @@
+# adr/ -- Architecture Decision Records
+
+> Mencatat keputusan arsitektur penting beserta konteks dan konsekuensinya.
+
+---
+
+## Tujuan
+
+ADR (Architecture Decision Record) adalah dokumentasi **keputusan arsitektur** yang mencakup:
+
+- Konteks mengapa keputusan diambil
+- Alternatif yang dipertimbangkan
+- Keputusan final yang diambil
+- Konsekuensi dari keputusan tersebut
+- Status keputusan (proposed, accepted, deprecated, superseded)
+
+---
+
+## Format ADR (Y-Statements)
+
+Setiap ADR menggunakan format **Y-Statement**:
+
+```markdown
+# ADR-[nomor]: [Judul Keputusan]
+
+## Status
+
+[Proposed | Accepted | Deprecated | Superseded by ADR-NNN]
+
+## Context
+
+[Jelaskan konteks dan problem yang mendorong keputusan ini]
+
+## Decision
+
+[Gunakan format "We will..." atau "Kami memutuskan untuk..."]
+
+## Rationale
+
+[Jelaskan alasan di balik keputusan]
+
+## Consequences
+
+### Positive
+
+- [Dampak positif]
+
+### Negative
+
+- [Dampak negatif]
+
+### Neutral
+
+- [Dampak netral]
+
+## Alternatives Considered
+
+### Alternative 1: [Nama]
+
+- Pros: ...
+- Cons: ...
+
+### Alternative 2: [Nama]
+
+- Pros: ...
+- Cons: ...
+
+## References
+
+- [Link ke dokumentasi terkait]
+- [Link ke issue/PR]
+```
+
+---
+
+## Template ADR (Simple)
+
+```markdown
+# ADR-001: [Judul]
+
+**Status:** Proposed
+
+**Context:**
+[Problem dan latar belakang]
+
+**Decision:**
+Kami akan [keputusan]
+
+**Rationale:**
+[Alasan]
+
+**Consequences:**
+
+- Positif: [...]
+- Negatif: [...]
+
+**Alternatives:**
+
+1. [Alternatif 1] -- ditolak karena [...]
+2. [Alternatif 2] -- ditolak karena [...]
+```
+
+---
+
+## Kapan Harus Membuat ADR
+
+Buat ADR ketika:
+
+- Mengadopsi teknologi/library baru
+- Mengubah struktur folder atau arsitektur
+- Memutuskan design pattern yang signifikan
+- Mengubah data model atau schema
+- Memutuskan strategi caching, state management, API design
+- Mengubah konfigurasi infrastruktur
+
+---
+
+## Best Practices
+
+1. **Buat sebelum implementasi** -- ADR adalah keputusan, bukan catatan setelah coding
+2. **Satu ADR per keputusan** -- Jangan campur beberapa keputusan dalam satu ADR
+3. **Nomor berurutan** -- ADR-001, ADR-002, dst.
+4. **Immutable setelah accepted** -- Jika berubah, buat ADR baru yang supersede
+5. **Kaitkan dengan kode** -- Referensikan ADR di commit messages dan PR descriptions
+6. **Review berkala** -- Pastikan ADR yang deprecated ditandai dengan jelas
diff --git a/.docs/adr/adr-001-product-pivot-contribution-hub.md b/.docs/adr/adr-001-product-pivot-contribution-hub.md
new file mode 100644
index 0000000..c4a177c
--- /dev/null
+++ b/.docs/adr/adr-001-product-pivot-contribution-hub.md
@@ -0,0 +1,83 @@
+# ADR-001: Product Pivot ke Contribution Hub
+
+## Status
+
+**Accepted**
+
+## Context
+
+Project ini awalnya dimulai sebagai starter foundation project untuk Next.js 16 dengan FSD architecture. ROADMAP.md sebelumnya menyebutkan visi sebagai "platform referensi film modern." Namun, setelah evaluasi lebih lanjut, beberapa faktor mendorong perubahan arah:
+
+1. **Market terlalu kompetitif** untuk platform referensi film (TMDB, IMDb, MyDramaList sudah dominan)
+2. **Tidak ada diferensiasi kuat** yang bisa dibangun di area tersebut dengan sumber daya terbatas
+3. **Tim/Founder memiliki latar belakang dan passion di developer tooling**
+4. **Kebutuhan nyata** di ekosistem developer Indonesia: tools untuk membantu konsistensi coding dan dokumentasi progress
+5. **Foundation project sudah solid** secara teknis dan bisa diarahkan ke domain apapun
+
+## Decision
+
+Kami memutuskan untuk mengubah arah produk dari "platform referensi film" menjadi **Contribution Hub: Developer Activity Assistant**.
+
+## Rationale
+
+1. **Market need validation**: Banyak developer Indonesia mengalami masalah konsistensi coding, dokumentasi progress, dan personal branding di GitHub. Produk ini menyelesaikan masalah nyata.
+
+2. **Teknologi alignment**: Tech stack yang sudah ada (Next.js, React Query, Zustand, Zod) sangat cocok untuk membangun developer tooling. GitHub API integration adalah use case yang natural.
+
+3. **Differentiation**: Tidak ada produk Indonesia yang secara spesifik membahas "developer activity assistant" dengan fokus pada meaningful contribution.
+
+4. **Scalability**: Produk bisa tumbuh dari personal tool ke team platform ke ecosystem.
+
+5. **Developer empathy**: Kami memahami masalah ini karena kami juga mengalaminya sebagai developer.
+
+6. **Foundation preservation**: Struktur FSD, coding standards, dan dokumentasi yang sudah dibangun tetap relevan dan bisa digunakan langsung.
+
+## Consequences
+
+### Positive
+
+- Market niche yang jelas dan underserved
+- Developer tooling memiliki recurring usage pattern (harian)
+- Potensi community building yang kuat (developer-centric)
+- Teknologi stack yang ada sangat cocok
+- Bisa dimonetisasi dengan freemium model yang jelas
+
+### Negative
+
+- Target pasar lebih kecil dibanding platform referensi film
+- Membutuhkan integrasi dengan GitHub API (dependency eksternal)
+- Developer tools butuh trust building yang lebih lama
+- Kompetisi dengan tools internasional (WakaTime, GitClear)
+
+### Neutral
+
+- Nama project (next-app) dan domain perlu diubah
+- Dokumentasi produk harus ditulis ulang (dilakukan di ADR ini)
+- Branding perlu dibangun dari awal
+
+## Alternatives Considered
+
+### Alternative 1: Tetap dengan platform referensi film
+
+- Pros: Market besar, banyak yang bisa dipelajari
+- Cons: Kompetisi ketat, tidak ada diferensiasi, butuh data konten yang besar
+- **Ditolak** karena tidak ada competitive advantage
+
+### Alternative 2: Productivity tool general
+
+- Pros: Market sangat luas
+- Cons: Terlalu generic, susah positioning, banyak kompetitor
+- **Ditolak** karena terlalu broad
+
+### Alternative 3: Coding bootcamp platform
+
+- Pros: Tren edtech sedang naik
+- Cons: Butuh konten edukasi, operasional berat, business model kompleks
+- **Ditolak** karena terlalu berat untuk solo developer
+
+## References
+
+- [Product Definition](../product/definition.md)
+- [Product Vision](../product/vision.md)
+- [Product Roadmap](../product/roadmap.md)
+- [ADR-002: Meaningful Contribution Philosophy](./adr-002-meaningful-contribution-philosophy.md)
diff --git a/.docs/adr/adr-002-meaningful-contribution-philosophy.md b/.docs/adr/adr-002-meaningful-contribution-philosophy.md
new file mode 100644
index 0000000..2e4b4f7
--- /dev/null
+++ b/.docs/adr/adr-002-meaningful-contribution-philosophy.md
@@ -0,0 +1,142 @@
+# ADR-002: Meaningful Contribution Philosophy
+
+## Status
+
+**Accepted**
+
+## Context
+
+Salah satu risiko terbesar dalam membangun tools yang berhubungan dengan GitHub contributions adalah insentif yang salah. Banyak tools dan layanan yang secara tidak sengaja (atau sengaja) mendorong perilaku spam:
+
+- Commit kosong untuk mempertahankan streak
+- Repository boilerplate yang tidak bermakna
+- Automated activity yang tidak merepresentasikan pekerjaan nyata
+- "GitHub grass" farming tools
+
+Kami harus mendefinisikan secara eksplisit apa arti "meaningful contribution" dalam konteks produk kami dan bagaimana memastikan produk tidak disalahgunakan.
+
+## Decision
+
+Kami mengadopsi **Meaningful Contribution Philosophy** sebagai prinsip desain inti produk. Filosofi ini memiliki empat pilar:
+
+### Pilar 1: Authenticity
+
+Setiap aktivitas yang tercatat di Contribution Hub harus merepresentasikan pekerjaan developer yang autentik. Kami mendefinisikan aktivitas autentik sebagai:
+
+- **Kode yang ditulis**: Commit yang mengandung perubahan kode berarti (bukan whitespace, rename file tanpa perubahan, atau template boilerplate)
+- **Kode yang direview**: PR review dengan komentar substantif
+- **Diskusi teknis**: Issue/PR discussion yang mengandung kontribusi pemikiran
+- **Dokumentasi**: Perubahan dokumentasi yang menambah nilai
+
+### Pilar 2: Context
+
+Setiap aktivitas harus memiliki konteks yang jelas:
+
+- Commit message yang deskriptif (bukan "update" atau "fix")
+- PR dengan deskripsi yang jelas tentang apa dan mengapa
+- Issue dengan reproduksi langkah atau proposal yang jelas
+
+### Pilar 3: Progression
+
+Aktivitas harus menunjukkan progression:
+
+- Kode yang berkembang (bukan rewrite berulang)
+- Fitur yang selesai (bukan setengah jadi)
+- Bug yang diperbaiki (bukan introduced)
+- Pengetahuan yang bertambah (learning commits)
+
+### Pilar 4: Impact
+
+Aktivitas harus memiliki impact:
+
+- Digunakan oleh orang lain (downloads, stars, forks)
+- Membantu orang lain (answer, review, mentoring)
+- Membangun sesuatu yang berguna (bukan tutorial copy-paste)
+
+## Implementation Rules
+
+### What We Count
+
+| Aktivitas | Dihitung? | Syarat |
+| ---------------------------- | ----------- | ------------------------------------- |
+| Commit dengan perubahan kode | Ya | > 5 lines changed, meaningful message |
+| Commit dokumentasi | Ya | Menambah/memperbaiki dokumentasi |
+| PR dibuat | Ya | Dengan deskripsi meaningful |
+| PR review | Ya | Dengan komentar substantif |
+| Issue dibuat | Ya | Dengan deskripsi jelas |
+| Code review comment | Ya | Substantif, bukan "LGTM" saja |
+| Release | Ya | Dengan release notes |
+| Commit "fix typo" | Conditional | Hanya jika ada perubahan berarti |
+| Fork repository | Tidak | Tidak menunjukkan aktivitas |
+| Star repository | Tidak | Tidak menunjukkan aktivitas |
+| Commit di repository kosong | Tidak | Tidak meaningful |
+| Force push | Tidak | Sering untuk rewrite history |
+
+### Anti-Gaming Mechanisms
+
+1. **Minimum threshold**: Aktivitas harus melewati threshold minimum untuk dihitung (misal: commit harus mengubah minimal 5 baris kode)
+
+2. **Rate limiting**: Maksimum aktivitas yang bisa dicatat per jam untuk mencegah spam
+
+3. **Anomaly detection**: Deteksi pola mencurigakan (misal: 50 commit dalam 5 menit)
+
+4. **Manual flagging**: Pengguna bisa melaporkan aktivitas yang mencurigakan
+
+5. **Streak freeze, not streak hack**: Grace period untuk streak, bukan cara untuk memperpanjang streak artifisial
+
+### What We Never Do
+
+- Tidak pernah membuat commit atas nama pengguna
+- Tidak pernah generate aktivitas palsu
+- Tidak pernah memanipulasi statistik GitHub
+- Tidak pernah mendorong pengguna untuk membuat kontribusi artifisial
+- Tidak pernah menyembunyikan atau memfilter data untuk membuat profile terlihat lebih baik dari kenyataan
+
+## Consequences
+
+### Positive
+
+- Produk memiliki diferensiasi yang jelas dari GitHub automation tools lain
+- Membangun trust dengan pengguna yang peduli kualitas
+- Menarik pengguna yang tepat (quality-seekers, bukan spammer)
+- Fondasi etis yang kuat untuk pengembangan jangka panjang
+
+### Negative
+
+- Batasan ini mengurangi potensi pertumbuhan jumlah pengguna
+- Beberapa pengguna potensial akan memilih tools lain yang lebih "relaxed"
+- Perlu investasi lebih dalam deteksi dan filtering aktivitas
+- Kompleksitas teknis untuk membedakan meaningful vs non-meaningful activity
+
+### Neutral
+
+- Perlu edukasi pengguna tentang filosofi ini
+- Beberapa metrik engagement akan lebih rendah secara numerik
+- Tapi metrik kualitas (retensi, satisfaksi) seharusnya lebih tinggi
+
+## Alternatives Considered
+
+### Alternative 1: Tidak ada filter (hitung semua aktivitas)
+
+- Pros: Implementasi lebih sederhana, lebih banyak aktivitas tercatat
+- Cons: Rentan spam, tidak membedakan kualitas
+- **Ditolak** karena bertentangan dengan value produk
+
+### Alternative 2: Filter ketat (hanya commit kode)
+
+- Pros: Kualitas terjamin
+- Cons: Dokumentasi dan review tidak dihitung, tidak merepresentasikan aktivitas developer holistik
+- **Ditolak** karena terlalu sempit
+
+### Alternative 3: User-defined filters
+
+- Pros: Fleksibel untuk setiap pengguna
+- Cons: Kompleksitas tinggi, sulit konsisten antar pengguna
+- **Ditolak** karena akan menyebabkan inkonsistensi dan potensi penyalahgunaan
+
+## References
+
+- [ADR-001: Product Pivot](./adr-001-product-pivot-contribution-hub.md)
+- [Product Definition](../product/definition.md)
+- [Product Vision](../product/vision.md)
+- [Habit System Feature Spec](../product/features/habit-system.md)
diff --git a/.docs/ai/README.md b/.docs/ai/README.md
new file mode 100644
index 0000000..07126cf
--- /dev/null
+++ b/.docs/ai/README.md
@@ -0,0 +1,113 @@
+# ai/ -- AI Agent Collaboration Guide
+
+> Panduan kolaborasi antara developer dan AI coding agents.
+> Dibuat agar AI agents bisa bekerja efektif dan konsisten.
+
+---
+
+## Tujuan
+
+Folder ini berisi dokumentasi untuk memastikan AI agents (OpenCode, Claude, Copilot, dll.) dapat:
+
+- Memahami konteks project dengan cepat
+- Mengikuti coding standards yang sudah ditetapkan
+- Menghasilkan kode yang konsisten dengan arsitektur
+- Tidak melanggar boundaries yang sudah ditentukan
+- Berkolaborasi efektif dengan developer manusia
+
+---
+
+## Struktur yang Direkomendasikan
+
+```txt
+ai/
+├── README.md # File ini -- panduan folder
+├── agent-rules.md # Aturan umum untuk AI agents
+├── prompt-templates.md # Template prompt untuk task umum
+├── boundaries.md # Apa yang BOLEH dan TIDAK BOLEH dilakukan AI
+├── context-files.md # File yang harus dibaca AI untuk konteks
+└── review-checklist.md # Checklist untuk AI code review
+```
+
+---
+
+## Template Agent Rules
+
+```markdown
+# Agent Rule: [Judul]
+
+## Trigger
+
+[Kapan aturan ini berlaku]
+
+## Rule
+
+[Aturan yang harus diikuti]
+
+## Example
+
+[Contoh implementasi yang benar]
+
+## Anti-Example
+
+[Contoh yang salah]
+```
+
+---
+
+## AI Agent Boundaries
+
+### Boleh Dilakukan
+
+- Refactor kode (rename, extract, restructure)
+- Menulis unit test, integration test
+- Memperbaiki type errors
+- Menambah dokumentasi
+- Optimasi performa minor
+- Membuat komponen baru sesuai pattern existing
+
+### Tidak Boleh Dilakukan Tanpa Approval
+
+- Mengubah arsitektur inti
+- Menghapus folder atau file existing
+- Mengubah konfigurasi core (tsconfig, next.config)
+- Menambah dependencies baru
+- Mengubah API interface yang sudah dipakai
+- Melakukan migration database
+
+---
+
+## Prompt Convention
+
+Gunakan format berikut saat memberi instruksi ke AI agent:
+
+```markdown
+Task: [Deskripsi singkat]
+File: [Path file yang diubah]
+Pattern: [Referensi pattern yang sudah ada]
+Scope: [Batasan perubahan]
+Verify: [Command untuk verifikasi]
+```
+
+---
+
+## Context Hierarchy
+
+AI agents harus membaca file dalam urutan ini untuk memahami project:
+
+1. `AGENTS.md` -- General engineering handbook
+2. `CLAUDE.md` -- AI-specific instructions
+3. `.docs/ai/` -- AI collaboration guide
+4. `.docs/architecture/` -- Architecture documentation
+5. `.docs/engineering/` -- Coding standards
+6. Feature-specific documentation
+
+---
+
+## Best Practices
+
+1. **Selalu baca AGENTS.md** -- Ini adalah single source of truth untuk engineering practices
+2. **Gunakan template prompt** -- Memastikan instruksi jelas dan lengkap
+3. **Verifikasi output** -- Jangan trust output AI tanpa review
+4. **Update dokumentasi** -- Jika ada pattern baru, update dokumentasi AI
+5. **Report issues** -- Jika AI sering membuat kesalahan tertentu, catat di sini
diff --git a/.docs/ai/ai-collaboration.md b/.docs/ai/ai-collaboration.md
new file mode 100644
index 0000000..27ea8cf
--- /dev/null
+++ b/.docs/ai/ai-collaboration.md
@@ -0,0 +1,130 @@
+# AI Collaboration Rules
+
+> Aturan kolaborasi AI agent dengan codebase dan dependency usage.
+
+---
+
+## Sebelum Memulai Task
+
+AI agent WAJIB membaca dokumentasi berikut (urutan prioritas):
+
+1. `AGENTS.md` -- Engineering handbook root
+2. `.docs/AGENTS.md` -- Documentation center guide
+3. `.docs/architecture/system-overview.md` -- System architecture
+4. `.docs/architecture/folder-structure.md` -- Folder structure
+5. `.docs/technical/tech-stack.md` -- Tech stack & dependencies
+6. `.docs/engineering/engineering-principles.md` -- Engineering rules
+7. `.docs/ai/` -- AI collaboration guide (file ini)
+
+---
+
+## Dependency Usage Rules
+
+### React Query
+
+- Query keys: gunakan array `['resource', 'id']` convention
+- Stale time: minimal 30s untuk data yang jarang berubah
+- Gunakan `useSuspenseQuery` untuk data critical
+- Mutation: selalu handle `onError` dengan toast
+
+### Zustand
+
+- Store per feature, jangan store global raksasa
+- Slice pattern untuk store yang besar
+- Jangan fetch data di store -- itu tugas React Query
+- Store hanya untuk UI state dan client-only data
+
+### shadcn/ui
+
+- Install per-component, jangan bulk install
+- Jangan modify komponen shadcn secara langsung
+- Kustomisasi melalui `className` dan `cn()` utility
+- Contoh: `npx shadcn@latest add button dialog form`
+
+### React Hook Form
+
+- Gunakan `@hookform/resolvers/zod` untuk validasi
+- Form component terpisah dari page/logic
+- `useFormContext` untuk nested form components
+
+### next-intl
+
+- Gunakan `useTranslations()` untuk client components
+- Gunakan `getTranslations()` untuk server components
+- Jangan hardcode string, selalu gunakan message keys
+
+### next-themes
+
+- Gunakan `useTheme()` untuk akses theme
+- Theme toggle component di header/settings
+- CSS variables untuk dark mode styling
+
+---
+
+## AI Agent Boundaries
+
+### Boleh Dilakukan
+
+- Mengimplementasikan fitur dengan pattern yang sudah ada
+- Menambah komponen shadcn/ui baru
+- Menambah query/mutation dengan React Query
+- Membuat Zustand store untuk UI state
+- Menambah form dengan React Hook Form + Zod
+- Membuat provider wrapper baru
+- Refactor kecil (rename, extract, type fix)
+- Update dokumentasi
+
+### Tidak Boleh Dilakukan Tanpa Approval
+
+- Mengganti state management tool (React Query ke SWR, dll)
+- Mengganti library inti (shadcn ke MUI, dll)
+- Mengubah arsitektur provider
+- Menghapus folder atau file existing
+- Menambah dependencies baru tanpa dokumentasi
+- Mengubah konfigurasi core (tsconfig, tailwind.config, next.config)
+
+---
+
+## Prompt Convention
+
+```
+Task: [Deskripsi singkat]
+File: [Path file yang diubah]
+Pattern: [Referensi pattern yang sudah ada]
+Dependencies: [Package yang digunakan]
+Scope: [Batasan perubahan]
+Verify: [Command untuk verifikasi]
+```
+
+### Contoh
+
+```
+Task: Tambahkan form login
+File: src/features/auth/components/login-form.tsx
+Pattern: src/features/auth/components/register-form.tsx (existing)
+Dependencies: react-hook-form, zod, @tanstack/react-query
+Scope: Hanya file di src/features/auth/
+Verify: bun check-types && bun test
+```
+
+---
+
+## Review Checklist
+
+Setiap perubahan (terutama yang menggunakan dependencies baru) harus di-review:
+
+- [ ] Type error? (bun check-types)
+- [ ] Pattern konsisten dengan existing code?
+- [ ] Dependency digunakan dengan benar?
+- [ ] Error handling lengkap?
+- [ ] Loading/error states terhandle?
+- [ ] i18n string (bukan hardcode)?
+- [ ] Aksesibilitas terjaga?
+- [ ] Test passing?
+
+---
+
+## Related Documents
+
+- [Prompting Guidelines](./prompting-guidelines.md)
+- [Engineering Principles](../engineering/engineering-principles.md)
diff --git a/.docs/ai/prompting-guidelines.md b/.docs/ai/prompting-guidelines.md
new file mode 100644
index 0000000..e912cb0
--- /dev/null
+++ b/.docs/ai/prompting-guidelines.md
@@ -0,0 +1,161 @@
+# Prompting Guidelines
+
+> Panduan memberikan instruksi yang efektif ke AI agent.
+
+---
+
+## Prompt Structure
+
+Setiap prompt ke AI agent harus mencakup 5 elemen:
+
+```
+Task: [Satu kalimat deskriptif]
+File: [Exact path file yang diubah/dibuat]
+Pattern: [Reference ke pattern existing yang harus diikuti]
+Scope: [Batasan jelas -- file/folder mana saja]
+Verify: [Command untuk memverifikasi hasil]
+```
+
+---
+
+## Prompt Examples
+
+### Example 1: Menambah fitur dengan React Query
+
+```
+Task: Tambahkan halaman daftar user dengan data fetching
+File: src/features/users/page.tsx
+Pattern: src/features/posts/page.tsx (useSuspenseQuery pattern)
+Dependencies: @tanstack/react-query
+Scope: src/features/users/
+Exclude: Jangan ubah komponen existing di src/components/
+Verify: bun check-types
+```
+
+### Example 2: Form dengan React Hook Form + Zod
+
+```
+Task: Buat form edit profil
+File: src/features/profile/components/edit-form.tsx
+Pattern: src/features/auth/components/login-form.tsx (RHF + Zod pattern)
+Dependencies: react-hook-form, zod, @hookform/resolvers
+Scope: src/features/profile/
+Verify: bun check-types && bun test
+```
+
+### Example 3: Provider wrapper baru
+
+```
+Task: Buat AnalyticsProvider wrapper
+File: src/components/providers/analytics-provider.tsx
+Pattern: src/components/providers/theme-provider.tsx (provider pattern)
+Scope: src/components/providers/ + update app/layout.tsx
+Verify: bun check-types
+```
+
+---
+
+## Anti-Patterns (Jangan Lakukan)
+
+### ❌ Prompt terlalu abstrak
+
+```
+Buat fitur login. // Terlalu abstrak, tidak ada detail implementasi
+```
+
+### ❌ Prompt tanpa referensi pattern
+
+```
+Buat form di halaman user. // Agent tidak tahu pattern form yang dipakai
+```
+
+### ❌ Prompt tanpa scope
+
+```
+Tambahin state management. // Tidak jelas store baru atau modifikasi existing
+```
+
+### ❌ Prompt tanpa verification
+
+```
+Benerin error di halaman. // Tidak jelas cara memverifikasi perbaikan
+```
+
+---
+
+## Prompt Templates
+
+### New Feature
+
+```
+Task: Tambahkan [fitur] di halaman [page]
+File: [path]
+Pattern: [reference path]
+Dependencies: [daftar package]
+Scope: [batasan folder]
+Verify: [bun check-types, bun test, dll]
+```
+
+### Bug Fix
+
+```
+Task: Fix [bug description]
+File: [path where bug exists]
+Root Cause: [analyzed root cause]
+Pattern: [how similar bugs were fixed]
+Scope: [files to modify]
+Verify: [bun check-types, manual test scenario]
+```
+
+### Refactor
+
+```
+Task: Refactor [component/hook]
+File: [path]
+Goal: [what the refactor achieves]
+Preserve: [behavior that must NOT change]
+Pattern: [reference pattern]
+Scope: [files affected]
+Verify: [existing tests pass, no type errors]
+```
+
+---
+
+## Provider & Refactor Guidelines
+
+### Saat Membuat Provider Baru
+
+1. Buat wrapper component di `src/components/providers/`
+2. Gunakan `'use client'`
+3. Props: minimal `{ children: React.ReactNode }`
+4. Export dari `src/components/providers/index.ts`
+5. Tambahkan di `app/providers.tsx` dengan urutan yang tepat
+
+### Saat Refactor
+
+1. Jangan ubah API interface yang sudah dipakai
+2. Ekstrak logic ke custom hook, jangan simpan di komponen
+3. Pastikan test tetap passing
+4. Update barrel exports (index.ts) jika ada file baru
+5. Update AGENTS.md dan dokumentasi jika perlu
+
+---
+
+## Context Files
+
+Sebelum memulai task besar, baca file berikut:
+
+| File | Why |
+| --------------------------------------------- | ----------------------- |
+| `src/app/providers.tsx` | Provider nesting order |
+| `src/config/env.ts` | Environment variables |
+| `src/features/[x]/index.ts` | Public API feature |
+| `src/components/ui/index.ts` | Available UI components |
+| `.docs/engineering/engineering-principles.md` | Engineering rules |
+
+---
+
+## Related Documents
+
+- [AI Collaboration Rules](./ai-collaboration.md)
+- [Engineering Principles](../engineering/engineering-principles.md)
diff --git a/.docs/api/README.md b/.docs/api/README.md
new file mode 100644
index 0000000..e1b1058
--- /dev/null
+++ b/.docs/api/README.md
@@ -0,0 +1,119 @@
+# api/ -- Dokumentasi API
+
+> API endpoints, request/response schemas, integrasi eksternal.
+
+---
+
+## Tujuan
+
+Folder ini berisi dokumentasi API yang mencakup:
+
+- REST API endpoints dan spesifikasinya
+- Request/response schemas
+- Authentication dan authorization untuk setiap endpoint
+- Error codes dan error responses
+- Rate limiting dan throttling
+- Integrasi dengan third-party services
+- API versioning strategy
+
+---
+
+## Struktur yang Direkomendasikan
+
+```txt
+api/
+├── README.md # File ini -- panduan folder
+├── overview.md # API overview, base URL, auth
+├── endpoints/ # Dokumentasi per endpoint
+│ ├── auth.md
+│ ├── users.md
+│ └── ...
+├── errors.md # Standard error codes
+├── webhooks.md # Webhook documentation
+├── third-party.md # Third-party API integrations
+└── changelog.md # API changelog
+```
+
+---
+
+## Template Endpoint Documentation
+
+```markdown
+# [METHOD] /api/[path]
+
+## Description
+
+[Penjelasan endpoint]
+
+## Authentication
+
+[Required auth type]
+
+## Request
+
+### Headers
+
+| Header | Value | Required |
+| ------ | ----- | -------- |
+| | | |
+
+### Query Parameters
+
+| Parameter | Type | Required | Default | Description |
+| --------- | ---- | -------- | ------- | ----------- |
+| | | | | |
+
+### Request Body
+
+\`\`\`json
+{
+"field": "value"
+}
+\`\`\`
+
+## Response
+
+### Success (200)
+
+\`\`\`json
+{
+"data": {}
+}
+\`\`\`
+
+### Error (4xx/5xx)
+
+\`\`\`json
+{
+"error": {
+"code": "ERROR_CODE",
+"message": "Human readable message"
+}
+}
+\`\`\`
+
+## Example
+
+\`\`\`bash
+curl -X [METHOD] https://api.example.com/[path] \
+ -H "Authorization: Bearer [token]"
+\`\`\`
+```
+
+---
+
+## Best Practices
+
+1. **Consistent response format** -- Semua response harus format yang konsisten
+2. **Version your API** -- Gunakan prefix `/api/v1/`, `/api/v2/`
+3. **Document errors** -- Setiap endpoint harus mendokumentasikan error codes
+4. **Use Zod schemas** -- Dokumentasi API bisa digenerate dari Zod schemas
+5. **Keep docs updated** -- API docs harus sinkron dengan implementasi
+
+---
+
+## Tools
+
+- **API Route Handler** -- Semua API route di `src/app/api/`
+- **Zod** -- Validasi request/response dengan Zod schemas
+- **OpenAPI/Swagger** -- Untuk auto-generated API documentation (jika diperlukan)
diff --git a/.docs/api/api-guidelines.md b/.docs/api/api-guidelines.md
new file mode 100644
index 0000000..91fe4fe
--- /dev/null
+++ b/.docs/api/api-guidelines.md
@@ -0,0 +1,261 @@
+# API Guidelines
+
+> Panduan API development, React Query strategy, dan endpoint design.
+
+---
+
+## API Architecture
+
+### Routes
+
+```
+src/app/api/[resource]/route.ts # REST API endpoints
+src/app/api/[resource]/[id]/route.ts
+```
+
+### Data Fetching
+
+```
+src/lib/api-client.ts # Centralized HTTP client
+src/features/[feature]/api/ # Feature-specific API functions
+```
+
+---
+
+## React Query Strategy
+
+### Query Key Convention
+
+```tsx
+// Format: ['resource', ...identifiers, ...filters]
+const keys = {
+ posts: {
+ all: ["posts"] as const,
+ list: (filters?: PostFilters) => ["posts", "list", filters] as const,
+ detail: (id: string) => ["posts", "detail", id] as const
+ },
+ users: {
+ all: ["users"] as const,
+ list: (filters?: UserFilters) => ["users", "list", filters] as const,
+ detail: (id: string) => ["users", "detail", id] as const
+ }
+}
+```
+
+### Default Config
+
+```tsx
+const queryClient = new QueryClient({
+ defaultOptions: {
+ queries: {
+ staleTime: 1000 * 60 * 5, // 5 menit
+ gcTime: 1000 * 60 * 30, // 30 menit garbage collection
+ retry: 1,
+ refetchOnWindowFocus: false // Matikan untuk development
+ }
+ }
+})
+```
+
+### Query Patterns
+
+```tsx
+// ✅ RSC Pattern (server component)
+async function PostsPage() {
+ const posts = await fetch("/api/posts").then((r) => r.json())
+ return
+}
+
+// ✅ Client Pattern dengan React Query
+function usePosts(filters?: PostFilters) {
+ return useQuery({
+ queryKey: keys.posts.list(filters),
+ queryFn: () => getPosts(filters),
+ select: (data) => data.items // Transform response
+ })
+}
+
+// ✅ Infinite Query untuk pagination
+function useInfinitePosts() {
+ return useInfiniteQuery({
+ queryKey: keys.posts.all,
+ queryFn: ({ pageParam }) => getPosts({ page: pageParam }),
+ initialPageParam: 1,
+ getNextPageParam: (last) => last.nextPage
+ })
+}
+```
+
+### Mutation Patterns
+
+```tsx
+// ✅ Standard mutation
+function useCreatePost() {
+ const queryClient = useQueryClient()
+
+ return useMutation({
+ mutationFn: createPost,
+ onSuccess: () => {
+ queryClient.invalidateQueries({ queryKey: keys.posts.all })
+ toast.success("Post berhasil dibuat")
+ },
+ onError: (error) => {
+ toast.error(error.message)
+ }
+ })
+}
+
+// ✅ Optimistic update
+function useUpdatePost() {
+ const queryClient = useQueryClient()
+
+ return useMutation({
+ mutationFn: updatePost,
+ onMutate: async (updated) => {
+ await queryClient.cancelQueries({
+ queryKey: keys.posts.detail(updated.id)
+ })
+ const previous = queryClient.getQueryData(keys.posts.detail(updated.id))
+ queryClient.setQueryData(keys.posts.detail(updated.id), updated)
+ return { previous }
+ },
+ onError: (err, vars, context) => {
+ queryClient.setQueryData(keys.posts.detail(vars.id), context?.previous)
+ toast.error("Gagal update")
+ },
+ onSettled: () => {
+ queryClient.invalidateQueries({ queryKey: keys.posts.all })
+ }
+ })
+}
+```
+
+---
+
+## API Endpoint Design
+
+### Standard Response Format
+
+```tsx
+// Success
+{
+ "data": T | T[],
+ "meta"?: {
+ "total": number,
+ "page": number,
+ "pageSize": number
+ }
+}
+
+// Error
+{
+ "error": {
+ "code": "VALIDATION_ERROR",
+ "message": "Human readable message",
+ "details"?: ZodError[]
+ }
+}
+```
+
+### Endpoint Structure
+
+```tsx
+// src/app/api/posts/route.ts
+export async function GET(req: NextRequest) {
+ const searchParams = req.nextUrl.searchParams
+ const schema = z.object({
+ page: z.coerce.number().default(1),
+ limit: z.coerce.number().default(10)
+ })
+
+ const parsed = schema.safeParse(Object.fromEntries(searchParams))
+ if (!parsed.success) {
+ return NextResponse.json(
+ {
+ error: {
+ code: "VALIDATION_ERROR",
+ message: "Invalid params",
+ details: parsed.error
+ }
+ },
+ { status: 400 }
+ )
+ }
+
+ const data = await getPosts(parsed.data)
+ return NextResponse.json({ data })
+}
+
+export async function POST(req: NextRequest) {
+ const body = await req.json()
+ const schema = z.object({
+ title: z.string().min(1).max(200),
+ content: z.string().min(1)
+ })
+
+ const parsed = schema.safeParse(body)
+ if (!parsed.success) {
+ return NextResponse.json(
+ { error: { code: "VALIDATION_ERROR", message: "Invalid input" } },
+ { status: 400 }
+ )
+ }
+
+ const post = await createPost(parsed.data)
+ return NextResponse.json({ data: post }, { status: 201 })
+}
+```
+
+---
+
+## Server Actions
+
+Untuk form submission, prioritaskan Server Actions:
+
+```tsx
+// ✅ Standard Server Action
+"use server"
+
+import { z } from "zod"
+
+const schema = z.object({
+ email: z.string().email(),
+ password: z.string().min(8)
+})
+
+export async function login(prev: any, formData: FormData) {
+ const parsed = schema.safeParse({
+ email: formData.get("email"),
+ password: formData.get("password")
+ })
+
+ if (!parsed.success) {
+ return { error: "Input tidak valid", issues: parsed.error.issues }
+ }
+
+ try {
+ await authService.login(parsed.data)
+ return { success: true }
+ } catch (error) {
+ return { error: "Login gagal" }
+ }
+}
+```
+
+---
+
+## API Security
+
+- Validasi input dengan Zod di semua entry point
+- Rate limiting untuk endpoint publik
+- CORS configuration yang tepat
+- Authentication check di setiap protected endpoint
+- Jangan expose internal IDs ke client
+
+---
+
+## Related Documents
+
+- [System Overview](../architecture/system-overview.md)
+- [Engineering Principles](../engineering/engineering-principles.md)
+- [Security Baseline](../security/security-baseline.md)
diff --git a/.docs/architecture/README.md b/.docs/architecture/README.md
new file mode 100644
index 0000000..f6f09e6
--- /dev/null
+++ b/.docs/architecture/README.md
@@ -0,0 +1,97 @@
+# architecture/ -- Dokumentasi Arsitektur
+
+> System architecture, data flow, module boundaries, dan architectural patterns.
+
+---
+
+## Tujuan
+
+Folder ini berisi dokumentasi arsitektur yang mencakup:
+
+- High-level system architecture
+- Module boundaries dan dependency graph
+- Data flow diagrams
+- Component hierarchy
+- State management architecture
+- API architecture dan integration patterns
+- Error handling strategy
+- Performance architecture
+
+---
+
+## Struktur yang Direkomendasikan
+
+```txt
+architecture/
+├── README.md # File ini -- panduan folder
+├── overview.md # High-level architecture overview
+├── module-boundaries.md # FSD module boundaries dan dependency rules
+├── data-flow.md # Data flow diagrams dan penjelasan
+├── state-management.md # State management architecture
+├── error-handling.md # Error handling strategy
+├── performance.md # Performance architecture decisions
+└── diagrams/ # Architecture diagrams (Mermaid, Excalidraw)
+```
+
+---
+
+## Template Architecture Document
+
+```markdown
+# [Architecture Concern]
+
+## Context
+
+[Latar belakang dan problem statement]
+
+## Decision
+
+[Keputusan arsitektur yang diambil]
+
+## Rationale
+
+[Mengapa memilih pendekatan ini]
+
+## Consequences
+
+[Dampak positif dan negatif dari keputusan ini]
+
+## Diagram
+
+[Link atau embed diagram arsitektur]
+```
+
+---
+
+## Architecture Principles
+
+1. **Separation of Concerns** -- Pisahkan UI, logic, state, dan API
+2. **Dependency Inversion** -- Module abstrak tidak boleh dependen pada module konkret
+3. **Explicit Boundaries** -- Batas module harus jelas dan ditegakkan
+4. **Loose Coupling** -- Module harus bisa berubah secara independen
+5. **High Cohesion** -- Module harus berisi hal-hal yang saling terkait
+6. **Consistent Patterns** -- Gunakan pola yang sama untuk masalah yang sama
+
+---
+
+## Feature-Sliced Design (FSD) Layers
+
+```
+app/ -- Entry point, routing, global layout
+├── processes/ -- Business processes (multi-step)
+├── pages/ -- Halaman aplikasi (composed dari features)
+├── features/ -- Feature modules (self-contained)
+├── entities/ -- Business entities
+└── shared/ -- Shared UI, lib, API, config
+```
+
+Lihat dokumentasi FSD di `AGENTS.md` untuk detail lebih lanjut.
+
+---
+
+## Tools for Architecture Documentation
+
+- **Mermaid.js** -- Diagram sebagai kode (sequence, flow, class)
+- **Excalidraw** -- Whiteboard-style diagrams (simpan di `diagrams/`)
+- **PlantUML** -- Text-based UML diagrams
+- **SVG** -- Untuk diagram statis yang complex
diff --git a/.docs/architecture/folder-structure.md b/.docs/architecture/folder-structure.md
new file mode 100644
index 0000000..bb37535
--- /dev/null
+++ b/.docs/architecture/folder-structure.md
@@ -0,0 +1,122 @@
+# Folder Structure
+
+> Struktur folder project berdasarkan Feature-Sliced Design (FSD).
+
+---
+
+## Root Structure
+
+```
+src/
+├── app/ # Next.js App Router pages & layouts
+├── components/ # Shared components
+│ ├── ui/ # shadcn/ui atomic components
+│ ├── layouts/ # Header, footer, sidebar, container
+│ ├── widgets/ # Cards, modals, data tables
+│ └── providers/ # Theme, Query, Auth providers
+├── config/ # Env, site config, navigation
+├── constants/ # Global constants, magic numbers
+├── data/ # Static data, lookup tables
+├── features/ # Feature-Sliced Design modules
+│ └── [feature]/
+│ ├── api/ # API calls + hooks untuk fitur
+│ ├── components/ # Komponen spesifik fitur
+│ ├── hooks/ # Hooks spesifik fitur
+│ ├── stores/ # Zustand stores spesifik fitur
+│ ├── types/ # Types spesifik fitur
+│ └── utils/ # Utilities spesifik fitur
+├── hooks/ # Generic reusable hooks
+├── i18n/ # next-intl config & messages
+├── lib/ # Third-party integrations
+├── styles/ # Global CSS, variables
+├── testing/ # Test setup & utilities
+├── types/ # Global type definitions
+└── utils/ # Pure utility functions
+```
+
+---
+
+## Provider Structure
+
+```
+src/components/providers/
+├── query-provider.tsx # React Query provider
+├── theme-provider.tsx # next-themes provider
+├── i18n-provider.tsx # next-intl provider
+├── auth-provider.tsx # Auth session provider
+└── index.ts # Composed providers export
+```
+
+Nesting order di `app/layout.tsx`:
+
+```tsx
+
+
+
+ {children}
+
+
+
+```
+
+---
+
+## Hooks Structure
+
+```
+src/hooks/
+├── use-debounce.ts # Debounce value
+├── use-media-query.ts # Responsive breakpoint
+├── use-local-storage.ts # Persisted state
+├── use-intersection-observer.ts # Scroll detection
+└── index.ts
+```
+
+Feature-specific hooks → `src/features/[feature]/hooks/`
+
+---
+
+## Store Structure (Zustand)
+
+```
+src/features/[feature]/stores/
+├── [feature]-store.ts # Zustand store
+└── index.ts
+```
+
+Global stores jika ada → `src/stores/`
+
+---
+
+## Dependency Flow
+
+```
+app/ (routing, layout)
+ │
+ ▼
+components/ (UI, layout, widgets, providers)
+ │
+ ├──▶ features/ (FSD modules)
+ │ │
+ │ └──▶ api/, hooks/, stores/, types/, utils/
+ │
+ ├──▶ hooks/ (generic)
+ ├──▶ utils/ (pure functions)
+ ├──▶ lib/ (integrations)
+ ├──▶ config/ + constants/ + data/
+ └──▶ types/ (global)
+```
+
+**Rules:**
+
+- features/ tidak boleh import features/ lain secara langsung
+- app/ hanya import komponen, bukan implementasi detail
+- utils/ harus pure -- tidak boleh import dari folder lain kecuali types/constants
+- hooks/ tidak boleh import dari features/ atau components/
+
+---
+
+## Related Documents
+
+- [System Overview](./system-overview.md)
+- [Tech Stack](../technical/tech-stack.md)
diff --git a/.docs/architecture/product-architecture.md b/.docs/architecture/product-architecture.md
new file mode 100644
index 0000000..1b2a0b0
--- /dev/null
+++ b/.docs/architecture/product-architecture.md
@@ -0,0 +1,255 @@
+# Product Architecture -- Contribution Hub
+
+> Bagaimana product direction Contribution Hub memetakan ke arsitektur sistem berbasis FSD.
+
+---
+
+## Domain Model
+
+### Core Entities
+
+```typescript
+// Entitas inti dalam domain Contribution Hub
+User — Developer yang menggunakan platform
+Activity — Aktivitas coding (commit, PR, issue, review)
+Repository — Repository GitHub yang dilacak
+Streak — Data streak dan konsistensi
+Goal — Target harian/mingguan pengguna
+Summary — Daily/weekly activity summary
+Badge — Achievement badges
+```
+
+### Entity Relationships
+
+```
+User (1) ──── (N) Activity
+User (1) ──── (N) Repository
+User (1) ──── (1) Streak
+User (1) ──── (N) Goal
+User (1) ──── (N) Summary
+User (1) ──── (N) Badge
+Repository (1) ──── (N) Activity
+```
+
+---
+
+## Feature Modules Mapping (FSD)
+
+Setiap fitur Contribution Hub akan diimplementasikan sebagai FSD module di `src/features/`:
+
+### Fase 1 Features
+
+```
+src/features/
+├── auth/ # Better Auth integration (GitHub OAuth)
+│ ├── api/ # auth API calls
+│ ├── components/ # login button, auth guard
+│ ├── hooks/ # use-session, use-auth
+│ └── types/ # auth types
+│
+├── activity/ # GitHub Activity Tracking
+│ ├── api/ # GitHub sync, activity CRUD
+│ ├── components/ # activity timeline, activity card
+│ ├── hooks/ # use-activity-feed, use-activity-stats
+│ ├── stores/ # activity filter state
+│ ├── types/ # activity types
+│ └── utils/ # activity deduplication, categorization
+│
+├── dashboard/ # Personal Dashboard
+│ ├── components/ # stats cards, charts, overview
+│ ├── hooks/ # use-dashboard-data
+│ └── types/ # dashboard types
+│
+├── habits/ # Developer Habit System
+│ ├── api/ # streak API, goal CRUD
+│ ├── components/ # streak display, goal tracker, progress bar
+│ ├── hooks/ # use-streak, use-goals
+│ ├── stores/ # habit config state
+│ ├── types/ # streak, goal types
+│ └── utils/ # streak calculation algorithm
+│
+├── documentation/ # Auto-Documentation
+│ ├── api/ # summary CRUD, generation trigger
+│ ├── components/ # daily summary card, weekly report
+│ ├── hooks/ # use-summary, use-weekly-report
+│ ├── types/ # summary types
+│ └── utils/ # narrative generation, markdown builder
+│
+└── profile/ # GitHub Profile Enhancer
+ ├── api/ # badge generation, profile deploy
+ ├── components/ # badge display, profile preview
+ ├── hooks/ # use-profile-config
+ ├── stores/ # profile config state
+ ├── types/ # badge, profile types
+ └── utils/ # badge SVG generation
+
+src/components/
+├── ui/ # shadcn/ui components (shared)
+├── layouts/ # App shell, sidebar, header
+├── widgets/ # ActivityCard, StreakBadge, StatsCard
+└── providers/ # QueryProvider, AuthProvider, ThemeProvider
+```
+
+---
+
+## Data Flow Architecture
+
+### Activity Sync Flow
+
+```
+GitHub API
+ │ (polling setiap 15 menit)
+ ▼
+Background Job (api/cron/route.ts)
+ │ Fetch events since last_sync
+ │
+ ▼
+Activity Service (src/features/activity/api/)
+ │ Deduplication logic
+ │ Kategorisasi aktivitas
+ │
+ ├── Store di database (PostgreSQL)
+ │
+ ▼
+Cache Invalidation
+ │ React Query cache di-invalidate
+ │
+ ▼
+UI Update (Real-time via React Query refetch)
+```
+
+### Streak Calculation Flow
+
+```
+Daily Cron (23:59)
+ │
+ ▼
+Streak Service
+ │ Ambil aktivitas hari ini
+ │ Validasi qualifying activity
+ │ Hitung streak dengan grace period
+ │
+ ├── Update streak data
+ ├── Cek milestone achievement
+ └── Generate notification jika streak berubah
+```
+
+### Documentation Generation Flow
+
+```
+Daily Summary Cron (23:59)
+ │
+ ▼
+Summary Generator
+ │ Aggregate aktivitas harian
+ │ Parse commit messages
+ │ Generate narrative
+ │
+ ├── Simpan daily summary
+ │
+ ▼
+User Notification (opsional)
+ │ Toast / Email digest
+```
+
+---
+
+## Shared Layer Dependencies
+
+### Shared Hooks (`src/hooks/`)
+
+| Hook | Fungsi | Feature Consumers |
+| ----------------- | ---------------------- | ------------------- |
+| use-debounce | Debounce value | activity, dashboard |
+| use-media-query | Responsive breakpoints | dashboard, habits |
+| use-local-storage | Persisted client state | habits, profile |
+| use-interval | Polling interval | activity |
+
+### Shared Utils (`src/utils/`)
+
+| Util | Fungsi | Feature Consumers |
+| ---------------- | ----------------------- | ------------------- |
+| format-date | Date formatting | Semua feature |
+| cn | Tailwind class merging | Semua feature |
+| activity-helpers | Activity categorization | activity, dashboard |
+| streak-calc | Streak algorithm | habits |
+
+### Shared Types (`src/types/`)
+
+| Type | Description |
+| ---------- | ----------------------- |
+| Activity | Base activity type |
+| Repository | Repository type |
+| Streak | Streak data type |
+| Goal | Goal configuration type |
+
+---
+
+## State Management Strategy
+
+| State Type | Tool | Scope |
+| -------------------- | ----------------- | ---------------------------------- |
+| GitHub Activity Data | React Query | Server state (cache sync results) |
+| Streak & Goal Data | React Query | Server state (read mostly) |
+| Dashboard Stats | React Query | Server state (aggregated) |
+| Filter/Sort State | Zustand | UI state (activity filters) |
+| Habit Config | Zustand + persist | Client state (user preferences) |
+| Profile Config | Zustand + persist | Client state (display preferences) |
+| URL State | Next.js Router | Page params, search params |
+
+---
+
+## API Architecture
+
+### External Integrations
+
+| Service | Integration | Authentication |
+| ------------ | -------------------------- | -------------- |
+| GitHub API | REST API via @octokit/rest | OAuth token |
+| GitHub OAuth | Better Auth plugin | OAuth flow |
+
+### Internal API Routes
+
+| Endpoint | Method | Feature |
+| ------------------------ | --------- | ------------- |
+| /api/activities | GET, POST | activity |
+| /api/activities/sync | POST | activity |
+| /api/activities/stats | GET | dashboard |
+| /api/streaks | GET | habits |
+| /api/goals | GET, PUT | habits |
+| /api/summaries/daily | GET, PUT | documentation |
+| /api/summaries/weekly | GET | documentation |
+| /api/profile/config | GET, PUT | profile |
+| /api/profile/badge/:type | GET | profile |
+
+---
+
+## Background Jobs
+
+| Job | Schedule | Service |
+| ------------------------ | -------------------- | ----------------------- |
+| GitHub Activity Sync | Every 15 min | Vercel Cron / node-cron |
+| Daily Streak Update | 23:59 daily | node-cron |
+| Daily Summary Generation | 23:59 daily | node-cron |
+| Weekly Report Generation | Sunday 23:59 | node-cron |
+| Profile README Update | Daily (configurable) | GitHub Actions |
+
+---
+
+## Security Considerations
+
+- GitHub OAuth tokens disimpan encrypted
+- Tidak menyimpan data repository private secara permanen
+- Rate limiting untuk API endpoints
+- Data ekspor hanya dengan izin pengguna
+- Privacy-first: pengguna bisa delete semua data kapan saja
+
+---
+
+## Related Documents
+
+- [System Overview](./system-overview.md)
+- [Folder Structure](./folder-structure.md)
+- [Tech Stack](../technical/tech-stack.md)
+- [Product Definition](../product/definition.md)
+- [ADR-001: Product Pivot](../adr/adr-001-product-pivot-contribution-hub.md)
diff --git a/.docs/architecture/system-overview.md b/.docs/architecture/system-overview.md
new file mode 100644
index 0000000..b55b48a
--- /dev/null
+++ b/.docs/architecture/system-overview.md
@@ -0,0 +1,125 @@
+# System Overview
+
+> Arsitektur sistem, provider architecture, dan application flow.
+
+---
+
+## High-Level Architecture
+
+```
+Client (Browser)
+ │
+ ▼
+Next.js App Router (RSC + RCC)
+ │
+ ├── Providers Layer
+ │ ├── ThemeProvider (next-themes)
+ │ ├── QueryProvider (React Query)
+ │ ├── AuthProvider (auth context)
+ │ └── I18nProvider (next-intl)
+ │
+ ├── Feature Modules (FSD)
+ │ ├── features/auth/
+ │ ├── features/profile/
+ │ └── features/content/
+ │
+ ├── Shared Layer
+ │ ├── components/ui/ (shadcn)
+ │ ├── components/layouts/
+ │ ├── components/widgets/
+ │ ├── hooks/
+ │ └── utils/
+ │
+ └── API Layer
+ ├── Server Actions
+ ├── Route Handlers (app/api/)
+ └── External Services (src/lib/)
+```
+
+---
+
+## Provider Architecture
+
+Provider nesting order (dari root layout):
+
+```tsx
+// src/app/providers.tsx
+
+ {" "}
+ // 1. Server state (React Query)
+
+ {" "}
+ // 2. Theme (next-themes)
+
+ {" "}
+ // 3. i18n (next-intl)
+
+ {" "}
+ // 4. Auth (kustom)
+ {children}
+
+
+
+
+```
+
+### Provider Responsibilities
+
+| Provider | Package | Responsibility |
+| ------------- | --------------------- | ------------------------------------------------------- |
+| QueryProvider | @tanstack/react-query | Server state caching, deduplication, optimistic updates |
+| ThemeProvider | next-themes | Dark/light mode, system preference, persistence |
+| I18nProvider | next-intl | Locale detection, translations, formatting |
+| AuthProvider | kustom (Better Auth) | Session management, user context |
+
+### Rules
+
+- Provider tidak boleh mengandung business logic
+- Provider tidak boleh render UI visual
+- Provider harus pure wrapper component
+- Setiap provider harus registered di root layout
+
+---
+
+## Application Flow
+
+### Data Flow Pattern
+
+```
+User Action
+ → Client Component (event handler)
+ → React Query / Server Action
+ → API Route / External Service
+ → Response
+ ← Cache update
+ ← UI re-render
+ ← User sees result
+```
+
+### State Management Strategy
+
+| State Type | Tool | Scope |
+| ------------ | --------------- | ------------------------------------- |
+| Server state | React Query | Data dari API, cache, pagination |
+| Client state | Zustand | UI state, preferences, form data |
+| URL state | Next.js Router | Query params, pathname, search params |
+| Form state | React Hook Form | Form fields, validation, submission |
+| Theme state | next-themes | Dark/light mode |
+
+---
+
+## Key Architecture Decisions
+
+1. **RSC by default** -- Gunakan Server Components kecuali butuh interaktivitas
+2. **Client boundary** -- 'use client' di leaf components, bukan di layout
+3. **Data fetching** -- React Query untuk client-side, Server Actions untuk mutations
+4. **Form handling** -- React Hook Form + Zod untuk validasi
+5. **i18n** -- next-intl dengan locale detection otomatis
+
+---
+
+## Related Documents
+
+- [Folder Structure](./folder-structure.md)
+- [Tech Stack](../technical/tech-stack.md)
+- [State Management Rules](../engineering/engineering-principles.md)
diff --git a/.docs/deployment/README.md b/.docs/deployment/README.md
new file mode 100644
index 0000000..aba731d
--- /dev/null
+++ b/.docs/deployment/README.md
@@ -0,0 +1,93 @@
+# deployment/ -- Dokumentasi Deployment
+
+> Deployment pipeline, environments, infrastructure, dan operations untuk Contribution Hub.
+
+---
+
+## Tujuan
+
+Folder ini berisi dokumentasi deployment untuk Contribution Hub yang mencakup:
+
+- Deployment pipeline Vercel + GitHub Actions
+- Environment management (development, staging, production)
+- Database migration strategy
+- Background job monitoring
+- Monitoring dan alerting (Sentry, Vercel Analytics)
+- Rollback procedures
+- Domain dan DNS configuration (contribution-hub.dev)
+
+---
+
+## Struktur yang Direkomendasikan
+
+```txt
+deployment/
+├── README.md # File ini -- panduan folder
+├── pipeline.md # Deployment pipeline overview
+├── environments.md # Environment configuration
+├── monitoring.md # Monitoring dan alerting setup
+├── backup.md # Backup dan recovery procedures
+├── domains.md # Domain, DNS, SSL configuration
+└── runbooks.md # Operational runbooks
+```
+
+---
+
+## Template Pipeline Documentation
+
+```markdown
+# Deployment Pipeline
+
+## Trigger
+
+[Kapan pipeline dijalankan]
+
+## Stages
+
+### Stage 1: [Nama]
+
+- **Action:** [Apa yang terjadi]
+- **Tools:** [Tools yang digunakan]
+- **Expected duration:** [Durasi perkiraan]
+
+### Stage 2: [Nama]
+
+...
+
+## Artifacts
+
+[Apa yang dihasilkan dari pipeline]
+
+## Environment Variables
+
+[Env vars yang dibutuhkan di pipeline]
+```
+
+---
+
+## Environment Strategy
+
+| Environment | Purpose | Deploy Trigger | URL |
+| ----------- | ------------------- | -------------- | ------------------- |
+| Development | Daily development | Manual / auto | localhost |
+| Staging | Integration testing | Push ke branch | staging.example.com |
+| Production | Live | Tag/release | example.com |
+
+---
+
+## Deployment Principles
+
+1. **Automate everything** -- Tidak ada manual steps dalam deployment
+2. **Idempotent** -- Deployment yang sama harus menghasilkan hasil yang sama
+3. **Rollback ready** -- Setiap deployment harus bisa di-rollback dengan mudah
+4. **Zero downtime** -- Gunakan blue-green atau rolling deployment
+5. **Immutable infrastructure** -- Jangan modify server langsung, deploy ulang
+
+---
+
+## Tools Umum
+
+- **Vercel** -- Next.js hosting (default)
+- **GitHub Actions** -- CI/CD pipeline
+- **Docker** -- Containerization (jika diperlukan)
+- **Terraform / Pulumi** -- Infrastructure as Code (jika diperlukan)
diff --git a/.docs/deployment/pipeline.md b/.docs/deployment/pipeline.md
new file mode 100644
index 0000000..0ea91e5
--- /dev/null
+++ b/.docs/deployment/pipeline.md
@@ -0,0 +1,176 @@
+# Deployment Pipeline -- Contribution Hub
+
+> Pipeline deployment, environment strategy, dan infrastructure configuration.
+
+---
+
+## Deployment Platform
+
+**Primary: Vercel** (Next.js optimization, edge functions, analytics)
+
+**Secondary: GitHub Pages** (documentation site)
+
+## Pipeline Overview
+
+```
+Push ke main branch
+ │
+ ▼
+GitHub Actions: Quality Gates
+ ├── TypeScript check (tsc --noEmit)
+ ├── ESLint
+ ├── Prettier format check
+ ├── Unit test (vitest run)
+ └── Build check (next build)
+ │
+ ▼ (semua passing)
+Vercel Deployment
+ ├── Production: main branch
+ ├── Preview: every PR
+ └── Development: feature branches
+```
+
+## GitHub Actions Workflow
+
+```yaml
+# .github/workflows/ci.yml
+name: CI
+
+on:
+ push:
+ branches: [main, develop]
+ pull_request:
+ branches: [main]
+
+jobs:
+ quality:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: oven-sh/setup-bun@v2
+
+ - name: Install dependencies
+ run: bun install --frozen-lockfile
+
+ - name: TypeScript check
+ run: bun check-types
+
+ - name: Lint
+ run: bun lint
+
+ - name: Format check
+ run: bun format
+
+ - name: Run tests
+ run: bun test:run
+
+ - name: Build
+ run: bun build
+```
+
+## Environment Strategy
+
+### Environments
+
+| Environment | Domain | Deployment Trigger | Database | Purpose |
+| ----------- | -------------------------------- | ------------------ | ------------- | --------------------------- |
+| Development | localhost:3000 | Manual `bun dev` | Local/Seed | Daily development |
+| Preview | {pr}.contribution-hub.vercel.app | PR creation | Preview DB | Integration testing, review |
+| Staging | staging.contribution-hub.dev | Push ke develop | Staging DB | Pre-production validation |
+| Production | contribution-hub.dev | Push ke main | Production DB | Live |
+
+### Environment Variables
+
+```env
+# Shared
+NEXT_PUBLIC_APP_URL=
+NEXT_PUBLIC_SITE_NAME=Contribution Hub
+
+# Database (Production)
+DATABASE_URL=
+DIRECT_URL=
+
+# Auth
+AUTH_SECRET=
+GITHUB_CLIENT_ID=
+GITHUB_CLIENT_SECRET=
+
+# GitHub API
+GITHUB_ACCESS_TOKEN=
+
+# Analytics
+NEXT_PUBLIC_GA_ID=
+
+# Feature Flags
+NEXT_PUBLIC_ENABLE_BETA_FEATURES=
+```
+
+## Database Migration Strategy
+
+```bash
+# Generate migration
+bun db:generate
+
+# Apply migration
+bun db:push # Development
+bun db:migrate # Production (via CI)
+
+# Seed data
+bun db:seed
+```
+
+## Monitoring & Observability
+
+### Production Monitoring
+
+| Tool | Purpose |
+| ---------------- | -------------------------------------- |
+| Vercel Analytics | Page views, web vitals, audience |
+| Sentry | Error tracking, performance monitoring |
+| Cronitor | Background job monitoring |
+| Uptime Robot | Uptime monitoring |
+
+### Alerts
+
+| Event | Channel | Severity |
+| ---------------------- | ---------------- | -------- |
+| Build failure | GitHub + Email | High |
+| Error rate > 1% | Sentry + Discord | High |
+| Background job failure | Discord | Medium |
+| Database connection | Discord | Critical |
+| Uptime < 99.9% | PagerDuty | Critical |
+
+## Rollback Procedure
+
+```bash
+# Vercel: Rollback via dashboard
+1. Buka Vercel dashboard
+2. Pilih deployment yang stabil
+3. Klik "Promote to Production"
+
+# Database: Migration rollback
+1. Identifikasi migration yang bermasalah
+2. bun db:rollback
+3. Deploy ulang kode sebelum migration
+```
+
+## Domain & DNS
+
+| Record | Type | Value |
+| ------------------------ | ----- | -------------------- |
+| contribution-hub.dev | A | 76.76.21.21 (Vercel) |
+| www.contribution-hub.dev | CNAME | cname.vercel-dns.com |
+| api.contribution-hub.dev | CNAME | cname.vercel-dns.com |
+| \*.contribution-hub.dev | CNAME | cname.vercel-dns.com |
+
+## Backup Strategy
+
+- Database: Daily automated backup (RDS / Neon)
+- File storage: Not applicable (serverless)
+- Source code: GitHub (redundant)
+
+## Related Documents
+
+- [Deployment README](./README.md)
+- [Technical Stack](../technical/tech-stack.md)
+- [CI Workflow](../../.github/workflows/ci.yml)
diff --git a/.docs/design/README.md b/.docs/design/README.md
new file mode 100644
index 0000000..cf3a50f
--- /dev/null
+++ b/.docs/design/README.md
@@ -0,0 +1,90 @@
+# design/ -- Dokumentasi Desain
+
+> Design system, UI/UX guidelines, komponen, dan prinsip visual.
+
+---
+
+## Tujuan
+
+Folder ini berisi dokumentasi desain yang mencakup:
+
+- Design system dan design tokens
+- Component library documentation
+- UI/UX guidelines dan best practices
+- Aksesibilitas (a11y) standards
+- Layout dan spacing system
+- Typography dan color palette
+- Animasi dan transition patterns
+- Responsive design guidelines
+
+---
+
+## Struktur yang Direkomendasikan
+
+```txt
+design/
+├── README.md # File ini -- panduan folder
+├── design-tokens.md # Warna, typography, spacing, shadow
+├── component-patterns.md # Pattern dan best practices komponen
+├── accessibility.md # Standar aksesibilitas
+├── responsive.md # Responsive design breakpoints
+└── assets/ # Mockups, wireframes, screenshots
+```
+
+---
+
+## Template Component Documentation
+
+```markdown
+# Component: [Nama Komponen]
+
+## Usage
+
+[Kapan dan bagaimana komponen ini digunakan]
+
+## Props
+
+| Prop | Type | Default | Description |
+| ---- | ---- | ------- | ----------- |
+| | | | |
+
+## Variants
+
+[Variant 1, Variant 2, ...]
+
+## States
+
+- Default
+- Hover
+- Active
+- Disabled
+- Error
+- Loading
+
+## Examples
+
+[Kode contoh penggunaan]
+
+## Accessibility
+
+[ARIA attributes, keyboard navigation, screen reader notes]
+```
+
+---
+
+## Design Principles
+
+1. **Consistency** -- Gunakan design tokens, jangan hardcode values
+2. **Accessibility first** -- Setiap komponen harus accessible by default
+3. **Responsive** -- Mobile-first, semua komponen harus responsive
+4. **Performance** -- Hindari layout shift, optimalkan animasi
+5. **Progressive enhancement** -- Fungsi dasar tetap berjalan tanpa JS
+
+---
+
+## Integrasi dengan Kode
+
+- Design tokens diimplementasikan di `tailwind.config`
+- Komponen UI ada di `src/components/ui/`
+- Layout patterns ada di `src/components/layouts/`
+- Pastikan dokumentasi selalu sesuai dengan implementasi
diff --git a/.docs/design/guide-style.md b/.docs/design/guide-style.md
new file mode 100644
index 0000000..a9ffae9
--- /dev/null
+++ b/.docs/design/guide-style.md
@@ -0,0 +1,306 @@
+# Style Guide & Design Conventions
+
+> Panduan penggunaan shadcn/ui, Tailwind CSS v4, dan design tokens.
+> **Single source of truth untuk typography di `src/components/ui/typography.tsx`.**
+
+---
+
+## Typography System
+
+Typography system di project ini menggunakan **Geist** font (dari `next/font/google`) yang dikonfigurasi melalui CSS variables:
+
+```
+--font-sans → Geist (sans-serif, font default)
+--font-mono → Geist Mono (monospace)
+--font-serif → Geist (serif fallback)
+```
+
+**JANGAN gunakan font manual atau hardcode font-family** -- font sudah dikonfigurasi di `src/config/fonts.ts` dan di-inject di root layout.
+
+### Komponen Typography (WAJIB digunakan)
+
+Seluruh typography menggunakan komponen terpusat di `src/components/ui/typography.tsx`. Jangan gunakan elemen HTML mentah (`
`, `
`) tanpa komponen ini.
+
+#### Title Component
+
+Untuk heading, gunakan komponen `Title` dengan prop `variant` berformat `{level}/{weight}`:
+
+```tsx
+import Typography from "@/components/ui/typography"
+
+const { Title, Text } = Typography
+
+
// → text-4xl md:text-5xl font-bold
+ // → text-3xl md:text-4xl font-semibold
+ // → text-2xl md:text-3xl font-medium
+ // → text-xl md:text-2xl font-normal
+ // → text-lg md:text-xl
+ // → text-base md:text-lg font-bold
+```
+
+**Level** yang tersedia: `1 | 2 | 3 | 4 | 5 | 6` (memetakan ke `` hingga ``)
+**Weight** yang tersedia: `normal | medium | semibold | bold | extrabold | black`
+
+#### Text Component
+
+Untuk body text, gunakan komponen `Text` dengan prop `variant` berformat `{size}/{weight}`:
+
+```tsx
+ // → text-2xl font-normal
+ // → text-xl font-medium
+ // → text-lg font-semibol (DEFAULT)
+ // → text-base font-bold
+ // → text-sm font-normal
+```
+
+**Size** yang tersedia: `xl | lg | md | sm | xs`
+**Weight** yang tersedia: `normal | medium | semibold | bold | black`
+
+Text component juga menerima prop `as` untuk mengubah elemen HTML:
+
+```tsx
+ // → dengan styling text
+ // → dengan styling text
+ // → untuk keyboard shortcut
+```
+
+### Aturan Penggunaan
+
+```tsx
+// ✅ WAJIB: Gunakan komponen Typography
+Dashboard
+Selamat datang kembali!
+Detail aktivitas
+
+// ❌ DILARANG: Hardcode heading dengan Tailwind manual
+Dashboard
+
+// ❌ DILARANG: Hardcode font-family
+Teks
+
+// ❌ DILARANG: Mengubah font di komponen secara langsung
+// Font sudah dikonfigurasi global di src/config/fonts.ts
+```
+
+### Pengecualian
+
+Untuk komponen shadcn/ui yang sudah memiliki styling sendiri (Button, Input, Card, dll), gunakan styling default komponen tersebut. Jangan paksakan `` component di dalamnya.
+
+---
+
+## shadcn/ui Usage Convention
+
+### Installation
+
+```bash
+# Install per-component (jangan bulk install)
+npx shadcn@latest add button
+npx shadcn@latest add dialog
+npx shadcn@latest add form
+npx shadcn@latest add table
+```
+
+### Kustomisasi
+
+- **Jangan** edit file komponen shadcn secara langsung
+- Kustomisasi via `className` prop
+- Gunakan `cn()` utility untuk conditional classes
+- Jika perlu variant baru, gunakan `cva` (class-variance-authority)
+
+```tsx
+// ✅ Kustomisasi via className
+
+
+// ✅ Conditional classes dengan cn()
+