-
Notifications
You must be signed in to change notification settings - Fork 0
Project Structure
Prathamesh Bhamare edited this page Mar 9, 2026
·
1 revision
A complete breakdown of every file and folder in MindBridge V2.
mindbridge-v2/
βββ .github/
β βββ workflows/
β βββ firebase-hosting-merge.yml β CI/CD auto-deploy
βββ src/ β All React source code
βββ .env β Your secret keys (never commit)
βββ .env.example β Template for .env
βββ .gitignore β Files Git ignores
βββ firebase.json β Firebase project config
βββ firestore.rules β Firestore security rules
βββ firestore.indexes.json β Firestore indexes
βββ index.html β HTML entry point
βββ package.json β Dependencies
βββ postcss.config.js β PostCSS config for Tailwind
βββ tailwind.config.js β Tailwind CSS config
βββ vite.config.js β Vite bundler config
src/
βββ components/
β βββ Navbar.jsx β Top navigation bar
β βββ CrisisModal.jsx β Emergency helpline overlay
β βββ TrustedContactModal.jsx β Onboarding safety modal
βββ pages/
β βββ LoginPage.jsx β Google sign-in screen
β βββ ChatPage.jsx β Main AI chat + history sidebar
β βββ AssessmentPage.jsx β PHQ-9 & GAD-7 screening
β βββ DashboardPage.jsx β Mood chart + AI insights
βββ App.jsx β Router + auth state management
βββ firebase.js β All Firestore helper functions
βββ gemini.js β Gemini AI integration
βββ sentiment.js β Local JS sentiment analysis
βββ main.jsx β React entry point
βββ index.css β Global styles + Tailwind imports
Contains all Firestore helper functions:
-
saveMessage()β save a chat message -
loadMessages()β load messages for a session -
createSession()β create a new chat session -
getSessions()β get all sessions for sidebar -
saveAssessment()β save PHQ-9 or GAD-7 result -
loadAssessments()β load assessment history -
saveMoodLog()β log daily mood -
loadMoodLogs()β load mood history for chart -
saveUserProfile()β save user profile data
Contains all Gemini AI functions:
-
sendToGemini()β send message with history -
interpretAssessment()β get AI interpretation of score -
detectCrisis()β detect crisis keywords
Pure JavaScript sentiment analysis. No API needed. Returns score (-1 to +1) and magnitude.
Security rules that ensure users can only read and write their own data. Always deploy this after any changes:
firebase deploy --only firestore:rulesThe CI/CD pipeline. Runs automatically on every push to main. Installs packages, builds the app, deploys to Firebase Hosting.