A modular implementation scaffold for the research project described in the design docs. The system splits responsibilities across three layers:
- Presentation – Vue 3 + Vite SPA that captures poem input, polls task status, and renders gallery content.
- Business Logic – Spring Boot microservice that exposes REST endpoints, normalizes task state, and dispatches compute jobs.
- AI Microservice – FastAPI + LangChain pipeline that handles embedding lookup, prompt augmentation, and Stable Diffusion inference.
frontend/– Vite + Vue 3 code with polling wrappers, auth placeholders, and a RAG flow UI component.backend/– Spring Boot project stub with REST controllers, DTOs, service layer, and database model mirroringsys_generation_task.ai-service/– FastAPI-based RAG pipeline with LangChainChain, ChromaDB wrapper, Stable Diffusion triggers, and environment-ready config.
- Create per-module
.envfiles (see each module README) to map URLs, DB credentials, and GPU model weights. - Start the backend to expose
/api/v1/poetry/visualizeand/api/v1/poetry/callbackendpoints. - Run the AI microservice (preferably under
uvicorn --reload) and ensure it can reach ChromaDB/embedding storage. - Bootstrap the frontend via
npm install/npm run devwhile pointing to the backend gateway.
- Populate the frontend with actual task polling (long-poll vs. websocket) and gallery persistence.
- Implement database schema migrations plus MyBatis-Plus mapper definitions for
sys_generation_task. - Wire up actual LangChain
RetrievalQA/SequentialChainsequences, LoRA-loaded diffusion model, and blob storage uploads.