Skip to content

Abhin30-nav/ExplainMyCode

Repository files navigation

Explain My Code Like I'm 5 (Multi-Stack Architecture)

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.

Architecture & Tech Stack

  • 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.

How to Run locally

1. Configure the AI Service Environment

In your terminal, you must export your Gemini API key so Docker can see it:

export GEMINI_API_KEY="your-gemini-key-here"

2. Start the Environment via Docker Compose

From the root directory (/TeachMyCOde):

docker-compose up --build

Wait 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

Development Note

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)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors