How codefox-repo/codefox works
• Frontend: Represented by the “frontend” folder. This Next.js-based client handles the user interface, routing, and API communications (using GraphQL) with the backend. Note related components such as pages, components, hooks, providers, and configuration.
• API Gateway/GraphQL endpoint (accessible at /graphql)
• Business logic layers (e.g., authentication, user management, chat, file download)
• The build system components (BuilderContext, HandlerManager, BuildHandlers, BuildMonitor, VirtualDirectory) that organize the process of generating a full-stack project.
• LLM Server: Indicated by the “llm-server” folder. This service manages interactions with AI models for code generation (using local models like Llama or cloud models) and prompt processing. Connect it to the backend via HTTP/WebSocket and label its role in updating AI model states and facilitating chat responses.
Build System Architecture
• Zoom in on the Build System that resides in the backend’s “src/build-system” directory. Break down the following components:
• BuilderContext: Coordinates build execution and dependency checks.
• HandlerManager: Manages individual build handlers (code-generation, file management, requirements documentation, UI/UX layout, database schema handling, etc.).
• BuildHandlers: Represent individual build tasks that process and update the virtual directory.
• BuildMonitor: Observes and reports the build status.
• VirtualDirectory: Acts as an in-memory file system during project generation.
Architectural Patterns & Technologies
• That the project uses microservice-like separation for concerns, distinguishing the frontend client, business logic (backend), and AI processing (LLM server).
• Mention the use of GraphQL for API communication in the front-to-back link.
• Specify frameworks and libraries like NestJS for backend, Next.js for frontend, and any related tooling (pnpm, turbo, Docker, tmuxinator).