# nghia2904/notein architecture

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

- Interactive diagram: https://gitdiagram.com/nghia2904/notein
- Repository: https://github.com/nghia2904/notein

## Overview

NoteIn is a personal schedule app with mobile maintenance and finance features, plus a broader web workspace. The main workflow is selecting a day or daily schedule, reading and editing schedule data through the local API/store, and deriving a timeline; mobile app coordination also syncs lock-screen activity and Android notifications. README documents persistence and major platform capabilities. Some feature modules were not excerpted, so their internal relationships are included only where the source index or README supports them.

Main entry points: [`src/app/index.tsx`](https://github.com/nghia2904/notein/blob/main/src/app/index.tsx) (Home screen), [`src/components/web/WebWorkspace.tsx`](https://github.com/nghia2904/notein/blob/main/src/components/web/WebWorkspace.tsx) (Web workspace), [`src/components/VehicleMaintenanceModal.tsx`](https://github.com/nghia2904/notein/blob/main/src/components/VehicleMaintenanceModal.tsx) (Vehicle maintenance), [`src/components/MonthlyExpensesModal.tsx`](https://github.com/nghia2904/notein/blob/main/src/components/MonthlyExpensesModal.tsx) (Expense ledger)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_schedule["Schedule"]
  node_home_screen["Home screen<br/>[index.tsx]"]
  node_daily_tab["Daily schedule<br/>[DailyTab.tsx]"]
  node_calendar_tab["Calendar events<br/>[CalendarTab.tsx]"]
  node_other_tab["Settings<br/>[OtherTab.tsx]"]
end

subgraph group_state["State and logic"]
  node_schedule_api["Schedule API<br/>[schedule.api.ts]"]
  node_schedule_engine["Timeline engine<br/>[schedule.ts]"]
  node_schedule_store[("Persisted state<br/>[scheduleStore.ts]")]
  node_schedule_types["Schedule types<br/>[schedule.ts]"]
end

subgraph group_mobile["Mobile integrations"]
  node_lock_sync["Live Activity sync<br/>[lockScreenSync.ts]"]
  node_android_notify["Android schedule alerts"]
  node_ios_plugin["iOS widget bridge"]
  node_maintenance_notify["Maintenance reminders"]
end

subgraph group_personal["Personal tools"]
  node_periodic_tab["Periodic tools<br/>[PeriodicTab.tsx]"]
  node_vehicle_modal["Vehicle maintenance"]
  node_maintenance_engine["Maintenance engine<br/>[engine.ts]"]
  node_maintenance_catalog["Vehicle parts catalog<br/>[catalog.ts]"]
  node_expenses_modal["Expense ledger"]
  node_expenses_engine["Expense engine<br/>[engine.ts]"]
  node_expenses_catalog["Expense catalog<br/>[catalog.ts]"]
end

subgraph group_web["Web workspace"]
  node_web_workspace["Web workspace<br/>[WebWorkspace.tsx]"]
  node_web_dashboard["Web dashboard"]
  node_web_finance["Web finance<br/>[WebFinanceTab.tsx]"]
  node_web_projects["Web projects<br/>[WebProjectTab.tsx]"]
  node_web_notes["Web quick notes"]
  node_web_reminders["Web reminders<br/>[WebReminderTab.tsx]"]
  node_web_tasks["Web tasks<br/>[WebTasksTab.tsx]"]
end

node_user(("User"))
node_native_os{{"Mobile OS"}}

node_user -->|"uses"| node_home_screen
node_home_screen -->|"renders"| node_daily_tab
node_home_screen -->|"renders"| node_calendar_tab
node_home_screen -->|"renders"| node_other_tab
node_home_screen -->|"renders"| node_periodic_tab
node_daily_tab -->|"reads and edits"| node_schedule_api
node_calendar_tab -->|"reads and edits"| node_schedule_api
node_schedule_api -->|"reads and writes"| node_schedule_store
node_schedule_api -->|"builds timeline"| node_schedule_engine
node_schedule_engine -->|"uses types"| node_schedule_types
node_schedule_store -->|"stores schedule data"| node_schedule_types
node_home_screen -->|"syncs activity"| node_lock_sync
node_home_screen -->|"refreshes alerts"| node_android_notify
node_lock_sync -->|"updates Live Activity"| node_native_os
node_ios_plugin -->|"provides widget bridge"| node_native_os
node_periodic_tab -->|"opens"| node_vehicle_modal
node_vehicle_modal -->|"calculates status"| node_maintenance_engine
node_vehicle_modal -->|"loads part definitions"| node_maintenance_catalog
node_vehicle_modal -->|"reads and updates"| node_schedule_store
node_vehicle_modal -->|"schedules reminders"| node_maintenance_notify
node_maintenance_notify -->|"schedules alerts"| node_native_os
node_periodic_tab -->|"opens"| node_expenses_modal
node_expenses_modal -->|"calculates ledger"| node_expenses_engine
node_expenses_modal -->|"uses categories"| node_expenses_catalog
node_expenses_modal -->|"reads and updates"| node_schedule_store
node_web_workspace -.->|"hosts"| node_web_dashboard
node_web_workspace -.->|"hosts"| node_web_finance
node_web_workspace -.->|"hosts"| node_web_projects
node_web_workspace -.->|"hosts"| node_web_notes
node_web_workspace -.->|"hosts"| node_web_reminders
node_web_workspace -.->|"hosts"| node_web_tasks

click node_home_screen "https://github.com/nghia2904/notein/blob/main/src/app/index.tsx"
click node_daily_tab "https://github.com/nghia2904/notein/blob/main/src/components/DailyTab.tsx"
click node_calendar_tab "https://github.com/nghia2904/notein/blob/main/src/components/CalendarTab.tsx"
click node_other_tab "https://github.com/nghia2904/notein/blob/main/src/components/OtherTab.tsx"
click node_periodic_tab "https://github.com/nghia2904/notein/blob/main/src/components/PeriodicTab.tsx"
click node_schedule_api "https://github.com/nghia2904/notein/blob/main/src/api/schedule.api.ts"
click node_schedule_engine "https://github.com/nghia2904/notein/blob/main/src/engine/schedule.ts"
click node_schedule_store "https://github.com/nghia2904/notein/blob/main/src/store/scheduleStore.ts"
click node_schedule_types "https://github.com/nghia2904/notein/blob/main/src/types/schedule.ts"
click node_lock_sync "https://github.com/nghia2904/notein/blob/main/src/services/lockScreenSync.ts"
click node_android_notify "https://github.com/nghia2904/notein/blob/main/src/services/androidScheduleNotification.ts"
click node_ios_plugin "https://github.com/nghia2904/notein/blob/main/plugins/withNoteInLockScreen.js"
click node_vehicle_modal "https://github.com/nghia2904/notein/blob/main/src/components/VehicleMaintenanceModal.tsx"
click node_maintenance_engine "https://github.com/nghia2904/notein/blob/main/src/maintenance/engine.ts"
click node_maintenance_catalog "https://github.com/nghia2904/notein/blob/main/src/maintenance/catalog.ts"
click node_maintenance_notify "https://github.com/nghia2904/notein/blob/main/src/services/maintenanceNotifications.ts"
click node_expenses_modal "https://github.com/nghia2904/notein/blob/main/src/components/MonthlyExpensesModal.tsx"
click node_expenses_engine "https://github.com/nghia2904/notein/blob/main/src/expenses/engine.ts"
click node_expenses_catalog "https://github.com/nghia2904/notein/blob/main/src/expenses/catalog.ts"
click node_web_workspace "https://github.com/nghia2904/notein/blob/main/src/components/web/WebWorkspace.tsx"
click node_web_dashboard "https://github.com/nghia2904/notein/blob/main/src/components/web/WebDashboardTab.tsx"
click node_web_finance "https://github.com/nghia2904/notein/blob/main/src/components/web/WebFinanceTab.tsx"
click node_web_projects "https://github.com/nghia2904/notein/blob/main/src/components/web/WebProjectTab.tsx"
click node_web_notes "https://github.com/nghia2904/notein/blob/main/src/components/web/WebQuickNoteTab.tsx"
click node_web_reminders "https://github.com/nghia2904/notein/blob/main/src/components/web/WebReminderTab.tsx"
click node_web_tasks "https://github.com/nghia2904/notein/blob/main/src/components/web/WebTasksTab.tsx"

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_home_screen,node_daily_tab,node_calendar_tab,node_other_tab,node_user toneBlue
class node_schedule_api,node_schedule_engine,node_schedule_store,node_schedule_types toneAmber
class node_lock_sync,node_android_notify,node_ios_plugin,node_maintenance_notify toneMint
class node_periodic_tab,node_vehicle_modal,node_maintenance_engine,node_maintenance_catalog,node_expenses_modal,node_expenses_engine,node_expenses_catalog toneRose
class node_web_workspace,node_web_dashboard,node_web_finance,node_web_projects,node_web_notes,node_web_reminders,node_web_tasks,node_native_os toneIndigo
```

## Components

### Schedule

- [Home screen](https://github.com/nghia2904/notein/blob/main/src/app/index.tsx): `src/app/index.tsx`
- [Daily schedule](https://github.com/nghia2904/notein/blob/main/src/components/DailyTab.tsx): `src/components/DailyTab.tsx`
- [Calendar events](https://github.com/nghia2904/notein/blob/main/src/components/CalendarTab.tsx): `src/components/CalendarTab.tsx`
- [Settings](https://github.com/nghia2904/notein/blob/main/src/components/OtherTab.tsx): `src/components/OtherTab.tsx`

### State and logic

- [Schedule API](https://github.com/nghia2904/notein/blob/main/src/api/schedule.api.ts): `src/api/schedule.api.ts`
- [Timeline engine](https://github.com/nghia2904/notein/blob/main/src/engine/schedule.ts): `src/engine/schedule.ts`
- [Persisted state](https://github.com/nghia2904/notein/blob/main/src/store/scheduleStore.ts): `src/store/scheduleStore.ts`
- [Schedule types](https://github.com/nghia2904/notein/blob/main/src/types/schedule.ts): `src/types/schedule.ts`

### Mobile integrations

- [Live Activity sync](https://github.com/nghia2904/notein/blob/main/src/services/lockScreenSync.ts): `src/services/lockScreenSync.ts`
- [Android schedule alerts](https://github.com/nghia2904/notein/blob/main/src/services/androidScheduleNotification.ts): `src/services/androidScheduleNotification.ts`
- [iOS widget bridge](https://github.com/nghia2904/notein/blob/main/plugins/withNoteInLockScreen.js): `plugins/withNoteInLockScreen.js`
- [Maintenance reminders](https://github.com/nghia2904/notein/blob/main/src/services/maintenanceNotifications.ts): `src/services/maintenanceNotifications.ts`

### Personal tools

- [Periodic tools](https://github.com/nghia2904/notein/blob/main/src/components/PeriodicTab.tsx): `src/components/PeriodicTab.tsx`
- [Vehicle maintenance](https://github.com/nghia2904/notein/blob/main/src/components/VehicleMaintenanceModal.tsx): `src/components/VehicleMaintenanceModal.tsx`
- [Maintenance engine](https://github.com/nghia2904/notein/blob/main/src/maintenance/engine.ts): `src/maintenance/engine.ts`
- [Vehicle parts catalog](https://github.com/nghia2904/notein/blob/main/src/maintenance/catalog.ts): `src/maintenance/catalog.ts`
- [Expense ledger](https://github.com/nghia2904/notein/blob/main/src/components/MonthlyExpensesModal.tsx): `src/components/MonthlyExpensesModal.tsx`
- [Expense engine](https://github.com/nghia2904/notein/blob/main/src/expenses/engine.ts): `src/expenses/engine.ts`
- [Expense catalog](https://github.com/nghia2904/notein/blob/main/src/expenses/catalog.ts): `src/expenses/catalog.ts`

### Web workspace

- [Web workspace](https://github.com/nghia2904/notein/blob/main/src/components/web/WebWorkspace.tsx): `src/components/web/WebWorkspace.tsx`
- [Web dashboard](https://github.com/nghia2904/notein/blob/main/src/components/web/WebDashboardTab.tsx): `src/components/web/WebDashboardTab.tsx`
- [Web finance](https://github.com/nghia2904/notein/blob/main/src/components/web/WebFinanceTab.tsx): `src/components/web/WebFinanceTab.tsx`
- [Web projects](https://github.com/nghia2904/notein/blob/main/src/components/web/WebProjectTab.tsx): `src/components/web/WebProjectTab.tsx`
- [Web quick notes](https://github.com/nghia2904/notein/blob/main/src/components/web/WebQuickNoteTab.tsx): `src/components/web/WebQuickNoteTab.tsx`
- [Web reminders](https://github.com/nghia2904/notein/blob/main/src/components/web/WebReminderTab.tsx): `src/components/web/WebReminderTab.tsx`
- [Web tasks](https://github.com/nghia2904/notein/blob/main/src/components/web/WebTasksTab.tsx): `src/components/web/WebTasksTab.tsx`

### Other components

- **User**
- **Mobile OS**

## Connections

- User → Home screen: uses
- Home screen → Daily schedule: renders (evidence: `src/app/index.tsx`)
- Home screen → Calendar events: renders (evidence: `src/app/index.tsx`)
- Home screen → Settings: renders (evidence: `src/app/index.tsx`)
- Home screen → Periodic tools: renders (evidence: `src/app/index.tsx`)
- Daily schedule → Schedule API: reads and edits (evidence: `src/components/DailyTab.tsx`)
- Calendar events → Schedule API: reads and edits (evidence: `src/components/CalendarTab.tsx`)
- Schedule API → Persisted state: reads and writes (evidence: `src/api/schedule.api.ts`)
- Schedule API → Timeline engine: builds timeline (evidence: `src/api/schedule.api.ts`)
- Timeline engine → Schedule types: uses types (evidence: `src/engine/schedule.ts`)
- Persisted state → Schedule types: stores schedule data (evidence: `src/store/scheduleStore.ts`)
- Home screen → Live Activity sync: syncs activity (evidence: `src/app/index.tsx`)
- Home screen → Android schedule alerts: refreshes alerts (evidence: `src/app/index.tsx`)
- Live Activity sync → Mobile OS: updates Live Activity
- iOS widget bridge → Mobile OS: provides widget bridge
- Periodic tools → Vehicle maintenance: opens (evidence: `src/components/PeriodicTab.tsx`)
- Vehicle maintenance → Maintenance engine: calculates status (evidence: `src/components/VehicleMaintenanceModal.tsx`)
- Vehicle maintenance → Vehicle parts catalog: loads part definitions (evidence: `src/components/VehicleMaintenanceModal.tsx`)
- Vehicle maintenance → Persisted state: reads and updates (evidence: `src/components/VehicleMaintenanceModal.tsx`)
- Vehicle maintenance → Maintenance reminders: schedules reminders (evidence: `src/components/VehicleMaintenanceModal.tsx`)
- Maintenance reminders → Mobile OS: schedules alerts
- Periodic tools → Expense ledger: opens (evidence: `src/components/PeriodicTab.tsx`)
- Expense ledger → Expense engine: calculates ledger (evidence: `src/components/MonthlyExpensesModal.tsx`)
- Expense ledger → Expense catalog: uses categories (evidence: `src/components/MonthlyExpensesModal.tsx`)
- Expense ledger → Persisted state: reads and updates (evidence: `src/components/MonthlyExpensesModal.tsx`)
- Web workspace → Web dashboard: hosts
- Web workspace → Web finance: hosts
- Web workspace → Web projects: hosts
- Web workspace → Web quick notes: hosts
- Web workspace → Web reminders: hosts
- Web workspace → Web tasks: hosts
