# mohitt-0805/lifesync architecture

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

- Interactive diagram: https://gitdiagram.com/mohitt-0805/lifesync
- Repository: https://github.com/mohitt-0805/lifesync

## Overview

LifeSync is a personal productivity and student-life application: users sign in, manage tasks and other life-planning areas, and can study financial-literacy lessons. The visible task workflow runs from the protected frontend task screen through its API client to the backend task route. Backend routes are mounted centrally; the sampled task route connects to its controller, while authentication and lesson completion show user identity and learning rewards. The README contains only the product name, so feature coverage comes from the source tree and frontend routes; unsampled domain internals are not expanded into speculative call chains.

Main entry points: [`lifesync/frontend/src/App.jsx`](https://github.com/mohitt-0805/lifesync/blob/main/lifesync/frontend/src/App.jsx) (Route composition), [`lifesync/backend/src/app.js`](https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/app.js) (Express API), [`lifesync/backend/src/routes/authRoutes.js`](https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/routes/authRoutes.js) (Auth routes), [`lifesync/frontend/src/features/tasks/Tasks.jsx`](https://github.com/mohitt-0805/lifesync/blob/main/lifesync/frontend/src/features/tasks/Tasks.jsx) (Task workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend experience"]
  node_app["Route composition<br/>[App.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
end

subgraph group_planning["Planning features"]
  node_tasks["Task workspace<br/>[Tasks.jsx]"]
  node_taskclient["Task API client<br/>[tasksApi.js]"]
  node_goals["Goals"]
  node_habits["Habits"]
  node_expenses["Expenses"]
  node_notes["Notes"]
  node_calendar["Calendar"]
  node_timetable["Timetable"]
end

subgraph group_backend["Backend API"]
  node_api["Express API<br/>[app.js]"]
  node_taskroute["Task routes<br/>[taskRoutes.js]"]
  node_taskcontroller["Task operations<br/>[taskController.js]"]
  node_taskstore[("Task data<br/>[Task.js]")]
end

subgraph group_learning["Learning and rewards"]
  node_learn["Learn experience"]
  node_learncontroller["Lesson progression<br/>[learnController.js]"]
  node_gamification["XP and achievements<br/>[gamification.js]"]
end

subgraph group_identity["Identity and persistence"]
  node_authroute["Auth routes<br/>[authRoutes.js]"]
  node_authcontroller["Authentication<br/>[authController.js]"]
  node_authmiddleware["JWT verification<br/>[authMiddleware.js]"]
  node_userstore[("User model<br/>[User.js]")]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_tasks
node_app -->|"routes to"| node_goals
node_app -->|"routes to"| node_habits
node_app -->|"routes to"| node_expenses
node_app -->|"routes to"| node_notes
node_app -->|"routes to"| node_calendar
node_app -->|"routes to"| node_timetable
node_app -->|"routes to"| node_learn
node_tasks -->|"queries and mutates"| node_taskclient
node_taskclient -->|"requests tasks"| node_api
node_api -->|"mounts"| node_taskroute
node_taskroute -->|"dispatches to"| node_taskcontroller
node_taskcontroller -.->|"uses"| node_taskstore
node_api -->|"mounts"| node_authroute
node_authroute -->|"dispatches to"| node_authcontroller
node_authroute -->|"protects routes"| node_authmiddleware
node_authcontroller -->|"reads and writes"| node_userstore
node_authmiddleware -->|"loads user"| node_userstore
node_learn -.->|"requests lessons"| node_learncontroller
node_learncontroller -->|"awards progress"| node_gamification

click node_app "https://github.com/mohitt-0805/lifesync/blob/main/lifesync/frontend/src/App.jsx"
click node_dashboard "https://github.com/mohitt-0805/lifesync/blob/main/lifesync/frontend/src/features/dashboard/Dashboard.jsx"
click node_tasks "https://github.com/mohitt-0805/lifesync/blob/main/lifesync/frontend/src/features/tasks/Tasks.jsx"
click node_taskclient "https://github.com/mohitt-0805/lifesync/blob/main/lifesync/frontend/src/features/tasks/tasksApi.js"
click node_goals "https://github.com/mohitt-0805/lifesync/tree/main/lifesync/frontend/src/features/goals"
click node_habits "https://github.com/mohitt-0805/lifesync/tree/main/lifesync/frontend/src/features/habits"
click node_expenses "https://github.com/mohitt-0805/lifesync/tree/main/lifesync/frontend/src/features/expenses"
click node_notes "https://github.com/mohitt-0805/lifesync/tree/main/lifesync/frontend/src/features/notes"
click node_calendar "https://github.com/mohitt-0805/lifesync/tree/main/lifesync/frontend/src/features/calendar"
click node_timetable "https://github.com/mohitt-0805/lifesync/tree/main/lifesync/frontend/src/features/timetable"
click node_api "https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/app.js"
click node_taskroute "https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/routes/taskRoutes.js"
click node_taskcontroller "https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/controllers/taskController.js"
click node_authroute "https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/routes/authRoutes.js"
click node_authcontroller "https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/controllers/authController.js"
click node_authmiddleware "https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/middlewares/authMiddleware.js"
click node_userstore "https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/models/User.js"
click node_learn "https://github.com/mohitt-0805/lifesync/tree/main/lifesync/frontend/src/features/learn"
click node_learncontroller "https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/controllers/learnController.js"
click node_gamification "https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/utils/gamification.js"
click node_taskstore "https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/models/Task.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_dashboard,node_user toneBlue
class node_tasks,node_taskclient,node_goals,node_habits,node_expenses,node_notes,node_calendar,node_timetable toneAmber
class node_api,node_taskroute,node_taskcontroller,node_taskstore toneMint
class node_learn,node_learncontroller,node_gamification toneRose
class node_authroute,node_authcontroller,node_authmiddleware,node_userstore toneIndigo
```

## Components

### Frontend experience

- [Route composition](https://github.com/mohitt-0805/lifesync/blob/main/lifesync/frontend/src/App.jsx): `lifesync/frontend/src/App.jsx`
- [Dashboard](https://github.com/mohitt-0805/lifesync/blob/main/lifesync/frontend/src/features/dashboard/Dashboard.jsx): `lifesync/frontend/src/features/dashboard/Dashboard.jsx`

### Planning features

- [Task workspace](https://github.com/mohitt-0805/lifesync/blob/main/lifesync/frontend/src/features/tasks/Tasks.jsx): `lifesync/frontend/src/features/tasks/Tasks.jsx`
- [Task API client](https://github.com/mohitt-0805/lifesync/blob/main/lifesync/frontend/src/features/tasks/tasksApi.js): `lifesync/frontend/src/features/tasks/tasksApi.js`
- [Goals](https://github.com/mohitt-0805/lifesync/tree/main/lifesync/frontend/src/features/goals): `lifesync/frontend/src/features/goals`
- [Habits](https://github.com/mohitt-0805/lifesync/tree/main/lifesync/frontend/src/features/habits): `lifesync/frontend/src/features/habits`
- [Expenses](https://github.com/mohitt-0805/lifesync/tree/main/lifesync/frontend/src/features/expenses): `lifesync/frontend/src/features/expenses`
- [Notes](https://github.com/mohitt-0805/lifesync/tree/main/lifesync/frontend/src/features/notes): `lifesync/frontend/src/features/notes`
- [Calendar](https://github.com/mohitt-0805/lifesync/tree/main/lifesync/frontend/src/features/calendar): `lifesync/frontend/src/features/calendar`
- [Timetable](https://github.com/mohitt-0805/lifesync/tree/main/lifesync/frontend/src/features/timetable): `lifesync/frontend/src/features/timetable`

### Backend API

- [Express API](https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/app.js): `lifesync/backend/src/app.js`
- [Task routes](https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/routes/taskRoutes.js): `lifesync/backend/src/routes/taskRoutes.js`
- [Task operations](https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/controllers/taskController.js): `lifesync/backend/src/controllers/taskController.js`
- [Task data](https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/models/Task.js): `lifesync/backend/src/models/Task.js`

### Learning and rewards

- [Learn experience](https://github.com/mohitt-0805/lifesync/tree/main/lifesync/frontend/src/features/learn): `lifesync/frontend/src/features/learn`
- [Lesson progression](https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/controllers/learnController.js): `lifesync/backend/src/controllers/learnController.js`
- [XP and achievements](https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/utils/gamification.js): `lifesync/backend/src/utils/gamification.js`

### Identity and persistence

- [Auth routes](https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/routes/authRoutes.js): `lifesync/backend/src/routes/authRoutes.js`
- [Authentication](https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/controllers/authController.js): `lifesync/backend/src/controllers/authController.js`
- [JWT verification](https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/middlewares/authMiddleware.js): `lifesync/backend/src/middlewares/authMiddleware.js`
- [User model](https://github.com/mohitt-0805/lifesync/blob/main/lifesync/backend/src/models/User.js): `lifesync/backend/src/models/User.js`

### Other components

- **User**

## Connections

- User → Route composition: uses (evidence: `lifesync/frontend/src/App.jsx`)
- Route composition → Dashboard: routes to (evidence: `lifesync/frontend/src/App.jsx`)
- Route composition → Task workspace: routes to (evidence: `lifesync/frontend/src/App.jsx`)
- Route composition → Goals: routes to (evidence: `lifesync/frontend/src/App.jsx`)
- Route composition → Habits: routes to (evidence: `lifesync/frontend/src/App.jsx`)
- Route composition → Expenses: routes to (evidence: `lifesync/frontend/src/App.jsx`)
- Route composition → Notes: routes to (evidence: `lifesync/frontend/src/App.jsx`)
- Route composition → Calendar: routes to (evidence: `lifesync/frontend/src/App.jsx`)
- Route composition → Timetable: routes to (evidence: `lifesync/frontend/src/App.jsx`)
- Route composition → Learn experience: routes to (evidence: `lifesync/frontend/src/App.jsx`)
- Task workspace → Task API client: queries and mutates (evidence: `lifesync/frontend/src/features/tasks/Tasks.jsx`)
- Task API client → Express API: requests tasks (evidence: `lifesync/frontend/src/features/tasks/tasksApi.js`)
- Express API → Task routes: mounts (evidence: `lifesync/backend/src/app.js`)
- Task routes → Task operations: dispatches to (evidence: `lifesync/backend/src/routes/taskRoutes.js`)
- Task operations → Task data: uses
- Express API → Auth routes: mounts (evidence: `lifesync/backend/src/app.js`)
- Auth routes → Authentication: dispatches to (evidence: `lifesync/backend/src/routes/authRoutes.js`)
- Auth routes → JWT verification: protects routes (evidence: `lifesync/backend/src/routes/authRoutes.js`)
- Authentication → User model: reads and writes (evidence: `lifesync/backend/src/controllers/authController.js`)
- JWT verification → User model: loads user (evidence: `lifesync/backend/src/middlewares/authMiddleware.js`)
- Learn experience → Lesson progression: requests lessons
- Lesson progression → XP and achievements: awards progress (evidence: `lifesync/backend/src/controllers/learnController.js`)
