# mindtrack-capstone-dbs/fe-mindtrack architecture

> Architecture diagram of the GitHub repository mindtrack-capstone-dbs/fe-mindtrack, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mindtrack-capstone-dbs/fe-mindtrack
- Repository: https://github.com/mindtrack-capstone-dbs/fe-mindtrack

## Overview

MindTrack is a React frontend for mood tracking, journaling, mental-health chat, and account management. Users enter through public landing/auth pages; authenticated routes expose journaling, chat, profile, and dashboard views. Journal and profile views call a separate backend, while chat loads session messages from its API; the dashboard requests journal statistics. The excerpts document these paths, but do not expose all journal write operations or the backend implementation, so those links are not inferred. The README also lists responsive UI and information pages; unsampled feature internals are represented only where the tree supports them.

Main entry points: [`src/App.jsx`](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/App.jsx) (Route Coordinator), [`src/components/Navbar.jsx`](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/components/Navbar.jsx) (Navigation), [`src/components/Footer.jsx`](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/components/Footer.jsx) (Footer Links), [`src/pages/Dashboard-Page/Dashboard-Page.jsx`](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/pages/Dashboard-Page/Dashboard-Page.jsx) (Dashboard Page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App and Access"]
  node_app["Route Coordinator<br/>[App.jsx]"]
  node_login["Login and Register<br/>[AuthForm.jsx]"]
  node_landing["Landing Page<br/>[LandingPage.jsx]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
end

subgraph group_wellbeing["Mood and Journal"]
  node_dashboard_page["Dashboard Page<br/>[Dashboard-Page.jsx]"]
  node_dashboard_view["Mood Dashboard"]
  node_mood_journal["Mood Journal<br/>[MoodJournal.jsx]"]
  node_journal_history["Journal History<br/>[JournalHistory.jsx]"]
  node_mental_status["Mental Status State"]
end

subgraph group_engagement["Chat and Guidance"]
  node_chat["Chat Interface<br/>[ChatBox.jsx]"]
end

subgraph group_account["Account and Information"]
  node_profile["Profile Page<br/>[Profile.jsx]"]
  node_profile_form["Profile Form<br/>[ProfileForm.jsx]"]
  node_about["About Page<br/>[aboutUs.jsx]"]
  node_faq["FAQ Page<br/>[faq.jsx]"]
  node_footer["Footer Links<br/>[Footer.jsx]"]
end

node_user(("User"))
node_auth_api{{"Auth API"}}
node_journal_stats{{"Journal Statistics API"}}
node_chat_api{{"Chat API"}}
node_profile_api{{"Profile API"}}

node_user -->|"opens app"| node_app
node_app -->|"routes public"| node_landing
node_app -->|"routes auth"| node_login
node_app -->|"protects route"| node_dashboard_page
node_app -->|"protects route"| node_mood_journal
node_app -->|"protects route"| node_journal_history
node_app -->|"protects route"| node_chat
node_app -->|"protects route"| node_profile
node_app -->|"routes page"| node_about
node_app -->|"routes page"| node_faq
node_login -->|"submits credentials"| node_auth_api
node_dashboard_page -->|"fetches statistics"| node_journal_stats
node_dashboard_page -->|"renders dashboard"| node_dashboard_view
node_dashboard_view -->|"uses status"| node_mental_status
node_chat -->|"loads messages"| node_chat_api
node_chat -.->|"uses status"| node_mental_status
node_profile -->|"reads and updates"| node_profile_api
node_profile -->|"renders form"| node_profile_form
node_dashboard_page -->|"renders navigation"| node_navbar
node_chat -->|"renders navigation"| node_navbar
node_profile -->|"renders navigation"| node_navbar
node_about -->|"renders navigation"| node_navbar
node_about -->|"renders footer"| node_footer
node_landing -->|"renders navigation"| node_navbar
node_landing -->|"renders footer"| node_footer
node_dashboard_page -->|"renders footer"| node_footer
node_chat -.->|"renders footer"| node_footer
node_profile -->|"renders footer"| node_footer
node_faq -.->|"renders navigation"| node_navbar
node_faq -.->|"renders footer"| node_footer

click node_app "https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/App.jsx"
click node_login "https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/components/AuthForm.jsx"
click node_landing "https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/pages/landing-page/LandingPage.jsx"
click node_dashboard_page "https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/pages/Dashboard-Page/Dashboard-Page.jsx"
click node_dashboard_view "https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/components/DashboardContent.jsx"
click node_mood_journal "https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/pages/journal/MoodJournal.jsx"
click node_journal_history "https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/pages/journal/JournalHistory.jsx"
click node_mental_status "https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/context/MentalStatusContext.jsx"
click node_chat "https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/pages/chatbox/ChatBox.jsx"
click node_profile "https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/pages/profile/Profile.jsx"
click node_profile_form "https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/components/ProfileForm.jsx"
click node_navbar "https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/components/Navbar.jsx"
click node_about "https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/pages/aboutUs/aboutUs.jsx"
click node_faq "https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/pages/faq/faq.jsx"
click node_footer "https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/components/Footer.jsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_login,node_landing,node_navbar,node_user toneBlue
class node_dashboard_page,node_dashboard_view,node_mood_journal,node_journal_history,node_mental_status toneAmber
class node_chat,node_auth_api,node_journal_stats,node_chat_api,node_profile_api toneMint
class node_profile,node_profile_form,node_about,node_faq,node_footer toneRose
```

## Components

### App and Access

- [Route Coordinator](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/App.jsx): `src/App.jsx`
- [Login and Register](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/components/AuthForm.jsx): `src/components/AuthForm.jsx`
- [Landing Page](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/pages/landing-page/LandingPage.jsx): `src/pages/landing-page/LandingPage.jsx`
- [Navigation](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`

### Mood and Journal

- [Dashboard Page](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/pages/Dashboard-Page/Dashboard-Page.jsx): `src/pages/Dashboard-Page/Dashboard-Page.jsx`
- [Mood Dashboard](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/components/DashboardContent.jsx): `src/components/DashboardContent.jsx`
- [Mood Journal](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/pages/journal/MoodJournal.jsx): `src/pages/journal/MoodJournal.jsx`
- [Journal History](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/pages/journal/JournalHistory.jsx): `src/pages/journal/JournalHistory.jsx`
- [Mental Status State](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/context/MentalStatusContext.jsx): `src/context/MentalStatusContext.jsx`

### Chat and Guidance

- [Chat Interface](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/pages/chatbox/ChatBox.jsx): `src/pages/chatbox/ChatBox.jsx`

### Account and Information

- [Profile Page](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/pages/profile/Profile.jsx): `src/pages/profile/Profile.jsx`
- [Profile Form](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/components/ProfileForm.jsx): `src/components/ProfileForm.jsx`
- [About Page](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/pages/aboutUs/aboutUs.jsx): `src/pages/aboutUs/aboutUs.jsx`
- [FAQ Page](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/pages/faq/faq.jsx): `src/pages/faq/faq.jsx`
- [Footer Links](https://github.com/mindtrack-capstone-dbs/fe-mindtrack/blob/main/src/components/Footer.jsx): `src/components/Footer.jsx`

### Other components

- **User**
- **Auth API**
- **Journal Statistics API**
- **Chat API**
- **Profile API**

## Connections

- User → Route Coordinator: opens app (evidence: `src/App.jsx`)
- Route Coordinator → Landing Page: routes public (evidence: `src/App.jsx`)
- Route Coordinator → Login and Register: routes auth (evidence: `src/App.jsx`)
- Route Coordinator → Dashboard Page: protects route (evidence: `src/App.jsx`)
- Route Coordinator → Mood Journal: protects route (evidence: `src/App.jsx`)
- Route Coordinator → Journal History: protects route (evidence: `src/App.jsx`)
- Route Coordinator → Chat Interface: protects route (evidence: `src/App.jsx`)
- Route Coordinator → Profile Page: protects route (evidence: `src/App.jsx`)
- Route Coordinator → About Page: routes page (evidence: `src/App.jsx`)
- Route Coordinator → FAQ Page: routes page (evidence: `src/App.jsx`)
- Login and Register → Auth API: submits credentials (evidence: `src/components/AuthForm.jsx`)
- Dashboard Page → Journal Statistics API: fetches statistics (evidence: `src/pages/Dashboard-Page/Dashboard-Page.jsx`)
- Dashboard Page → Mood Dashboard: renders dashboard (evidence: `src/pages/Dashboard-Page/Dashboard-Page.jsx`)
- Mood Dashboard → Mental Status State: uses status (evidence: `src/components/DashboardContent.jsx`)
- Chat Interface → Chat API: loads messages (evidence: `src/pages/chatbox/ChatBox.jsx`)
- Chat Interface → Mental Status State: uses status (evidence: `src/pages/chatbox/ChatBox.jsx`)
- Profile Page → Profile API: reads and updates (evidence: `src/pages/profile/Profile.jsx`)
- Profile Page → Profile Form: renders form (evidence: `src/pages/profile/Profile.jsx`)
- Dashboard Page → Navigation: renders navigation (evidence: `src/pages/Dashboard-Page/Dashboard-Page.jsx`)
- Chat Interface → Navigation: renders navigation (evidence: `src/pages/chatbox/ChatBox.jsx`)
- Profile Page → Navigation: renders navigation (evidence: `src/pages/profile/Profile.jsx`)
- About Page → Navigation: renders navigation (evidence: `src/pages/aboutUs/aboutUs.jsx`)
- About Page → Footer Links: renders footer (evidence: `src/pages/aboutUs/aboutUs.jsx`)
- Landing Page → Navigation: renders navigation (evidence: `src/pages/landing-page/LandingPage.jsx`)
- Landing Page → Footer Links: renders footer (evidence: `src/pages/landing-page/LandingPage.jsx`)
- Dashboard Page → Footer Links: renders footer (evidence: `src/pages/Dashboard-Page/Dashboard-Page.jsx`)
- Chat Interface → Footer Links: renders footer (evidence: `src/pages/chatbox/ChatBox.jsx`)
- Profile Page → Footer Links: renders footer (evidence: `src/pages/profile/Profile.jsx`)
- FAQ Page → Navigation: renders navigation (evidence: `src/pages/faq/faq.jsx`)
- FAQ Page → Footer Links: renders footer (evidence: `src/pages/faq/faq.jsx`)
