中文 · English
From natural-language requirements to previewable, editable, buildable and deployable web applications.
Java · Spring Boot · LangChain4j · LangGraph4j · Redis · Elasticsearch · Vue
An AI application generation and delivery platform built with Java, Spring Boot, LangChain4j and LangGraph4j.
The system turns an application description into project code, then parses, stores, retrieves, validates, builds and publishes the result as an accessible web artifact.
The project focuses on the engineering problems after code generation: preserving project context across turns, keeping Memory and AiService consistent after personalization changes, streaming tool events reliably over SSE, validating generated Vue code, and reusing existing project code during later generations.
|
Streams model text, tool requests and tool results over SSE. Supports both the standard generation path and LangGraph4j workflows. |
MySQL stores complete history, Redis stores the model context window, and summaries plus versioning control long conversations. |
|
Indexes code chunks in Elasticsearch and combines KNN with BM25 retrieval to reuse relevant project context. |
Vue projects go through SFC parsing, repair, a second validation pass and |
|
Handles partial and complete callbacks, duplicate events, empty-stream retries and state replay. |
Supports element selection and editing in generated pages. The parent page takes over hover and selected overlays when iframe injection is unstable. |
|
Synchronizes MySQL, Redis, Memory Version and cached |
Publishes parsed and stored results as static resources addressed by |
flowchart LR
U[User request] --> API[Spring Boot API]
API --> W[Generation workflow]
W --> L[LangChain4j / LangGraph4j]
L --> S[SSE event stream]
W --> M[Memory layer]
M --> DB[(MySQL)]
M --> R[(Redis)]
W --> RAG[Code retrieval]
RAG --> ES[(Elasticsearch)]
S --> P[Parser / Saver]
P --> V[Vue validation and build]
V --> D[Deployable artifact]
| Layer | Technologies |
|---|---|
| Backend | Java 21, Spring Boot, Spring Web, Spring AOP |
| AI orchestration | LangChain4j, LangGraph4j, Reactor |
| Storage | MySQL, Redis, Caffeine, Redisson |
| Retrieval | Elasticsearch, KNN, BM25 |
| Frontend | Vue 3, TypeScript, Vite |
| Build and delivery | Maven, Vue compiler, static artifact publishing |
Requirements: Java 21, MySQL, Redis and an available OpenAI-compatible model endpoint.
Configuration: src/main/resources/application.yml. Keep credentials in environment variables or an untracked local configuration file.
Start the backend:
./mvnw spring-boot:runThe default port is 8124 and the API prefix is /api.
Start the frontend:
cd ai-generate-code-frontend
npm install
npm run dev| Method | Endpoint | Description |
|---|---|---|
| GET | /api/chat/gen/code |
Streaming code generation |
| GET | /api/chat/gen/workflow |
Workflow-based generation |
| POST | /api/app/add |
Create an application |
| POST | /api/app/deploy |
Deploy an application |
| POST | /api/app/undeploy |
Remove a deployment |
| GET | /api/static/{deployKey}/** |
Access deployed resources |
The engineering journal in docs/engineering-journal/ records the main implementation decisions and failure cases, including iframe editing, Memory consistency, tool streaming, RAG and build validation.
The main generation, Memory, retrieval, build validation and deployment paths are implemented. Automated SSE and Memory tests, connection-pool and Redis failure tests, retrieval evaluation and repeatable load-test scripts are still being expanded.
The repository does not publish unmeasured throughput or production-availability claims.
MIT