How ka25van/genaifullstack works
Project type and purpose
• This is a full-stack, containerized web application (“Exploring GenAI”) that lets users interact with generative AI functionality.
• It is composed of three logical components:
• A React-based Single Page Application (frontend)
• A Node.js/Express API layer (backend)
• A Python AI microservice (ai_service) that encapsulates the actual GenAI logic
• CI is orchestrated via the GitHub Actions workflow in .github/workflows/ci.yml.
File structure
• Top-level directories:
• ai_service: contains app.py (likely a Flask/FastAPI service exposing AI endpoints).
• backend: Node.js/Express server.js + package.json + Dockerfile.
• frontend: React+TypeScript app with Tailwind, Dockerfile, and public/static assets.
• Dockerfiles in both backend and frontend indicate containerization for each service.
• No database directory—persistence may not be in scope or is external (e.g., cloud store or ephemeral).
• CI configuration (.github/workflows/ci.yml) suggests automated build/test on push/PR.
README
• Minimal textual description: title “Exploring GenAI” and accompanying image.
a. Main components to represent:
• Frontend SPA (React/TypeScript/Tailwind)
• Backend API (Node.js/Express)
• AI Service (Python/Flask or FastAPI)
• (Optional) External AI provider or downstream services if ai_service calls OpenAI or similar
• CI/CD pipeline (GitHub Actions)
• Container runtime or orchestration layer (e.g., Docker, Kubernetes)
b. Relationships & interactions:
1. User’s browser ←→ Frontend container (served by Nginx or static server in Dockerfile).
2. Frontend → HTTP(S) requests → Backend API.
3. Backend → Internal HTTP/gRPC → AI Service microservice (ai_service/app.py).
4. AI Service → External GenAI API (if configured) or local model inference.
5. CI pipeline triggers builds of frontend & backend containers, runs tests, and optionally pushes images.
c. Architectural patterns & principles:
• Microservices: separate deployable units for API and AI logic.
• Single-Page Application pattern for UI.
• Containerization for environment consistency and deployment.
• Clear API boundary between frontend and backend, and between backend and ai_service.
d. Key technologies/frameworks:
• Frontend: React, TypeScript, Tailwind CSS
• Backend: Node.js, Express, npm
• AI Service: Python (Flask or FastAPI), dependencies managed via .gitignore
• CI: GitHub Actions (ci.yml)
• Deployment: Docker, Dockerfile in frontend and backend