# ankush00123/mini_project architecture

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

- Interactive diagram: https://gitdiagram.com/ankush00123/mini_project
- Repository: https://github.com/ankush00123/mini_project

## Overview

This is a client-side study tracker organized around a React dashboard, subject management, timed study sessions, and settings. The principal workflow is to create or select a subject, time a session, save it to that subject, and review study-hour summaries. Redux slices hold user, subject/session, and goal state; chart utilities derive aggregates from session data. The README is the default Vite template and documents no product-specific capabilities. Connections for unsampled components rely only on SOURCE INDEX references.

Main entry points: [`src/App.jsx`](https://github.com/ankush00123/mini_project/blob/main/src/App.jsx) (Route shell), [`src/components/Settings/SettingsPage.jsx`](https://github.com/ankush00123/mini_project/blob/main/src/components/Settings/SettingsPage.jsx) (Settings page), [`src/store/features/userSlice.js`](https://github.com/ankush00123/mini_project/blob/main/src/store/features/userSlice.js) (User state), [`src/store/features/subjectSlice.js`](https://github.com/ankush00123/mini_project/blob/main/src/store/features/subjectSlice.js) (Subject and sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["Route shell<br/>[App.jsx]"]
  node_sidebar["Sidebar<br/>[Sidebar.jsx]"]
end

subgraph group_study["Study tracking"]
  node_subjects["Subject list<br/>[SubjectsPage.jsx]"]
  node_subjectform["Subject editor<br/>[SubjectForm.jsx]"]
  node_subjectdetail["Subject detail"]
  node_sessionpage["Session timer<br/>[SessionPage.jsx]"]
end

subgraph group_insights["Progress insights"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_onboard["First-use setup"]
  node_overview["Study overview<br/>[UserOnboarded.jsx]"]
  node_goalcard["Goal summary<br/>[GoalCard.jsx]"]
  node_charts["Chart selector<br/>[ChartContainer.jsx]"]
  node_bar["Weekly bar chart"]
  node_line["Weekly line chart"]
  node_pie["Subject-hours chart"]
end

subgraph group_settings["Profile and settings"]
  node_settings["Settings page<br/>[SettingsPage.jsx]"]
  node_goaledit["Goal editor<br/>[GoalEdit.jsx]"]
  node_importexport["Import and export<br/>[ImportExport.jsx]"]
  node_deleteprofile["Profile deletion<br/>[DeleteProfile.jsx]"]
  node_username["Username editor<br/>[UsernameEdit.jsx]"]
  node_seeder["Sample data"]
end

subgraph group_state["State and utilities"]
  node_store[("Redux store<br/>[store.js]")]
  node_userslice["User state<br/>[userSlice.js]"]
  node_subjectslice[("Subject and sessions<br/>[subjectSlice.js]")]
  node_sessionslice["Timer state<br/>[sessionSlice.js]"]
  node_goalslice["Goal state<br/>[goalSlice.js]"]
  node_datautils["Study aggregates<br/>[dataUtils.js]"]
  node_subjectutils["Subject helpers<br/>[subjectUtils.js]"]
  node_sessionutils["Session helpers<br/>[sessionUtils.js]"]
  node_timeutils["Time conversion<br/>[timeUtils.js]"]
  node_exportutils["State transfer helpers"]
end

node_user(("User"))

node_user -.->|"opens app"| node_app
node_app -->|"renders"| node_sidebar
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_subjects
node_app -->|"routes to"| node_subjectdetail
node_app -->|"routes to"| node_sessionpage
node_app -->|"routes to"| node_settings
node_dashboard -->|"renders"| node_onboard
node_dashboard -->|"renders"| node_overview
node_onboard -->|"reads state"| node_userslice
node_overview -->|"renders"| node_charts
node_overview -->|"renders"| node_goalcard
node_charts -->|"selects chart"| node_bar
node_charts -->|"selects chart"| node_line
node_charts -->|"selects chart"| node_pie
node_bar -->|"derives data"| node_datautils
node_line -->|"derives data"| node_datautils
node_pie -->|"derives data"| node_datautils
node_subjects -->|"renders"| node_subjectform
node_subjects -->|"creates subjects"| node_subjectutils
node_subjectform -->|"dispatches changes"| node_subjectslice
node_subjectform -->|"creates subject"| node_subjectutils
node_subjectdetail -->|"renders"| node_bar
node_sessionpage -->|"saves session"| node_subjectslice
node_sessionpage -->|"dispatches timer actions"| node_sessionslice
node_sessionpage -->|"creates session"| node_sessionutils
node_sessionpage -->|"formats duration"| node_timeutils
node_settings -->|"renders"| node_goaledit
node_settings -->|"renders"| node_importexport
node_settings -->|"renders"| node_deleteprofile
node_settings -->|"renders"| node_username
node_settings -->|"renders"| node_seeder
node_goaledit -->|"updates goal"| node_goalslice
node_username -->|"updates username"| node_userslice
node_deleteprofile -->|"resets profile"| node_userslice
node_deleteprofile -->|"resets subjects"| node_subjectslice
node_deleteprofile -->|"resets timer"| node_sessionslice
node_deleteprofile -->|"resets goal"| node_goalslice
node_importexport -->|"uses transfer helpers"| node_exportutils
node_exportutils -->|"imports state"| node_userslice
node_exportutils -->|"imports state"| node_subjectslice
node_exportutils -->|"imports state"| node_goalslice
node_seeder -->|"adds sample subjects"| node_subjectutils
node_subjectutils -->|"mounts sample user"| node_userslice
node_subjectutils -->|"adds subjects"| node_subjectslice
node_store -->|"registers reducer"| node_userslice
node_store -->|"registers reducer"| node_subjectslice
node_store -->|"registers reducer"| node_sessionslice

click node_app "https://github.com/ankush00123/mini_project/blob/main/src/App.jsx"
click node_sidebar "https://github.com/ankush00123/mini_project/blob/main/src/components/Sidebar/Sidebar.jsx"
click node_dashboard "https://github.com/ankush00123/mini_project/blob/main/src/components/Dashboard/Dashboard.jsx"
click node_onboard "https://github.com/ankush00123/mini_project/blob/main/src/components/Dashboard/UserNotOnboarded.jsx"
click node_overview "https://github.com/ankush00123/mini_project/blob/main/src/components/Dashboard/UserOnboarded.jsx"
click node_goalcard "https://github.com/ankush00123/mini_project/blob/main/src/components/Dashboard/GoalCard.jsx"
click node_charts "https://github.com/ankush00123/mini_project/blob/main/src/components/Charts/ChartContainer.jsx"
click node_bar "https://github.com/ankush00123/mini_project/blob/main/src/components/Charts/WeeklyHoursBarChart.jsx"
click node_line "https://github.com/ankush00123/mini_project/blob/main/src/components/Charts/WeeklyHoursLineChart.jsx"
click node_pie "https://github.com/ankush00123/mini_project/blob/main/src/components/Charts/WeeklyHoursPieChart.jsx"
click node_subjects "https://github.com/ankush00123/mini_project/blob/main/src/components/Subjects/SubjectsPage.jsx"
click node_subjectform "https://github.com/ankush00123/mini_project/blob/main/src/components/Subjects/SubjectForm.jsx"
click node_subjectdetail "https://github.com/ankush00123/mini_project/blob/main/src/components/Subjects/SingleSubjectPage.jsx"
click node_sessionpage "https://github.com/ankush00123/mini_project/blob/main/src/components/Session/SessionPage.jsx"
click node_settings "https://github.com/ankush00123/mini_project/blob/main/src/components/Settings/SettingsPage.jsx"
click node_goaledit "https://github.com/ankush00123/mini_project/blob/main/src/components/Settings/GoalEdit.jsx"
click node_importexport "https://github.com/ankush00123/mini_project/blob/main/src/components/Settings/ImportExport.jsx"
click node_deleteprofile "https://github.com/ankush00123/mini_project/blob/main/src/components/Settings/DeleteProfile.jsx"
click node_username "https://github.com/ankush00123/mini_project/blob/main/src/components/Settings/UsernameEdit.jsx"
click node_seeder "https://github.com/ankush00123/mini_project/blob/main/src/components/Settings/DummyDataSeeder.jsx"
click node_store "https://github.com/ankush00123/mini_project/blob/main/src/store/store.js"
click node_userslice "https://github.com/ankush00123/mini_project/blob/main/src/store/features/userSlice.js"
click node_subjectslice "https://github.com/ankush00123/mini_project/blob/main/src/store/features/subjectSlice.js"
click node_sessionslice "https://github.com/ankush00123/mini_project/blob/main/src/store/features/sessionSlice.js"
click node_goalslice "https://github.com/ankush00123/mini_project/blob/main/src/store/features/goalSlice.js"
click node_datautils "https://github.com/ankush00123/mini_project/blob/main/src/utils/dataUtils.js"
click node_subjectutils "https://github.com/ankush00123/mini_project/blob/main/src/utils/subjectUtils.js"
click node_sessionutils "https://github.com/ankush00123/mini_project/blob/main/src/utils/sessionUtils.js"
click node_timeutils "https://github.com/ankush00123/mini_project/blob/main/src/utils/timeUtils.js"
click node_exportutils "https://github.com/ankush00123/mini_project/blob/main/src/utils/exportImportUtils.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_sidebar,node_user toneBlue
class node_subjects,node_subjectform,node_subjectdetail,node_sessionpage toneAmber
class node_dashboard,node_onboard,node_overview,node_goalcard,node_charts,node_bar,node_line,node_pie toneMint
class node_settings,node_goaledit,node_importexport,node_deleteprofile,node_username,node_seeder toneRose
class node_store,node_userslice,node_subjectslice,node_sessionslice,node_goalslice,node_datautils,node_subjectutils,node_sessionutils,node_timeutils,node_exportutils toneIndigo
```

## Components

### App navigation

- [Route shell](https://github.com/ankush00123/mini_project/blob/main/src/App.jsx): `src/App.jsx`
- [Sidebar](https://github.com/ankush00123/mini_project/blob/main/src/components/Sidebar/Sidebar.jsx): `src/components/Sidebar/Sidebar.jsx`

### Study tracking

- [Subject list](https://github.com/ankush00123/mini_project/blob/main/src/components/Subjects/SubjectsPage.jsx): `src/components/Subjects/SubjectsPage.jsx`
- [Subject editor](https://github.com/ankush00123/mini_project/blob/main/src/components/Subjects/SubjectForm.jsx): `src/components/Subjects/SubjectForm.jsx`
- [Subject detail](https://github.com/ankush00123/mini_project/blob/main/src/components/Subjects/SingleSubjectPage.jsx): `src/components/Subjects/SingleSubjectPage.jsx`
- [Session timer](https://github.com/ankush00123/mini_project/blob/main/src/components/Session/SessionPage.jsx): `src/components/Session/SessionPage.jsx`

### Progress insights

- [Dashboard](https://github.com/ankush00123/mini_project/blob/main/src/components/Dashboard/Dashboard.jsx): `src/components/Dashboard/Dashboard.jsx`
- [First-use setup](https://github.com/ankush00123/mini_project/blob/main/src/components/Dashboard/UserNotOnboarded.jsx): `src/components/Dashboard/UserNotOnboarded.jsx`
- [Study overview](https://github.com/ankush00123/mini_project/blob/main/src/components/Dashboard/UserOnboarded.jsx): `src/components/Dashboard/UserOnboarded.jsx`
- [Goal summary](https://github.com/ankush00123/mini_project/blob/main/src/components/Dashboard/GoalCard.jsx): `src/components/Dashboard/GoalCard.jsx`
- [Chart selector](https://github.com/ankush00123/mini_project/blob/main/src/components/Charts/ChartContainer.jsx): `src/components/Charts/ChartContainer.jsx`
- [Weekly bar chart](https://github.com/ankush00123/mini_project/blob/main/src/components/Charts/WeeklyHoursBarChart.jsx): `src/components/Charts/WeeklyHoursBarChart.jsx`
- [Weekly line chart](https://github.com/ankush00123/mini_project/blob/main/src/components/Charts/WeeklyHoursLineChart.jsx): `src/components/Charts/WeeklyHoursLineChart.jsx`
- [Subject-hours chart](https://github.com/ankush00123/mini_project/blob/main/src/components/Charts/WeeklyHoursPieChart.jsx): `src/components/Charts/WeeklyHoursPieChart.jsx`

### Profile and settings

- [Settings page](https://github.com/ankush00123/mini_project/blob/main/src/components/Settings/SettingsPage.jsx): `src/components/Settings/SettingsPage.jsx`
- [Goal editor](https://github.com/ankush00123/mini_project/blob/main/src/components/Settings/GoalEdit.jsx): `src/components/Settings/GoalEdit.jsx`
- [Import and export](https://github.com/ankush00123/mini_project/blob/main/src/components/Settings/ImportExport.jsx): `src/components/Settings/ImportExport.jsx`
- [Profile deletion](https://github.com/ankush00123/mini_project/blob/main/src/components/Settings/DeleteProfile.jsx): `src/components/Settings/DeleteProfile.jsx`
- [Username editor](https://github.com/ankush00123/mini_project/blob/main/src/components/Settings/UsernameEdit.jsx): `src/components/Settings/UsernameEdit.jsx`
- [Sample data](https://github.com/ankush00123/mini_project/blob/main/src/components/Settings/DummyDataSeeder.jsx): `src/components/Settings/DummyDataSeeder.jsx`

### State and utilities

- [Redux store](https://github.com/ankush00123/mini_project/blob/main/src/store/store.js): `src/store/store.js`
- [User state](https://github.com/ankush00123/mini_project/blob/main/src/store/features/userSlice.js): `src/store/features/userSlice.js`
- [Subject and sessions](https://github.com/ankush00123/mini_project/blob/main/src/store/features/subjectSlice.js): `src/store/features/subjectSlice.js`
- [Timer state](https://github.com/ankush00123/mini_project/blob/main/src/store/features/sessionSlice.js): `src/store/features/sessionSlice.js`
- [Goal state](https://github.com/ankush00123/mini_project/blob/main/src/store/features/goalSlice.js): `src/store/features/goalSlice.js`
- [Study aggregates](https://github.com/ankush00123/mini_project/blob/main/src/utils/dataUtils.js): `src/utils/dataUtils.js`
- [Subject helpers](https://github.com/ankush00123/mini_project/blob/main/src/utils/subjectUtils.js): `src/utils/subjectUtils.js`
- [Session helpers](https://github.com/ankush00123/mini_project/blob/main/src/utils/sessionUtils.js): `src/utils/sessionUtils.js`
- [Time conversion](https://github.com/ankush00123/mini_project/blob/main/src/utils/timeUtils.js): `src/utils/timeUtils.js`
- [State transfer helpers](https://github.com/ankush00123/mini_project/blob/main/src/utils/exportImportUtils.js): `src/utils/exportImportUtils.js`

### Other components

- **User**

## Connections

- User → Route shell: opens app
- Route shell → Sidebar: renders (evidence: `src/App.jsx`)
- Route shell → Dashboard: routes to (evidence: `src/App.jsx`)
- Route shell → Subject list: routes to (evidence: `src/App.jsx`)
- Route shell → Subject detail: routes to (evidence: `src/App.jsx`)
- Route shell → Session timer: routes to (evidence: `src/App.jsx`)
- Route shell → Settings page: routes to (evidence: `src/App.jsx`)
- Dashboard → First-use setup: renders (evidence: `src/components/Dashboard/Dashboard.jsx`)
- Dashboard → Study overview: renders (evidence: `src/components/Dashboard/Dashboard.jsx`)
- First-use setup → User state: reads state (evidence: `src/components/Dashboard/UserNotOnboarded.jsx`)
- Study overview → Chart selector: renders (evidence: `src/components/Dashboard/UserOnboarded.jsx`)
- Study overview → Goal summary: renders (evidence: `src/components/Dashboard/UserOnboarded.jsx`)
- Chart selector → Weekly bar chart: selects chart (evidence: `src/components/Charts/ChartContainer.jsx`)
- Chart selector → Weekly line chart: selects chart (evidence: `src/components/Charts/ChartContainer.jsx`)
- Chart selector → Subject-hours chart: selects chart (evidence: `src/components/Charts/ChartContainer.jsx`)
- Weekly bar chart → Study aggregates: derives data (evidence: `src/components/Charts/WeeklyHoursBarChart.jsx`)
- Weekly line chart → Study aggregates: derives data (evidence: `src/components/Charts/WeeklyHoursLineChart.jsx`)
- Subject-hours chart → Study aggregates: derives data (evidence: `src/components/Charts/WeeklyHoursPieChart.jsx`)
- Subject list → Subject editor: renders (evidence: `src/components/Subjects/SubjectsPage.jsx`)
- Subject list → Subject helpers: creates subjects (evidence: `src/components/Subjects/SubjectsPage.jsx`)
- Subject editor → Subject and sessions: dispatches changes (evidence: `src/components/Subjects/SubjectForm.jsx`)
- Subject editor → Subject helpers: creates subject (evidence: `src/components/Subjects/SubjectForm.jsx`)
- Subject detail → Weekly bar chart: renders (evidence: `src/components/Subjects/SingleSubjectPage.jsx`)
- Session timer → Subject and sessions: saves session (evidence: `src/components/Session/SessionPage.jsx`)
- Session timer → Timer state: dispatches timer actions (evidence: `src/components/Session/SessionPage.jsx`)
- Session timer → Session helpers: creates session (evidence: `src/components/Session/SessionPage.jsx`)
- Session timer → Time conversion: formats duration (evidence: `src/components/Session/SessionPage.jsx`)
- Settings page → Goal editor: renders (evidence: `src/components/Settings/SettingsPage.jsx`)
- Settings page → Import and export: renders (evidence: `src/components/Settings/SettingsPage.jsx`)
- Settings page → Profile deletion: renders (evidence: `src/components/Settings/SettingsPage.jsx`)
- Settings page → Username editor: renders (evidence: `src/components/Settings/SettingsPage.jsx`)
- Settings page → Sample data: renders (evidence: `src/components/Settings/SettingsPage.jsx`)
- Goal editor → Goal state: updates goal (evidence: `src/components/Settings/GoalEdit.jsx`)
- Username editor → User state: updates username (evidence: `src/components/Settings/UsernameEdit.jsx`)
- Profile deletion → User state: resets profile (evidence: `src/components/Settings/DeleteProfile.jsx`)
- Profile deletion → Subject and sessions: resets subjects (evidence: `src/components/Settings/DeleteProfile.jsx`)
- Profile deletion → Timer state: resets timer (evidence: `src/components/Settings/DeleteProfile.jsx`)
- Profile deletion → Goal state: resets goal (evidence: `src/components/Settings/DeleteProfile.jsx`)
- Import and export → State transfer helpers: uses transfer helpers (evidence: `src/components/Settings/ImportExport.jsx`)
- State transfer helpers → User state: imports state (evidence: `src/utils/exportImportUtils.js`)
- State transfer helpers → Subject and sessions: imports state (evidence: `src/utils/exportImportUtils.js`)
- State transfer helpers → Goal state: imports state (evidence: `src/utils/exportImportUtils.js`)
- Sample data → Subject helpers: adds sample subjects (evidence: `src/components/Settings/DummyDataSeeder.jsx`)
- Subject helpers → User state: mounts sample user (evidence: `src/utils/subjectUtils.js`)
- Subject helpers → Subject and sessions: adds subjects (evidence: `src/utils/subjectUtils.js`)
- Redux store → User state: registers reducer (evidence: `src/store/store.js`)
- Redux store → Subject and sessions: registers reducer (evidence: `src/store/store.js`)
- Redux store → Timer state: registers reducer (evidence: `src/store/store.js`)
