How dikshap-2506/mapmyroute works
Project Type and Purpose
• MapMyRoute is a full-stack, AI-powered learning roadmap platform.
• It consists of a React/Vite frontend, a Python/FastAPI backend, a PostgreSQL database, Firebase authentication, and several external APIs (Landbot chatbot, Adzuna job feed, GROQ AI).
File Structure
• Top-level separation:
• backend/ – contains FastAPI app (main.py), DB schema, requirements.txt
• frontend/ – React app (Vite) with pages, widgets, utils, config files
• Key patterns:
• Frontend pages under src/pages (Landing, Dashboard, etc.)
• Widget components (ChatbotWidget, LandbotWidgetLoader)
• Auth helper in src/utils/auth.js
• Firebase config in src/firebase.js
• Config & deployment:
• frontend/vercel.json, vite.config.js
• backend expects .env for DATABASE_URL, API keys
Extract Architecture Insights from README
• Frontend stack: React, Vite, Bootstrap
• Backend stack: FastAPI, Python, PostgreSQL
• Auth: Firebase + JWT
• External integrations: Landbot, Adzuna API, GROQ AI
Main Components
a. User (Web Browser / Client)
b. Frontend (React App hosted on Vercel)
– UI pages, Chatbot widget loader, API calls to backend
c. Authentication Layer (Firebase Auth + JWT)
d. Backend API (FastAPI service on Render or similar)
– Roadmap generation logic, progress tracking, challenge engine
e. Data Store (PostgreSQL DB)
f. External Services / APIs:
• Landbot (AI Chatbot)
• Adzuna (Job feed)
• GROQ (LLM execution)
g. Deployment & Hosting (Vercel for frontend, cloud/VPS for backend, managed PostgreSQL)
Relationships & Data Flows
• User → HTTP(S) → Frontend
• Frontend ↔ REST API (FastAPI)
• Frontend ↔ Firebase Auth (for sign-in/up, token exchange)
• Backend ↔ PostgreSQL (CRUD on users, roadmaps, progress)
• Backend → Adzuna API (fetch job data)
• Backend → GROQ API (invoke AI for roadmap/adaptations)
• Frontend → Landbot widget (embedded script → real-time chatbot)
Architectural Patterns & Principles
• Clear separation of concerns (frontend vs. backend)
• Client-server, stateless RESTful APIs
• Third-party integration layer
• Componentized UI (React pages & widgets)
• Environment-based config (.env, VITE_API_URL)