# theolidec/comprehensivelocalecosystem architecture

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

- Interactive diagram: https://gitdiagram.com/theolidec/comprehensivelocalecosystem
- Repository: https://github.com/theolidec/comprehensivelocalecosystem

## Overview

This is a React/Express personal-ecosystem application: users authenticate, enter protected feature pages, and manage personal information and activities through backend APIs backed by MongoDB models. Its major branches include calendar, files, finance, music, wiki, tracker, wishlist, radiation, and account/security features. The excerpts directly show routing, authentication, tracker persistence, and selected controller/model interactions; many feature routes and clients are indexed but unsampled, so those connections are marked unverified rather than inferred as call chains.

Main entry points: [`frontend/src/App.js`](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/App.js) (App routing), [`backend/routes/auth.js`](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/routes/auth.js) (Authentication routes), [`backend/routes/tracker.js`](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/routes/tracker.js) (Tracker routes), [`backend/server.js`](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/server.js) (API server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_app["App routing<br/>[App.js]"]
  node_protected["Protected routes<br/>[ProtectedRoute.js]"]
end

subgraph group_identity["Identity and account"]
  node_auth_ui["Sign-in UI<br/>[AuthPage.js]"]
  node_auth_api["Authentication routes<br/>[auth.js]"]
  node_auth_mw["Token middleware<br/>[auth.js]"]
  node_user_model[("User records<br/>[User.js]")]
  node_refresh_model[("Refresh tokens<br/>[RefreshToken.js]")]
end

subgraph group_personal["Personal tools"]
  node_calendar_ui["Calendar<br/>[Calendar.js]"]
  node_calendar_api["Calendar routes<br/>[calendar.js]"]
  node_calendar_controller["Calendar operations"]
  node_events[("Calendar events<br/>[Event.js]")]
  node_tracker_ui["Daily tracker<br/>[DailyTracker.js]"]
  node_tracker_routes["Tracker routes<br/>[tracker.js]"]
  node_tracker_data[("Tracker records<br/>[TrackerResponse.js]")]
  node_tasks[("Recurring tasks<br/>[TrackerTask.js]")]
  node_finance_ui["Finance<br/>[Finance.js]"]
  node_finance_ops["Finance operations"]
  node_finance_data[("Finance records")]
  node_wishlist_ui["Wishlist<br/>[Wishlist.js]"]
  node_radiation_ui["Radiation tracking<br/>[Radiation.js]"]
  node_radiation_ops["Radiation operations"]
end

subgraph group_content["Content and media"]
  node_file_ui["File manager<br/>[FileManager.js]"]
  node_file_service["File client<br/>[fileService.js]"]
  node_file_routes["File routes<br/>[files.js]"]
  node_file_ops["File operations<br/>[fileController.js]"]
  node_file_data[("File records<br/>[File.js]")]
  node_wiki_ui["Wiki experience<br/>[WikiView.js]"]
  node_wiki_context["Wiki state<br/>[WikiContext.js]"]
  node_wiki_ops["Wiki pages"]
  node_wiki_data[("Wiki records<br/>[WikiPage.js]")]
  node_music_ui["Music library<br/>[Music.js]"]
  node_music_ops["Music operations<br/>[musicController.js]"]
end

subgraph group_backend["Backend platform"]
  node_server["API server<br/>[server.js]"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"routes through"| node_protected
node_app -->|"renders"| node_auth_ui
node_app -->|"routes to"| node_calendar_ui
node_app -.->|"routes to"| node_tracker_ui
node_app -.->|"routes to"| node_finance_ui
node_app -->|"routes to"| node_file_ui
node_app -->|"routes to"| node_wiki_ui
node_app -->|"routes to"| node_music_ui
node_app -.->|"routes to"| node_wishlist_ui
node_app -->|"routes to"| node_radiation_ui
node_auth_ui -.->|"submits credentials"| node_auth_api
node_auth_api -->|"reads and updates"| node_user_model
node_auth_api -->|"creates tokens"| node_refresh_model
node_auth_mw -->|"loads account"| node_user_model
node_auth_mw -->|"verifies token"| node_refresh_model
node_calendar_ui -.->|"requests calendar data"| node_calendar_api
node_calendar_api -.->|"dispatches"| node_calendar_controller
node_calendar_controller -.->|"manages events"| node_events
node_tracker_ui -.->|"requests tracker data"| node_tracker_routes
node_tracker_routes -->|"queries tasks"| node_tasks
node_tracker_routes -->|"reads and updates"| node_tracker_data
node_tracker_data -->|"references task model"| node_tasks
node_finance_ui -.->|"requests finance data"| node_finance_ops
node_finance_ops -->|"creates transactions"| node_finance_data
node_file_ui -->|"calls"| node_file_service
node_file_service -.->|"requests file APIs"| node_file_routes
node_file_routes -.->|"dispatches"| node_file_ops
node_file_ops -->|"manages files"| node_file_data
node_wiki_ui -.->|"uses state"| node_wiki_context
node_wiki_context -.->|"requests wiki pages"| node_wiki_ops
node_wiki_ops -->|"reads and updates"| node_wiki_data
node_music_ui -.->|"requests music data"| node_music_ops
node_wishlist_ui -.->|"uses wishlist APIs"| node_server
node_radiation_ui -.->|"requests measurements"| node_radiation_ops
node_radiation_ops -.->|"serves through API"| node_server
node_server -->|"mounts routes"| node_auth_api

click node_app "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/App.js"
click node_protected "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Auth/ProtectedRoute.js"
click node_auth_ui "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Auth/AuthPage.js"
click node_auth_api "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/routes/auth.js"
click node_auth_mw "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/middleware/auth.js"
click node_user_model "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/models/User.js"
click node_refresh_model "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/models/RefreshToken.js"
click node_calendar_ui "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Pages/Calendar.js"
click node_calendar_api "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/routes/calendar.js"
click node_calendar_controller "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/controllers/calendarController.js"
click node_events "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/models/Event.js"
click node_tracker_ui "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Tracker/DailyTracker.js"
click node_tracker_routes "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/routes/tracker.js"
click node_tracker_data "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/models/TrackerResponse.js"
click node_tasks "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/models/TrackerTask.js"
click node_finance_ui "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Pages/Finance.js"
click node_finance_ops "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/controllers/financeController.js"
click node_finance_data "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/models/FinanceTransaction.js"
click node_file_ui "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Pages/FileManager.js"
click node_file_service "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/services/fileService.js"
click node_file_routes "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/routes/files.js"
click node_file_ops "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/controllers/fileController.js"
click node_file_data "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/models/File.js"
click node_wiki_ui "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Wiki/WikiView.js"
click node_wiki_context "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/contexts/WikiContext.js"
click node_wiki_ops "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/controllers/wikiPageController.js"
click node_wiki_data "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/models/WikiPage.js"
click node_music_ui "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Pages/Music.js"
click node_music_ops "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/controllers/musicController.js"
click node_wishlist_ui "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Wishlist/Wishlist.js"
click node_radiation_ui "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Pages/Radiation.js"
click node_radiation_ops "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/controllers/radiationController.js"
click node_server "https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/server.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_protected,node_user toneBlue
class node_auth_ui,node_auth_api,node_auth_mw,node_user_model,node_refresh_model toneAmber
class node_calendar_ui,node_calendar_api,node_calendar_controller,node_events,node_tracker_ui,node_tracker_routes,node_tracker_data,node_tasks,node_finance_ui,node_finance_ops,node_finance_data,node_wishlist_ui,node_radiation_ui,node_radiation_ops toneMint
class node_file_ui,node_file_service,node_file_routes,node_file_ops,node_file_data,node_wiki_ui,node_wiki_context,node_wiki_ops,node_wiki_data,node_music_ui,node_music_ops toneRose
class node_server toneIndigo
```

## Components

### Web experience

- [App routing](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/App.js): `frontend/src/App.js`
- [Protected routes](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Auth/ProtectedRoute.js): `frontend/src/components/Auth/ProtectedRoute.js`

### Identity and account

- [Sign-in UI](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Auth/AuthPage.js): `frontend/src/components/Auth/AuthPage.js`
- [Authentication routes](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/routes/auth.js): `backend/routes/auth.js`
- [Token middleware](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/middleware/auth.js): `backend/middleware/auth.js`
- [User records](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/models/User.js): `backend/models/User.js`
- [Refresh tokens](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/models/RefreshToken.js): `backend/models/RefreshToken.js`

### Personal tools

- [Calendar](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Pages/Calendar.js): `frontend/src/components/Pages/Calendar.js`
- [Calendar routes](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/routes/calendar.js): `backend/routes/calendar.js`
- [Calendar operations](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/controllers/calendarController.js): `backend/controllers/calendarController.js`
- [Calendar events](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/models/Event.js): `backend/models/Event.js`
- [Daily tracker](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Tracker/DailyTracker.js): `frontend/src/components/Tracker/DailyTracker.js`
- [Tracker routes](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/routes/tracker.js): `backend/routes/tracker.js`
- [Tracker records](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/models/TrackerResponse.js): `backend/models/TrackerResponse.js`
- [Recurring tasks](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/models/TrackerTask.js): `backend/models/TrackerTask.js`
- [Finance](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Pages/Finance.js): `frontend/src/components/Pages/Finance.js`
- [Finance operations](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/controllers/financeController.js): `backend/controllers/financeController.js`
- [Finance records](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/models/FinanceTransaction.js): `backend/models/FinanceTransaction.js`
- [Wishlist](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Wishlist/Wishlist.js): `frontend/src/components/Wishlist/Wishlist.js`
- [Radiation tracking](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Pages/Radiation.js): `frontend/src/components/Pages/Radiation.js`
- [Radiation operations](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/controllers/radiationController.js): `backend/controllers/radiationController.js`

### Content and media

- [File manager](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Pages/FileManager.js): `frontend/src/components/Pages/FileManager.js`
- [File client](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/services/fileService.js): `frontend/src/services/fileService.js`
- [File routes](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/routes/files.js): `backend/routes/files.js`
- [File operations](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/controllers/fileController.js): `backend/controllers/fileController.js`
- [File records](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/models/File.js): `backend/models/File.js`
- [Wiki experience](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Wiki/WikiView.js): `frontend/src/components/Wiki/WikiView.js`
- [Wiki state](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/contexts/WikiContext.js): `frontend/src/contexts/WikiContext.js`
- [Wiki pages](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/controllers/wikiPageController.js): `backend/controllers/wikiPageController.js`
- [Wiki records](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/models/WikiPage.js): `backend/models/WikiPage.js`
- [Music library](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/frontend/src/components/Pages/Music.js): `frontend/src/components/Pages/Music.js`
- [Music operations](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/controllers/musicController.js): `backend/controllers/musicController.js`

### Backend platform

- [API server](https://github.com/theolidec/comprehensivelocalecosystem/blob/main/backend/server.js): `backend/server.js`

### Other components

- **User**

## Connections

- User → App routing: uses (evidence: `README.md`)
- App routing → Protected routes: routes through (evidence: `frontend/src/App.js`)
- App routing → Sign-in UI: renders (evidence: `frontend/src/App.js`)
- App routing → Calendar: routes to (evidence: `frontend/src/App.js`)
- App routing → Daily tracker: routes to (evidence: `frontend/src/App.js`)
- App routing → Finance: routes to
- App routing → File manager: routes to (evidence: `frontend/src/App.js`)
- App routing → Wiki experience: routes to (evidence: `frontend/src/App.js`)
- App routing → Music library: routes to (evidence: `frontend/src/App.js`)
- App routing → Wishlist: routes to (evidence: `frontend/src/App.js`)
- App routing → Radiation tracking: routes to (evidence: `frontend/src/App.js`)
- Sign-in UI → Authentication routes: submits credentials
- Authentication routes → User records: reads and updates (evidence: `backend/routes/auth.js`)
- Authentication routes → Refresh tokens: creates tokens (evidence: `backend/routes/auth.js`)
- Token middleware → User records: loads account (evidence: `backend/middleware/auth.js`)
- Token middleware → Refresh tokens: verifies token (evidence: `backend/middleware/auth.js`)
- Calendar → Calendar routes: requests calendar data
- Calendar routes → Calendar operations: dispatches
- Calendar operations → Calendar events: manages events
- Daily tracker → Tracker routes: requests tracker data
- Tracker routes → Recurring tasks: queries tasks (evidence: `backend/routes/tracker.js`)
- Tracker routes → Tracker records: reads and updates (evidence: `backend/routes/tracker.js`)
- Tracker records → Recurring tasks: references task model (evidence: `backend/models/TrackerResponse.js`)
- Finance → Finance operations: requests finance data
- Finance operations → Finance records: creates transactions (evidence: `backend/controllers/financeController.js`)
- File manager → File client: calls (evidence: `frontend/src/components/Pages/FileManager.js`)
- File client → File routes: requests file APIs
- File routes → File operations: dispatches
- File operations → File records: manages files (evidence: `backend/controllers/fileController.js`)
- Wiki experience → Wiki state: uses state
- Wiki state → Wiki pages: requests wiki pages
- Wiki pages → Wiki records: reads and updates (evidence: `backend/controllers/wikiPageController.js`)
- Music library → Music operations: requests music data
- Wishlist → API server: uses wishlist APIs
- Radiation tracking → Radiation operations: requests measurements
- Radiation operations → API server: serves through API
- API server → Authentication routes: mounts routes (evidence: `backend/server.js`)
