This is a production-ready, highly structured rewrite of the hackathon project, taking advantage of a multi-stack approach for scalability and robust tech segregation.
- Next.js (React) [Port
3000]: The frontend client utilizing the new Next.js App Router, Tailwind CSS, Monaco Editor, Mermaid.js, and Chart.js. - Node.js (Express) [Port
5000]: The central API Gateway routing requests to our microservices. Contains caching logic using Redis. - Python (FastAPI) [Port
8000]: The core AI/ML processing service that inherently connects with the Gemini API. Python is positioned here to allow dropping in other standard ML libraries easily. - Docker Compose: Orchestrates Next.js, Node.js, Python FastAPI, PostgreSQL, and Redis cache automatically.
In your terminal, you must export your Gemini API key so Docker can see it:
export GEMINI_API_KEY="your-gemini-key-here"From the root directory (/TeachMyCOde):
docker-compose up --buildWait a minute or two for all dependencies to install inside their respective containers. Once complete, you can open:
- Frontend Client:
http://localhost:3000 - API Gateway Health check:
http://localhost:5000/health - Python AI Service Health check:
http://localhost:8000/health
The codebase is structured under:
/apps/web(Next.js config and pages)/services/api-gateway(Express proxy layer caching responses in Redis)/services/ai-service(The FastAPI proxy to hit Google's GenAI directly)