How shafwansafi06/mindbridge works
Project Type and Purpose
• MindBridge is a full-stack, AI-powered adaptive learning platform.
• Frontend: React + TypeScript (Vite, Tailwind, shadcn/ui).
• Backend: FastAPI (Python) serving REST endpoints, orchestrating ML and LLM integrations.
• ML Pipeline: LightGBM classifier for mastery prediction, Mistral AI for quiz generation, Neo4j for concept graph.
• Data Stores: Supabase/PostgreSQL for relational data, Neo4j for knowledge graph, Redis for caching.
File-Structure Analysis
• Top-level:
• src/ — React application.
• public/ — static assets.
• backend/ — Python FastAPI app, organized into api/, core/, db/, ml_pipeline/, schemas/.
• docker-compose.yml + Dockerfiles — container orchestration.
• Patterns:
• Frontend components under src/components and pages.
• Backend layered architecture: API endpoints → business logic (services) → data layer (supabase, neo4j clients) → ML pipeline modules.
• Config files (.env, tsconfig, tailwind.config, etc.) for environment and build.
README Insights
• Contains a high-level architecture ASCII art.
• Describes system flow (Authentication → Quiz Generation → Answer Submission → ML Analysis → DB Update → Dashboard).
• Outlines ML pipeline stages and feature engineering.
• Frontend (React UI)
• Backend (FastAPI REST API)
• ML Pipeline
• Databases & Cache
• External Services
• User ↔ Frontend (HTTP requests, WebSocket or polling).
• Frontend → Backend (REST calls: /auth, /quiz, /ml).
• Backend → ML Pipeline modules (function calls or internal APIs).
• Backend → Supabase/PostgreSQL (CRUD).
• Backend → Neo4j (initialization & graph queries).
• Backend ↔ Redis (cache tokens, intermediate results).
• Backend → Mistral AI API (quiz generation, answer evaluation).
c. Architectural Patterns & Principles:
• Layered architecture in backend: API layer, service layer, data layer, ML layer.
• Component-based frontend with UI, state management (Context/Hooks), routing.
• Separation of concerns: ML logic isolated in ml_pipeline modules.
• Declarative infra via Docker Compose.
d. Key Technologies & Frameworks:
• React, Vite, TypeScript, Tailwind, shadcn/ui
• FastAPI, Uvicorn, Pydantic
• Python ML: LightGBM, scikit-learn
• LLM: Mistral AI
• Databases: Supabase (PostgreSQL), Neo4j, Redis
Essential Elements to Capture
• Frontend → Backend HTTP interactions
• Backend internal layering: API → Services → Data & ML modules
• ML pipeline stages: feature extraction → LightGBM → predictions → recommendations
• Data storage: Supabase tables, Neo4j graph, Redis cache
• External calls to Mistral AI
• Containers/orchestration (Docker Compose) if relevant