AI Code Builder — Backend Breakdown
Breakdown: Code Builder → Backend
Back to: [AI Code Builder — Project README](Research: AI Code Builder)
Legenda: Legenda Prioritas, Estimasi & Cycle
EPIC B1: AI Core Engine (Backend)
Tujuan Epic: Membangun kemampuan AI untuk mengenali kebutuhan backend dari input visual/spec, sebagai fondasi sebelum code generation.
Research Question: Bisakah AI mengenali kategori fitur backend (Auth, CRUD, dsb) dari input visual/spec dengan akurasi cukup untuk dipakai men-generate kode yang benar?
Hipotesis Utama: Classifier berbasis model vision/language yang sudah ada bisa mencapai F1 ≥ 0.85 tanpa perlu training model dari nol (fine-tuning cukup).
Chapter B1.1 — Feature Detection
Task B1.1.1 — Bangun classifier deteksi feature dari screenshot/spec
| Meta | Detail |
|---|---|
| Priority | P0 |
| Effort | L |
| Cycle | 0–1 |
| Dependencies | Dataset awal (belum ada — bagian dari sub-task ini) |
Description: Membangun model/classifier yang mampu mengenali kategori fitur backend (Auth, CRUD, Payment, dll) dari input yang diberikan (screenshot UI terkait, dokumentasi API, atau deskripsi teks). Model ini jadi otak awal sebelum sistem memutuskan template/struktur backend apa yang harus digenerate.
Sub-task:
Definition of Done:
Task B1.1.2 — Mapping feature ke struktur backend
| Meta | Detail |
|---|---|
| Priority | P0 |
| Effort | M |
| Cycle | 1 |
| Dependencies | Task B1.1.1 selesai |
Description: Menentukan aturan/mapping eksplisit: setiap kategori fitur yang terdeteksi (misal "Auth") diterjemahkan ke daftar konkret apa saja yang perlu digenerate — endpoint, folder, file.
Sub-task:
Definition of Done:
Chapter B1.2 — Reference Code & Testing Result
Task B1.2.1 — Dataset reference code backend
| Meta | Detail |
|---|---|
| Priority | P0 |
| Effort | M |
| Cycle | 1 |
| Dependencies | Stack target diputuskan (lihat [Output Spec]([[ai-code-builder/output-spec |
Description: Mengumpulkan dan menyusun kumpulan kode backend "ground truth" (fitur Auth) sebagai acuan pembanding saat AI menggenerate kode.
Sub-task:
Definition of Done:
Task B1.2.2 — Testing harness backend
| Meta | Detail |
|---|---|
| Priority | P0 |
| Effort | L |
| Cycle | 2 |
| Dependencies | Task B1.2.1 |
Description: Membangun sistem otomatis yang menjalankan hasil generate code, memverifikasi berjalan, lalu membandingkan behavior/response terhadap ekspektasi.
Sub-task:
Definition of Done:
EPIC B2: API & Server Generation
Tujuan Epic: Menggenerate kode backend nyata (route, controller, schema database) berdasarkan hasil deteksi dari Epic B1.
Research Question: Bisakah hasil mapping feature diterjemahkan otomatis jadi kode backend yang compilable ≥ 95% tanpa template hardcode berlebihan?
Chapter B2.1 — Route & Controller Generator
Task B2.1.1 — Generate route dari feature terdeteksi
| Meta | Detail |
|---|---|
| Priority | P0 |
| Effort | M |
| Cycle | 1 |
| Dependencies | Task B1.1.2 |
Description: Membangun engine yang mengambil hasil mapping feature dan menghasilkan file route/controller sesuai stack target.
Sub-task:
Definition of Done:
Task B2.1.2 — Middleware & validasi
| Meta | Detail |
|---|---|
| Priority | P1 |
| Effort | M |
| Cycle | 2 |
| Dependencies | Task B2.1.1 |
Description: Melengkapi hasil generate dengan middleware autentikasi dan validasi input.
Sub-task:
Definition of Done:
Chapter B2.2 — Database Schema Generator
Task B2.2.1 — Generate schema dari feature
| Meta | Detail |
|---|---|
| Priority | P0 |
| Effort | M |
| Cycle | 1 |
| Dependencies | Task B1.1.2 |
Description: Menggenerate struktur database (tabel, migration, model ORM) untuk fitur yang terdeteksi, dimulai dari tabel users untuk Auth.
Sub-task:
Definition of Done:
Task B2.2.2 — Relasi & constraint
| Meta | Detail |
|---|---|
| Priority | P2 |
| Effort | S |
| Cycle | 3 |
| Dependencies | Task B2.2.1 |
Description: Menangani kasus lanjutan di mana fitur butuh relasi antar tabel (misal user memiliki role), termasuk constraint dasar.
Sub-task:
Definition of Done:
EPIC B3: Testing & Validation (Backend)
Tujuan Epic: Memastikan setiap kode backend yang digenerate benar-benar bisa jalan dan sesuai kontrak API yang diharapkan.
Chapter B3.1 — Compile/Run Test
Task B3.1.1 — Automated build test
| Meta | Detail |
|---|---|
| Priority | P0 |
| Effort | M |
| Cycle | 2 |
| Dependencies | Epic B2 |
Description: Menyiapkan environment sandbox yang menjalankan hasil kode generate otomatis dan mendeteksi kegagalan build/run sedini mungkin.
Sub-task:
Definition of Done:
Chapter B3.2 — API Contract Test
Task B3.2.1 — Contract testing
| Meta | Detail |
|---|---|
| Priority | P1 |
| Effort | M |
| Cycle | 3 |
| Dependencies | Task B3.1.1 |
Description: Memvalidasi response API hasil generate sesuai kontrak yang diharapkan (field, tipe data, status code).
Sub-task:
Definition of Done: