# rupesh040/myturn architecture

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

- Interactive diagram: https://gitdiagram.com/rupesh040/myturn
- Repository: https://github.com/rupesh040/myturn

## Overview

This is a mobile-oriented personal routine, habit, and task planner built with React and Capacitor. Users enter through the routed app, create scheduled routines or timed to-dos, track completion and habits, and review progress; additional areas provide notes, AI-assisted writing, customization, profile settings, and backups. The excerpts show localStorage-backed routine and todo state and notification scheduling, but do not establish a shared storage layer or the internals of several major pages, so those connections are omitted or left unverified.

Main entry points: [`src/App.jsx`](https://github.com/rupesh040/myturn/blob/main/src/App.jsx) (Route shell), [`src/page/Home.jsx`](https://github.com/rupesh040/myturn/blob/main/src/page/Home.jsx) (Routine dashboard), [`src/page/Todo.jsx`](https://github.com/rupesh040/myturn/blob/main/src/page/Todo.jsx) (To-do manager), [`src/page/CreateRoutine.jsx`](https://github.com/rupesh040/myturn/blob/main/src/page/CreateRoutine.jsx) (Routine editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_entry["React entry<br/>[main.jsx]"]
  node_routes["Route shell<br/>[App.jsx]"]
end

subgraph group_planning["Routine planning"]
  node_home["Routine dashboard<br/>[Home.jsx]"]
  node_routine_editor["Routine editor<br/>[CreateRoutine.jsx]"]
  node_routine_catalog["Routine stickers<br/>[Routine.js]"]
  node_routine_alerts["Routine alerts<br/>[RoutineAlert.js]"]
  node_habits["Habit tracking<br/>[Habits.js]"]
  node_routine_edit["Edit routine<br/>[EditRoutine.jsx]"]
  node_calendar["Calendar picker<br/>[CalendarModal.jsx]"]
end

subgraph group_tasks["Task tracking"]
  node_todo_page["To-do manager<br/>[Todo.jsx]"]
  node_todo_create["To-do creation<br/>[Todocreate.jsx]"]
  node_alarm_picker["Time picker<br/>[AlarmTimeTodo.jsx]"]
  node_todo_alert["To-do alerts<br/>[TodoAlert.js]"]
  node_alarm_service["Alarm service<br/>[alarmService.js]"]
  node_alarm_runtime["Alarm runtime<br/>[alarm.js]"]
  node_completed["Completed tasks<br/>[CompletedTodo.jsx]"]
end

subgraph group_insights["Notes and insights"]
  node_analytics["Analytics<br/>[Analytics.jsx]"]
  node_notes_page["Notes<br/>[Notes.jsx]"]
  node_note_editor["Note editor<br/>[Note.jsx]"]
  node_syllabus["Syllabus editor<br/>[Syllabus.jsx]"]
  node_dopamine["Motivation<br/>[Dopamine.jsx]"]
end

subgraph group_engagement["Personalization"]
  node_profile["Profile settings<br/>[Profile.jsx]"]
  node_customize["To-do customization<br/>[TodoCustomize.jsx]"]
  node_meeple["Meeple collection<br/>[Meeple.jsx]"]
  node_backup["Backup<br/>[Backup.jsx]"]
end

node_user(("User"))
node_ai_service{{"Google AI"}}
node_routine_store[("Browser local storage")]
node_notifications{{"Device notifications"}}

node_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_routes
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_todo_page
node_routes -->|"routes to"| node_analytics
node_routes -->|"routes to"| node_profile
node_routes -->|"routes to"| node_customize
node_routes -->|"routes to"| node_meeple
node_routes -->|"routes to"| node_backup
node_routes -->|"routes to"| node_routine_editor
node_routes -->|"routes to"| node_completed
node_routes -->|"routes to"| node_notes_page
node_routes -->|"routes to"| node_syllabus
node_routes -->|"routes to"| node_dopamine
node_home -->|"reads routines"| node_routine_store
node_home -.->|"writes routines"| node_routine_store
node_home -->|"renders"| node_routine_edit
node_home -->|"renders"| node_habits
node_home -->|"renders"| node_calendar
node_home -->|"looks up stickers"| node_routine_catalog
node_home -->|"cancels alerts"| node_routine_alerts
node_routine_editor -->|"uses catalog"| node_routine_catalog
node_routine_editor -->|"schedules alerts"| node_routine_alerts
node_routine_editor -.->|"writes routines"| node_routine_store
node_todo_page -->|"renders"| node_todo_create
node_todo_page -->|"writes todos"| node_routine_store
node_todo_create -.->|"renders"| node_alarm_picker
node_todo_create -->|"uses alerts"| node_todo_alert
node_todo_page -.->|"cancels alarms"| node_todo_alert
node_routes -->|"restores alarms"| node_todo_alert
node_routes -->|"restores alerts"| node_routine_alerts
node_todo_alert -.->|"schedules"| node_notifications
node_routine_alerts -.->|"schedules"| node_notifications
node_alarm_service -.->|"delegates"| node_alarm_runtime
node_todo_page -.->|"navigates to"| node_completed
node_analytics -.->|"reads routine data"| node_routine_store
node_notes_page -->|"renders"| node_note_editor
node_note_editor -->|"requests AI"| node_ai_service
node_syllabus -->|"requests AI"| node_ai_service
node_dopamine -->|"uses notes"| node_note_editor
node_profile -->|"tests notification"| node_notifications
node_backup -.->|"backs up data"| node_routine_store

click node_entry "https://github.com/rupesh040/myturn/blob/main/src/main.jsx"
click node_routes "https://github.com/rupesh040/myturn/blob/main/src/App.jsx"
click node_home "https://github.com/rupesh040/myturn/blob/main/src/page/Home.jsx"
click node_routine_editor "https://github.com/rupesh040/myturn/blob/main/src/page/CreateRoutine.jsx"
click node_routine_catalog "https://github.com/rupesh040/myturn/blob/main/src/components/Routine.js"
click node_routine_alerts "https://github.com/rupesh040/myturn/blob/main/src/components/RoutineAlert.js"
click node_habits "https://github.com/rupesh040/myturn/blob/main/src/components/Habits.js"
click node_routine_edit "https://github.com/rupesh040/myturn/blob/main/src/components/EditRoutine.jsx"
click node_calendar "https://github.com/rupesh040/myturn/blob/main/src/components/CalendarModal.jsx"
click node_todo_page "https://github.com/rupesh040/myturn/blob/main/src/page/Todo.jsx"
click node_todo_create "https://github.com/rupesh040/myturn/blob/main/src/components/Todocreate.jsx"
click node_alarm_picker "https://github.com/rupesh040/myturn/blob/main/src/components/AlarmTimeTodo.jsx"
click node_todo_alert "https://github.com/rupesh040/myturn/blob/main/src/components/TodoAlert.js"
click node_alarm_service "https://github.com/rupesh040/myturn/blob/main/src/components/alarmService.js"
click node_alarm_runtime "https://github.com/rupesh040/myturn/blob/main/src/components/alarm.js"
click node_completed "https://github.com/rupesh040/myturn/blob/main/src/page/CompletedTodo.jsx"
click node_analytics "https://github.com/rupesh040/myturn/blob/main/src/page/Analytics.jsx"
click node_notes_page "https://github.com/rupesh040/myturn/blob/main/src/page/Notes.jsx"
click node_note_editor "https://github.com/rupesh040/myturn/blob/main/src/components/Note.jsx"
click node_syllabus "https://github.com/rupesh040/myturn/blob/main/src/page/Syllabus.jsx"
click node_dopamine "https://github.com/rupesh040/myturn/blob/main/src/page/Dopamine.jsx"
click node_profile "https://github.com/rupesh040/myturn/blob/main/src/page/Profile.jsx"
click node_customize "https://github.com/rupesh040/myturn/blob/main/src/page/TodoCustomize.jsx"
click node_meeple "https://github.com/rupesh040/myturn/blob/main/src/page/Meeple.jsx"
click node_backup "https://github.com/rupesh040/myturn/blob/main/src/page/Backup.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_entry,node_routes,node_user toneBlue
class node_home,node_routine_editor,node_routine_catalog,node_routine_alerts,node_habits,node_routine_edit,node_calendar,node_routine_store toneAmber
class node_todo_page,node_todo_create,node_alarm_picker,node_todo_alert,node_alarm_service,node_alarm_runtime,node_completed toneMint
class node_analytics,node_notes_page,node_note_editor,node_syllabus,node_dopamine toneRose
class node_profile,node_customize,node_meeple,node_backup,node_ai_service,node_notifications toneIndigo
```

## Components

### App navigation

- [React entry](https://github.com/rupesh040/myturn/blob/main/src/main.jsx): `src/main.jsx`
- [Route shell](https://github.com/rupesh040/myturn/blob/main/src/App.jsx): `src/App.jsx`

### Routine planning

- [Routine dashboard](https://github.com/rupesh040/myturn/blob/main/src/page/Home.jsx): `src/page/Home.jsx`
- [Routine editor](https://github.com/rupesh040/myturn/blob/main/src/page/CreateRoutine.jsx): `src/page/CreateRoutine.jsx`
- [Routine stickers](https://github.com/rupesh040/myturn/blob/main/src/components/Routine.js): `src/components/Routine.js`
- [Routine alerts](https://github.com/rupesh040/myturn/blob/main/src/components/RoutineAlert.js): `src/components/RoutineAlert.js`
- [Habit tracking](https://github.com/rupesh040/myturn/blob/main/src/components/Habits.js): `src/components/Habits.js`
- [Edit routine](https://github.com/rupesh040/myturn/blob/main/src/components/EditRoutine.jsx): `src/components/EditRoutine.jsx`
- [Calendar picker](https://github.com/rupesh040/myturn/blob/main/src/components/CalendarModal.jsx): `src/components/CalendarModal.jsx`

### Task tracking

- [To-do manager](https://github.com/rupesh040/myturn/blob/main/src/page/Todo.jsx): `src/page/Todo.jsx`
- [To-do creation](https://github.com/rupesh040/myturn/blob/main/src/components/Todocreate.jsx): `src/components/Todocreate.jsx`
- [Time picker](https://github.com/rupesh040/myturn/blob/main/src/components/AlarmTimeTodo.jsx): `src/components/AlarmTimeTodo.jsx`
- [To-do alerts](https://github.com/rupesh040/myturn/blob/main/src/components/TodoAlert.js): `src/components/TodoAlert.js`
- [Alarm service](https://github.com/rupesh040/myturn/blob/main/src/components/alarmService.js): `src/components/alarmService.js`
- [Alarm runtime](https://github.com/rupesh040/myturn/blob/main/src/components/alarm.js): `src/components/alarm.js`
- [Completed tasks](https://github.com/rupesh040/myturn/blob/main/src/page/CompletedTodo.jsx): `src/page/CompletedTodo.jsx`

### Notes and insights

- [Analytics](https://github.com/rupesh040/myturn/blob/main/src/page/Analytics.jsx): `src/page/Analytics.jsx`
- [Notes](https://github.com/rupesh040/myturn/blob/main/src/page/Notes.jsx): `src/page/Notes.jsx`
- [Note editor](https://github.com/rupesh040/myturn/blob/main/src/components/Note.jsx): `src/components/Note.jsx`
- [Syllabus editor](https://github.com/rupesh040/myturn/blob/main/src/page/Syllabus.jsx): `src/page/Syllabus.jsx`
- [Motivation](https://github.com/rupesh040/myturn/blob/main/src/page/Dopamine.jsx): `src/page/Dopamine.jsx`

### Personalization

- [Profile settings](https://github.com/rupesh040/myturn/blob/main/src/page/Profile.jsx): `src/page/Profile.jsx`
- [To-do customization](https://github.com/rupesh040/myturn/blob/main/src/page/TodoCustomize.jsx): `src/page/TodoCustomize.jsx`
- [Meeple collection](https://github.com/rupesh040/myturn/blob/main/src/page/Meeple.jsx): `src/page/Meeple.jsx`
- [Backup](https://github.com/rupesh040/myturn/blob/main/src/page/Backup.jsx): `src/page/Backup.jsx`

### Other components

- **User**
- **Google AI**
- **Browser local storage**
- **Device notifications**

## Connections

- User → React entry: opens app (evidence: `src/main.jsx`)
- React entry → Route shell: renders (evidence: `src/main.jsx`)
- Route shell → Routine dashboard: routes to (evidence: `src/App.jsx`)
- Route shell → To-do manager: routes to (evidence: `src/App.jsx`)
- Route shell → Analytics: routes to (evidence: `src/App.jsx`)
- Route shell → Profile settings: routes to (evidence: `src/App.jsx`)
- Route shell → To-do customization: routes to (evidence: `src/App.jsx`)
- Route shell → Meeple collection: routes to (evidence: `src/App.jsx`)
- Route shell → Backup: routes to (evidence: `src/App.jsx`)
- Route shell → Routine editor: routes to (evidence: `src/App.jsx`)
- Route shell → Completed tasks: routes to (evidence: `src/App.jsx`)
- Route shell → Notes: routes to (evidence: `src/App.jsx`)
- Route shell → Syllabus editor: routes to (evidence: `src/App.jsx`)
- Route shell → Motivation: routes to (evidence: `src/App.jsx`)
- Routine dashboard → Browser local storage: reads routines (evidence: `src/page/Home.jsx`)
- Routine dashboard → Browser local storage: writes routines
- Routine dashboard → Edit routine: renders (evidence: `src/page/Home.jsx`)
- Routine dashboard → Habit tracking: renders (evidence: `src/page/Home.jsx`)
- Routine dashboard → Calendar picker: renders (evidence: `src/page/Home.jsx`)
- Routine dashboard → Routine stickers: looks up stickers (evidence: `src/page/Home.jsx`)
- Routine dashboard → Routine alerts: cancels alerts (evidence: `src/page/Home.jsx`)
- Routine editor → Routine stickers: uses catalog (evidence: `src/page/CreateRoutine.jsx`)
- Routine editor → Routine alerts: schedules alerts (evidence: `src/page/CreateRoutine.jsx`)
- Routine editor → Browser local storage: writes routines
- To-do manager → To-do creation: renders (evidence: `src/page/Todo.jsx`)
- To-do manager → Browser local storage: writes todos (evidence: `src/page/Todo.jsx`)
- To-do creation → Time picker: renders (evidence: `src/components/Todocreate.jsx`)
- To-do creation → To-do alerts: uses alerts (evidence: `src/components/Todocreate.jsx`)
- To-do manager → To-do alerts: cancels alarms (evidence: `src/page/Todo.jsx`)
- Route shell → To-do alerts: restores alarms (evidence: `src/App.jsx`)
- Route shell → Routine alerts: restores alerts (evidence: `src/App.jsx`)
- To-do alerts → Device notifications: schedules
- Routine alerts → Device notifications: schedules
- Alarm service → Alarm runtime: delegates
- To-do manager → Completed tasks: navigates to
- Analytics → Browser local storage: reads routine data
- Notes → Note editor: renders (evidence: `src/page/Notes.jsx`)
- Note editor → Google AI: requests AI (evidence: `src/components/Note.jsx`)
- Syllabus editor → Google AI: requests AI (evidence: `src/page/Syllabus.jsx`)
- Motivation → Note editor: uses notes (evidence: `src/page/Dopamine.jsx`)
- Profile settings → Device notifications: tests notification (evidence: `src/page/Profile.jsx`)
- Backup → Browser local storage: backs up data
