This project is an AI-powered software generation system inspired by platforms such as Base44.
The goal is to transform natural language application requirements into a validated, executable application specification and eventually generate a working application.
Example:
User Input:
Build a CRM with login, contacts, dashboard, role-based access and payments.
Output:
Validated Application Specification
↓
Generated Frontend
Generated Backend
Generated Database Schema
The system should behave like a compiler:
Natural Language
↓
Intent Extraction
↓
System Design
↓
Schema Generation
↓
Validation
↓
Repair
↓
Code Generation
↓
Runtime Verification
User Prompt
↓
Intent Agent
↓
Design Agent
↓
┌────────────┬────────────┬────────────┬────────────┐
│ UI Agent │ API Agent │ DB Agent │ Auth Agent │
└────────────┴────────────┴────────────┴────────────┘
↓
Validation Agent
↓
Repair Agent
↓
Code Generation Agent
↓
Generated Project
The assignment explicitly requires:
- Multi-stage generation
- Structured schemas
- Validation
- Automatic repair
- Deterministic behavior
- Execution awareness
Instead of generating code immediately, the system generates specifications first.
This makes validation possible.
Convert user input into structured requirements.
{
"query": "Build a CRM with login and contacts"
}{
"project_name": "CRM",
"project_type": "crm",
"features": [
"authentication",
"contacts"
]
}Natural Language → Structured Requirements
Act as a software architect.
Convert requirements into application architecture.
{
"project_name": "CRM",
"features": [
"authentication",
"contacts"
]
}{
"entities": [
"User",
"Contact"
],
"relationships": [],
"pages": [
"Login",
"Dashboard",
"Contacts"
],
"roles": [
"Admin",
"User"
],
"permissions": [],
"workflows": [
"login",
"create_contact"
]
}Requirements → Application Blueprint
Reads:
- intent
- design
{
"ui_schema": {
"pages": [
{
"name": "Contacts",
"components": [
"ContactTable",
"AddContactButton"
]
}
]
}
}Application Blueprint → UI Specification
Reads:
- intent
- design
{
"api_schema": {
"endpoints": [
{
"path": "/contacts",
"method": "GET"
},
{
"path": "/contacts",
"method": "POST"
}
]
}
}Application Blueprint → API Specification
Reads:
- intent
- design
{
"db_schema": {
"tables": [
{
"name": "contacts",
"columns": [
"id",
"name",
"email"
]
}
]
}
}Application Blueprint → Database Specification
Reads:
- roles
- permissions
{
"auth_schema": {
"roles": {
"Admin": [
"create",
"delete"
],
"User": [
"read"
]
}
}
}Roles & Permissions → Authorization Specification
Detect inconsistencies.
DO NOT fix them.
ui_schema
api_schema
db_schema
auth_schema
UI:
{
"email": true
}API:
{
"email": true
}DB:
{
"columns": [
"id",
"name"
]
}Problem:
email missing in DB
{
"is_valid": false,
"errors": [
{
"type": "schema_mismatch",
"message": "email exists in UI/API but not DB"
}
]
}Detect Problems
Fix only broken sections.
Do not regenerate everything.
{
"validation_report": {}
}{
"repair_actions": [
"Added email column to contacts table"
]
}or
{
"repaired_spec": {}
}Fix Problems
Convert validated specifications into code.
Validated Schemas
{
"generated_project": {
"frontend": [],
"backend": [],
"database": []
}
}Example:
Dashboard.jsx
Contacts.jsx
auth.py
contacts.py
schema.sql
Validated Specification → Code
The project follows:
Custom Workflow
Intent
↓
Design
↓
Schema Generation
↓
Validation
↓
Repair
↓
Code Generation
Subagents
Design Agent
↓
┌────────────┬────────────┬────────────┬────────────┐
│ UI Agent │ API Agent │ DB Agent │ Auth Agent │
└────────────┴────────────┴────────────┴────────────┘
All nodes share the same state.
Nodes do NOT have different state types.
Each node only updates fields it owns.
from typing import TypedDict
class AppState(TypedDict):
query: str
intent: dict | None
design: dict | None
ui_schema: dict | None
api_schema: dict | None
db_schema: dict | None
auth_schema: dict | None
validation_report: dict | None
repaired_spec: dict | None
generated_project: dict | NoneWrong Mental Model:
Intent Agent Output
↓
UI Agent Input
Correct Mental Model:
Shared State
Intent Agent
↓
updates state
Design Agent
↓
updates state
UI Agent
↓
reads state
updates state
Every node receives the same state.
Every node returns only the fields it modifies.
Examples:
API fields must exist in DB.
UI fields must exist in API.
Auth roles must exist in system roles.
Pages must map to workflows.
After code generation:
Generated Code
↓
Runtime Verification
Checks:
- Build success
- Missing imports
- Route validity
- Schema consistency
Use pytest.
Intent Agent
Design Agent
UI Agent
API Agent
DB Agent
Validation Agent
Repair Agent
Planned Deployment:
React Frontend
↓
S3
FastAPI Backend
↓
EC2
PostgreSQL
↓
RDS
Future:
Docker
↓
AWS ECS/Fargate
Recommended but not mandatory.
Benefits:
- Reproducibility
- Dependency management
- Easier deployment
Built an AI-powered software generation compiler using LangGraph and LLMs that transforms natural language requirements into validated UI, API, database, and authorization schemas. Implemented multi-agent orchestration, schema validation, automated repair mechanisms, code generation, unit testing, and cloud deployment workflows.