AI Code Builder — Output Spec

Output Spec — Format Code Hasil Generate

Back to: [AI Code Builder — Project README](Research: AI Code Builder)


8.1 Struktur Output (contoh Frontend)

output/
├── src/
│   ├── components/
│   │   └── LoginForm.[ext]
│   ├── styles/
│   │   └── LoginForm.[css/scss]
│   └── index.[ext]
├── assets/          (jika ada icon/gambar terdeteksi)
└── README.md        (penjelasan komponen yang di-generate)

8.2 Format Response API (contoh JSON)

{
  "status": "success",
  "detected_feature": "auth_login",
  "target_platform": "frontend",
  "framework": "react",
  "files": [
    {
      "path": "src/components/LoginForm.jsx",
      "content": "// generated code here"
    },
    {
      "path": "src/styles/LoginForm.css",
      "content": "/* generated styles here */"
    }
  ],
  "testing_score": {
    "visual_similarity": 0.87,
    "layout_accuracy": 0.81,
    "compilable": true
  },
  "generation_time_ms": 4200
}

8.3 Target Stack per Sub-Project (perlu keputusan Product)

Sub-Project Prioritas P0 Prioritas P1+
Frontend React (JSX/TSX + Tailwind/CSS) Vue, plain HTML/CSS/JS
Mobile Flutter (Dart) React Native, Native Android/iOS
Backend Node/Express Laravel, lainnya sesuai kebutuhan

Detail breakdown masing-masing sub-project: Backend, Mobile, Frontend.


8.4 Aturan Kualitas Kode Output (berlaku semua platform)