# fudgeejane/finote architecture

> Architecture diagram of the GitHub repository fudgeejane/finote, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fudgeejane/finote
- Repository: https://github.com/fudgeejane/finote

## Overview

Finote is a student study workspace: students enter through public pages, authenticate and complete a profile, then use notes, study tools, schedules, progress, and settings. Most study data is browser-local; account and session workflows use the Express API and MongoDB. The graph preserves README-described features even where their implementation was not sampled; links for those features are limited to route and import evidence in the source index.

Main entry points: [`client/src/layout/PrivateLayout.jsx`](https://github.com/fudgeejane/finote/blob/main/client/src/layout/PrivateLayout.jsx) (Workspace shell), [`client/src/App.jsx`](https://github.com/fudgeejane/finote/blob/main/client/src/App.jsx) (Route application), [`server/controllers/UserController.js`](https://github.com/fudgeejane/finote/blob/main/server/controllers/UserController.js) (Profile operations), [`server/controllers/AuthController.js`](https://github.com/fudgeejane/finote/blob/main/server/controllers/AuthController.js) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_app["Route application<br/>[App.jsx]"]
  node_public["Public pages<br/>[PublicLayout.jsx]"]
  node_theme["Theme state"]
  node_styling["Style tokens<br/>[Styling.jsx]"]
end

subgraph group_study["Study workspace"]
  node_private["Workspace shell<br/>[PrivateLayout.jsx]"]
  node_home["Workspace home<br/>[HomePage.jsx]"]
  node_notes["Notes<br/>[NotesPage.jsx]"]
  node_tools["Study tools<br/>[StudyToolsPage.jsx]"]
  node_toolmodal["Tool workflows"]
  node_toolengine["Study tool logic<br/>[studyTools.js]"]
  node_schedule["Class schedule<br/>[SchedulePage.jsx]"]
  node_progress["Learning progress<br/>[ProgressPage.jsx]"]
  node_settings["Account settings<br/>[SettingsPage.jsx]"]
end

subgraph group_identity["Identity and profile"]
  node_authmodal["Authentication dialog<br/>[AuthModal.jsx]"]
  node_authstate["Session client<br/>[AuthContext.jsx]"]
  node_guards["Route guards<br/>[RouteGuards.jsx]"]
  node_profileui["Profile completion"]
end

subgraph group_api["API and persistence"]
  node_api["Express API<br/>[index.js]"]
  node_authroutes["Auth routes<br/>[AuthRoutes.js]"]
  node_authcontroller["Authentication<br/>[AuthController.js]"]
  node_userroutes["User routes<br/>[UserRoutes.js]"]
  node_usercontroller["Profile operations<br/>[UserController.js]"]
  node_usermodel[("User records<br/>[User.js]")]
  node_sessions[("Refresh sessions<br/>[Session.js]")]
  node_profilelogic["Profile validation"]
  node_mongo[("MongoDB")]
end

subgraph group_services["External services"]
  node_address["Address lookup<br/>[AddressLookup.js]"]
  node_email["Email delivery<br/>[EmailService.js]"]
  node_cloudinary["Image hosting<br/>[cloudinary.js]"]
  node_mailprovider["Email provider"]
  node_nominatim["Nominatim"]
  node_cloudservice["Cloudinary service"]
end

node_student(("Student"))
node_browser(("Browser"))

node_student -->|"uses"| node_browser
node_browser -->|"opens"| node_app
node_app -->|"routes to"| node_public
node_app -->|"routes to"| node_private
node_public -->|"opens"| node_authmodal
node_authmodal -->|"authenticates via"| node_authstate
node_authstate -->|"requests"| node_api
node_app -->|"checks routes"| node_guards
node_guards -->|"reads session"| node_authstate
node_private -->|"hosts"| node_home
node_private -->|"hosts"| node_notes
node_private -->|"hosts"| node_tools
node_private -->|"hosts"| node_schedule
node_private -->|"hosts"| node_progress
node_private -->|"hosts"| node_settings
node_app -->|"routes to"| node_profileui
node_notes -->|"uses"| node_toolengine
node_tools -->|"renders"| node_toolmodal
node_tools -->|"uses"| node_toolengine
node_private -->|"reads session"| node_authstate
node_authstate -->|"loads account data"| node_profileui
node_browser -->|"persists preference"| node_theme
node_styling -->|"reads mode"| node_theme
node_api -->|"mounts"| node_authroutes
node_api -->|"mounts"| node_userroutes
node_authroutes -->|"dispatches"| node_authcontroller
node_userroutes -->|"dispatches"| node_usercontroller
node_userroutes -->|"authenticates with"| node_authcontroller
node_authcontroller -->|"reads and writes"| node_usermodel
node_authcontroller -->|"rotates sessions"| node_sessions
node_usercontroller -.->|"updates profile"| node_usermodel
node_usermodel -.->|"persists"| node_mongo
node_sessions -.->|"persists"| node_mongo
node_usercontroller -->|"validates with"| node_profilelogic
node_usercontroller -->|"searches via"| node_address
node_address -->|"queries"| node_nominatim
node_authcontroller -->|"sends codes"| node_email
node_email -->|"delivers"| node_mailprovider
node_usercontroller -->|"uploads images"| node_cloudinary
node_cloudinary -.->|"configures"| node_cloudservice

click node_app "https://github.com/fudgeejane/finote/blob/main/client/src/App.jsx"
click node_public "https://github.com/fudgeejane/finote/blob/main/client/src/layout/PublicLayout.jsx"
click node_authmodal "https://github.com/fudgeejane/finote/blob/main/client/src/components/auth/AuthModal.jsx"
click node_authstate "https://github.com/fudgeejane/finote/blob/main/client/src/auth/AuthContext.jsx"
click node_guards "https://github.com/fudgeejane/finote/blob/main/client/src/auth/RouteGuards.jsx"
click node_private "https://github.com/fudgeejane/finote/blob/main/client/src/layout/PrivateLayout.jsx"
click node_profileui "https://github.com/fudgeejane/finote/blob/main/client/src/pages/app/CompleteProfilePage.jsx"
click node_home "https://github.com/fudgeejane/finote/blob/main/client/src/pages/app/HomePage.jsx"
click node_notes "https://github.com/fudgeejane/finote/blob/main/client/src/pages/app/NotesPage.jsx"
click node_tools "https://github.com/fudgeejane/finote/blob/main/client/src/pages/app/StudyToolsPage.jsx"
click node_toolmodal "https://github.com/fudgeejane/finote/blob/main/client/src/components/utils/StudyToolsModal.jsx"
click node_toolengine "https://github.com/fudgeejane/finote/blob/main/client/src/components/utils/studyTools.js"
click node_schedule "https://github.com/fudgeejane/finote/blob/main/client/src/pages/app/SchedulePage.jsx"
click node_progress "https://github.com/fudgeejane/finote/blob/main/client/src/pages/app/ProgressPage.jsx"
click node_settings "https://github.com/fudgeejane/finote/blob/main/client/src/pages/app/SettingsPage.jsx"
click node_theme "https://github.com/fudgeejane/finote/blob/main/client/src/components/theme/DarkModeContext.jsx"
click node_styling "https://github.com/fudgeejane/finote/blob/main/client/src/components/theme/Styling.jsx"
click node_api "https://github.com/fudgeejane/finote/blob/main/server/index.js"
click node_authroutes "https://github.com/fudgeejane/finote/blob/main/server/routes/AuthRoutes.js"
click node_authcontroller "https://github.com/fudgeejane/finote/blob/main/server/controllers/AuthController.js"
click node_userroutes "https://github.com/fudgeejane/finote/blob/main/server/routes/UserRoutes.js"
click node_usercontroller "https://github.com/fudgeejane/finote/blob/main/server/controllers/UserController.js"
click node_usermodel "https://github.com/fudgeejane/finote/blob/main/server/models/User.js"
click node_sessions "https://github.com/fudgeejane/finote/blob/main/server/models/Session.js"
click node_profilelogic "https://github.com/fudgeejane/finote/blob/main/server/services/ProfileCompletion.js"
click node_address "https://github.com/fudgeejane/finote/blob/main/server/services/AddressLookup.js"
click node_email "https://github.com/fudgeejane/finote/blob/main/server/services/EmailService.js"
click node_cloudinary "https://github.com/fudgeejane/finote/blob/main/server/config/cloudinary.js"

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_public,node_theme,node_styling,node_browser toneBlue
class node_private,node_home,node_notes,node_tools,node_toolmodal,node_toolengine,node_schedule,node_progress,node_settings toneAmber
class node_authmodal,node_authstate,node_guards,node_profileui toneMint
class node_api,node_authroutes,node_authcontroller,node_userroutes,node_usercontroller,node_usermodel,node_sessions,node_profilelogic,node_mongo toneRose
class node_address,node_email,node_cloudinary,node_mailprovider,node_nominatim,node_cloudservice,node_student toneIndigo
```

## Components

### Web experience

- [Route application](https://github.com/fudgeejane/finote/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Public pages](https://github.com/fudgeejane/finote/blob/main/client/src/layout/PublicLayout.jsx): `client/src/layout/PublicLayout.jsx`
- [Theme state](https://github.com/fudgeejane/finote/blob/main/client/src/components/theme/DarkModeContext.jsx): `client/src/components/theme/DarkModeContext.jsx`
- [Style tokens](https://github.com/fudgeejane/finote/blob/main/client/src/components/theme/Styling.jsx): `client/src/components/theme/Styling.jsx`

### Study workspace

- [Workspace shell](https://github.com/fudgeejane/finote/blob/main/client/src/layout/PrivateLayout.jsx): `client/src/layout/PrivateLayout.jsx`
- [Workspace home](https://github.com/fudgeejane/finote/blob/main/client/src/pages/app/HomePage.jsx): `client/src/pages/app/HomePage.jsx`
- [Notes](https://github.com/fudgeejane/finote/blob/main/client/src/pages/app/NotesPage.jsx): `client/src/pages/app/NotesPage.jsx`
- [Study tools](https://github.com/fudgeejane/finote/blob/main/client/src/pages/app/StudyToolsPage.jsx): `client/src/pages/app/StudyToolsPage.jsx`
- [Tool workflows](https://github.com/fudgeejane/finote/blob/main/client/src/components/utils/StudyToolsModal.jsx): `client/src/components/utils/StudyToolsModal.jsx`
- [Study tool logic](https://github.com/fudgeejane/finote/blob/main/client/src/components/utils/studyTools.js): `client/src/components/utils/studyTools.js`
- [Class schedule](https://github.com/fudgeejane/finote/blob/main/client/src/pages/app/SchedulePage.jsx): `client/src/pages/app/SchedulePage.jsx`
- [Learning progress](https://github.com/fudgeejane/finote/blob/main/client/src/pages/app/ProgressPage.jsx): `client/src/pages/app/ProgressPage.jsx`
- [Account settings](https://github.com/fudgeejane/finote/blob/main/client/src/pages/app/SettingsPage.jsx): `client/src/pages/app/SettingsPage.jsx`

### Identity and profile

- [Authentication dialog](https://github.com/fudgeejane/finote/blob/main/client/src/components/auth/AuthModal.jsx): `client/src/components/auth/AuthModal.jsx`
- [Session client](https://github.com/fudgeejane/finote/blob/main/client/src/auth/AuthContext.jsx): `client/src/auth/AuthContext.jsx`
- [Route guards](https://github.com/fudgeejane/finote/blob/main/client/src/auth/RouteGuards.jsx): `client/src/auth/RouteGuards.jsx`
- [Profile completion](https://github.com/fudgeejane/finote/blob/main/client/src/pages/app/CompleteProfilePage.jsx): `client/src/pages/app/CompleteProfilePage.jsx`

### API and persistence

- [Express API](https://github.com/fudgeejane/finote/blob/main/server/index.js): `server/index.js`
- [Auth routes](https://github.com/fudgeejane/finote/blob/main/server/routes/AuthRoutes.js): `server/routes/AuthRoutes.js`
- [Authentication](https://github.com/fudgeejane/finote/blob/main/server/controllers/AuthController.js): `server/controllers/AuthController.js`
- [User routes](https://github.com/fudgeejane/finote/blob/main/server/routes/UserRoutes.js): `server/routes/UserRoutes.js`
- [Profile operations](https://github.com/fudgeejane/finote/blob/main/server/controllers/UserController.js): `server/controllers/UserController.js`
- [User records](https://github.com/fudgeejane/finote/blob/main/server/models/User.js): `server/models/User.js`
- [Refresh sessions](https://github.com/fudgeejane/finote/blob/main/server/models/Session.js): `server/models/Session.js`
- [Profile validation](https://github.com/fudgeejane/finote/blob/main/server/services/ProfileCompletion.js): `server/services/ProfileCompletion.js`
- **MongoDB**

### External services

- [Address lookup](https://github.com/fudgeejane/finote/blob/main/server/services/AddressLookup.js): `server/services/AddressLookup.js`
- [Email delivery](https://github.com/fudgeejane/finote/blob/main/server/services/EmailService.js): `server/services/EmailService.js`
- [Image hosting](https://github.com/fudgeejane/finote/blob/main/server/config/cloudinary.js): `server/config/cloudinary.js`
- **Email provider**
- **Nominatim**
- **Cloudinary service**

### Other components

- **Student**
- **Browser**

## Connections

- Student → Browser: uses
- Browser → Route application: opens
- Route application → Public pages: routes to (evidence: `client/src/App.jsx`)
- Route application → Workspace shell: routes to (evidence: `client/src/App.jsx`)
- Public pages → Authentication dialog: opens (evidence: `client/src/layout/PublicLayout.jsx`)
- Authentication dialog → Session client: authenticates via (evidence: `client/src/components/auth/AuthModal.jsx`)
- Session client → Express API: requests
- Route application → Route guards: checks routes (evidence: `client/src/App.jsx`)
- Route guards → Session client: reads session (evidence: `client/src/auth/RouteGuards.jsx`)
- Workspace shell → Workspace home: hosts (evidence: `client/src/App.jsx`)
- Workspace shell → Notes: hosts (evidence: `client/src/App.jsx`)
- Workspace shell → Study tools: hosts (evidence: `client/src/App.jsx`)
- Workspace shell → Class schedule: hosts (evidence: `client/src/App.jsx`)
- Workspace shell → Learning progress: hosts (evidence: `client/src/App.jsx`)
- Workspace shell → Account settings: hosts (evidence: `client/src/App.jsx`)
- Route application → Profile completion: routes to (evidence: `client/src/App.jsx`)
- Notes → Study tool logic: uses (evidence: `client/src/pages/app/NotesPage.jsx`)
- Study tools → Tool workflows: renders (evidence: `client/src/pages/app/StudyToolsPage.jsx`)
- Study tools → Study tool logic: uses (evidence: `client/src/pages/app/StudyToolsPage.jsx`)
- Workspace shell → Session client: reads session (evidence: `client/src/layout/PrivateLayout.jsx`)
- Session client → Profile completion: loads account data (evidence: `client/src/pages/app/CompleteProfilePage.jsx`)
- Browser → Theme state: persists preference (evidence: `client/src/components/theme/DarkModeContext.jsx`)
- Style tokens → Theme state: reads mode (evidence: `client/src/components/theme/Styling.jsx`)
- Express API → Auth routes: mounts (evidence: `server/index.js`)
- Express API → User routes: mounts (evidence: `server/index.js`)
- Auth routes → Authentication: dispatches (evidence: `server/routes/AuthRoutes.js`)
- User routes → Profile operations: dispatches (evidence: `server/routes/UserRoutes.js`)
- User routes → Authentication: authenticates with (evidence: `server/routes/UserRoutes.js`)
- Authentication → User records: reads and writes (evidence: `server/controllers/AuthController.js`)
- Authentication → Refresh sessions: rotates sessions (evidence: `server/controllers/AuthController.js`)
- Profile operations → User records: updates profile
- User records → MongoDB: persists
- Refresh sessions → MongoDB: persists
- Profile operations → Profile validation: validates with (evidence: `server/controllers/UserController.js`)
- Profile operations → Address lookup: searches via (evidence: `server/controllers/UserController.js`)
- Address lookup → Nominatim: queries
- Authentication → Email delivery: sends codes (evidence: `server/controllers/AuthController.js`)
- Email delivery → Email provider: delivers (evidence: `server/services/EmailService.js`)
- Profile operations → Image hosting: uploads images (evidence: `server/controllers/UserController.js`)
- Image hosting → Cloudinary service: configures
