How niranjan-aware/codecraft-platform-new works
Project type and purpose
• This is a full-stack, microservices-based platform (“codecraft-platform”) for code analysis, AI-driven code generation/fixing/review, project management, execution and notifications.
• It comprises a React/TypeScript frontend, an API Gateway, a Eureka service registry, multiple backend microservices (Java Spring Boot and Python FastAPI), messaging (RabbitMQ), object storage (Minio), relational databases, and WebSockets.
File structure
• Top-level “app/” is a Python FastAPI service (AI orchestrator? proof-of-concept).
• Under the root are multiple service folders, each with its own Dockerfile, code, configs, and build artifacts:
– codecraft-frontend (React + Vite)
– codecraft-gateway-service (Java Spring Boot, acts as API gateway & JWT filter)
– codecraft-eureka-server (Java Spring Boot, service registry)
– codecraft-auth-service, project-, analysis-, execution-, notification-services (Java and Python FastAPI microservices)
– codecraft-agent-service & codecraft-ai-service (Python FastAPI agents and AI logic)
– codecraft-infrastructure (Docker-Compose, RabbitMQ, Minio, DB init)
• Common patterns: Spring Boot microservices, FastAPI microservices, service discovery (Eureka), message-driven events, REST controllers, WebSocket for real-time logs.
README
• Minimal content; assume multi-service platform as above. Use file names and configs to infer tech: Java (pom.xml, application.yml), Python (requirements.txt, .env), React (package.json, tsconfig).
a. Main components:
• Client (Browser/React UI)
• API Gateway
• Eureka Service Registry
• Microservices:
– Auth Service (user/login/jwt)
– Project Service (create/manage code projects, file storage via Minio)
– Analysis Service (static analysis, metrics, uses Semgrep)
– Execution Service (code compile/run via Docker, real-time logs via WebSocket, uses RabbitMQ events)
– AI Service (core AI logic: code generation, explain, review, test gen, using a GROQ-based store)
– Agent Service (orchestrates tasks for AI agents)
– Notification Service (consumes RabbitMQ events, sends e-mails)
• Messaging Broker (RabbitMQ)
• Storage:
– Relational DB(s) for each service
– Minio (S3-compatible object storage)
• Service Discovery (Eureka)
• Infrastructure Orchestration (Docker Compose)
b. Relationships & interactions:
• UI → Gateway (REST calls)
• Gateway ↔ Eureka (register/discover)
• Gateway → each microservice (routes based on path)
• Microservices register with Eureka at startup
• Project Service stores files in Minio & metadata in DB
• Analysis, Execution, AI, Agent, Notification Services communicate asynchronously via RabbitMQ (e.g., Execution dispatches LogEvents, Notification consumes events)
• Execution Service uses WebSocket to push real-time logs back to UI via Gateway
• Auth Service issues JWTs; Gateway’s AuthenticationFilter validates tokens on every request
• Frontend establishes WebSocket connection to Execution Service through Gateway
c. Architectural patterns & principles:
• Microservices (bounded contexts, independent data stores)
• API Gateway (centralized entrypoint, authentication)
• Service Discovery with Eureka
• Event-driven communication via RabbitMQ (loose coupling)
• CQRS/Async for execution logs and notifications
• Containerization (Docker), infrastructure as code (docker-compose)
d. Key technologies & frameworks:
• Frontend: React, TypeScript, Vite
• Backend: Java Spring Boot, Python FastAPI
• Messaging: RabbitMQ
• Storage: PostgreSQL (or similar) per service, Minio
• Service Registry: Eureka
• API Gateway: Spring Cloud Gateway (with custom Jwt filter)
• WebSockets: Spring WebSocket / FastAPI websockets
• AI: Groq, custom AI services, agent orchestrator
• Containerization: Docker, Docker Compose