# sunilmishra123/smart-productivity-daily-management-app architecture

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

- Interactive diagram: https://gitdiagram.com/sunilmishra123/smart-productivity-daily-management-app
- Repository: https://github.com/sunilmishra123/smart-productivity-daily-management-app

## Overview

SmartFlow is a React Native productivity app backed by an Express/Mongoose API. Users enter through login or registration, then navigate to task, notes, expense, event, dashboard, and analytics screens; the backend exposes corresponding API routes and persists domain records. The README documents richer capabilities such as note search/pinning, budgets, repeating events, and reminders. Several screen and route implementations were not sampled, so their internal calls and the frontend-to-backend transport are not asserted; that boundary is shown as unverified.

Main entry points: [`SmartFlowApp-frontend/App.js`](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/App.js) (App navigation), [`smartflow-backend/server.js`](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/server.js) (HTTP server), [`smartflow-backend/routes/dashboard.js`](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/routes/dashboard.js) (Dashboard route), [`smartflow-backend/routes/auth.js`](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/routes/auth.js) (Authentication routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile app"]
  node_app["App navigation<br/>[App.js]"]
  node_authstate["Auth state<br/>[AuthContext.js]"]
  node_api_client["API client<br/>[api.js]"]
  node_login["Login<br/>[LoginScreen.js]"]
  node_register["Registration<br/>[RegisterScreen.js]"]
  node_dashboard["Dashboard<br/>[DashboardScreen.js]"]
  node_tasks_ui["Task management<br/>[TasksScreen.js]"]
  node_notes_ui["Notes<br/>[NotesScreen.js]"]
  node_expenses_ui["Expense tracking<br/>[ExpensesScreen.js]"]
  node_events_ui["Events<br/>[EventsScreen.js]"]
  node_analytics_ui["Analytics<br/>[AnalyticsScreen.js]"]
end

subgraph group_api["Backend API"]
  node_server["HTTP server<br/>[server.js]"]
  node_auth_routes["Authentication routes<br/>[auth.js]"]
  node_tasks_routes["Task routes<br/>[tasks.js]"]
  node_notes_routes["Note routes<br/>[notes.js]"]
  node_expenses_routes["Expense routes<br/>[expenses.js]"]
  node_events_routes["Event routes<br/>[events.js]"]
  node_dashboard_route["Dashboard route<br/>[dashboard.js]"]
  node_analytics_routes["Analytics route<br/>[analyticsRoutes.js]"]
  node_auth_middleware["JWT middleware<br/>[auth.js]"]
  node_reminders["Reminder job<br/>[reminderJob.js]"]
end

subgraph group_domain["Domain data"]
  node_user_model[("User record<br/>[User.js]")]
  node_task_model[("Task record<br/>[Task.js]")]
  node_note_model[("Note record<br/>[Note.js]")]
  node_expense_model[("Expense record<br/>[Expense.js]")]
  node_event_model[("Event record<br/>[Event.js]")]
end

node_user(("App user"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_register
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_tasks_ui
node_app -->|"routes to"| node_notes_ui
node_app -->|"routes to"| node_expenses_ui
node_app -->|"routes to"| node_events_ui
node_app -->|"routes to"| node_analytics_ui
node_authstate -->|"calls"| node_api_client
node_app -.->|"sends requests"| node_server
node_server -->|"mounts"| node_auth_routes
node_server -->|"mounts"| node_tasks_routes
node_server -->|"mounts"| node_notes_routes
node_server -->|"mounts"| node_expenses_routes
node_server -->|"mounts"| node_events_routes
node_server -->|"mounts"| node_dashboard_route
node_server -->|"mounts"| node_analytics_routes
node_server -->|"loads"| node_reminders
node_auth_routes -->|"queries"| node_user_model
node_auth_routes -->|"protects profile"| node_auth_middleware
node_tasks_routes -->|"checks token"| node_auth_middleware
node_tasks_routes -->|"reads and writes"| node_task_model
node_notes_routes -->|"uses"| node_note_model
node_dashboard_route -->|"queries"| node_task_model
node_dashboard_route -->|"queries"| node_note_model
node_dashboard_route -->|"queries"| node_expense_model
node_dashboard_route -->|"queries"| node_event_model
node_dashboard_route -->|"checks token"| node_auth_middleware
node_analytics_routes -->|"counts"| node_task_model
node_analytics_routes -->|"aggregates"| node_expense_model

click node_app "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/App.js"
click node_authstate "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/context/AuthContext.js"
click node_api_client "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/api/api.js"
click node_login "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/screens/LoginScreen.js"
click node_register "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/screens/RegisterScreen.js"
click node_dashboard "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/screens/DashboardScreen.js"
click node_tasks_ui "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/screens/TasksScreen.js"
click node_notes_ui "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/screens/NotesScreen.js"
click node_expenses_ui "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/screens/ExpensesScreen.js"
click node_events_ui "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/screens/EventsScreen.js"
click node_analytics_ui "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/screens/AnalyticsScreen.js"
click node_server "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/server.js"
click node_auth_routes "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/routes/auth.js"
click node_tasks_routes "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/routes/tasks.js"
click node_notes_routes "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/routes/notes.js"
click node_expenses_routes "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/routes/expenses.js"
click node_events_routes "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/routes/events.js"
click node_dashboard_route "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/routes/dashboard.js"
click node_analytics_routes "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/routes/analyticsRoutes.js"
click node_auth_middleware "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/middleware/auth.js"
click node_user_model "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/models/User.js"
click node_task_model "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/models/Task.js"
click node_note_model "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/models/Note.js"
click node_expense_model "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/models/Expense.js"
click node_event_model "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/models/Event.js"
click node_reminders "https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/jobs/reminderJob.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_authstate,node_api_client,node_login,node_register,node_dashboard,node_tasks_ui,node_notes_ui,node_expenses_ui,node_events_ui,node_analytics_ui,node_user toneBlue
class node_server,node_auth_routes,node_tasks_routes,node_notes_routes,node_expenses_routes,node_events_routes,node_dashboard_route,node_analytics_routes,node_auth_middleware,node_reminders toneAmber
class node_user_model,node_task_model,node_note_model,node_expense_model,node_event_model toneMint
```

## Components

### Mobile app

- [App navigation](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/App.js): `SmartFlowApp-frontend/App.js`
- [Auth state](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/context/AuthContext.js): `SmartFlowApp-frontend/src/context/AuthContext.js`
- [API client](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/api/api.js): `SmartFlowApp-frontend/src/api/api.js`
- [Login](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/screens/LoginScreen.js): `SmartFlowApp-frontend/src/screens/LoginScreen.js`
- [Registration](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/screens/RegisterScreen.js): `SmartFlowApp-frontend/src/screens/RegisterScreen.js`
- [Dashboard](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/screens/DashboardScreen.js): `SmartFlowApp-frontend/src/screens/DashboardScreen.js`
- [Task management](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/screens/TasksScreen.js): `SmartFlowApp-frontend/src/screens/TasksScreen.js`
- [Notes](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/screens/NotesScreen.js): `SmartFlowApp-frontend/src/screens/NotesScreen.js`
- [Expense tracking](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/screens/ExpensesScreen.js): `SmartFlowApp-frontend/src/screens/ExpensesScreen.js`
- [Events](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/screens/EventsScreen.js): `SmartFlowApp-frontend/src/screens/EventsScreen.js`
- [Analytics](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/SmartFlowApp-frontend/src/screens/AnalyticsScreen.js): `SmartFlowApp-frontend/src/screens/AnalyticsScreen.js`

### Backend API

- [HTTP server](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/server.js): `smartflow-backend/server.js`
- [Authentication routes](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/routes/auth.js): `smartflow-backend/routes/auth.js`
- [Task routes](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/routes/tasks.js): `smartflow-backend/routes/tasks.js`
- [Note routes](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/routes/notes.js): `smartflow-backend/routes/notes.js`
- [Expense routes](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/routes/expenses.js): `smartflow-backend/routes/expenses.js`
- [Event routes](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/routes/events.js): `smartflow-backend/routes/events.js`
- [Dashboard route](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/routes/dashboard.js): `smartflow-backend/routes/dashboard.js`
- [Analytics route](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/routes/analyticsRoutes.js): `smartflow-backend/routes/analyticsRoutes.js`
- [JWT middleware](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/middleware/auth.js): `smartflow-backend/middleware/auth.js`
- [Reminder job](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/jobs/reminderJob.js): `smartflow-backend/jobs/reminderJob.js`

### Domain data

- [User record](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/models/User.js): `smartflow-backend/models/User.js`
- [Task record](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/models/Task.js): `smartflow-backend/models/Task.js`
- [Note record](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/models/Note.js): `smartflow-backend/models/Note.js`
- [Expense record](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/models/Expense.js): `smartflow-backend/models/Expense.js`
- [Event record](https://github.com/sunilmishra123/smart-productivity-daily-management-app/blob/main/smartflow-backend/models/Event.js): `smartflow-backend/models/Event.js`

### Other components

- **App user**

## Connections

- App user → App navigation: uses (evidence: `SmartFlowApp-frontend/App.js`)
- App navigation → Login: routes to (evidence: `SmartFlowApp-frontend/App.js`)
- App navigation → Registration: routes to (evidence: `SmartFlowApp-frontend/App.js`)
- App navigation → Dashboard: routes to (evidence: `SmartFlowApp-frontend/App.js`)
- App navigation → Task management: routes to (evidence: `SmartFlowApp-frontend/App.js`)
- App navigation → Notes: routes to (evidence: `SmartFlowApp-frontend/App.js`)
- App navigation → Expense tracking: routes to (evidence: `SmartFlowApp-frontend/App.js`)
- App navigation → Events: routes to (evidence: `SmartFlowApp-frontend/App.js`)
- App navigation → Analytics: routes to (evidence: `SmartFlowApp-frontend/App.js`)
- Auth state → API client: calls (evidence: `SmartFlowApp-frontend/src/context/AuthContext.js`)
- App navigation → HTTP server: sends requests
- HTTP server → Authentication routes: mounts (evidence: `smartflow-backend/server.js`)
- HTTP server → Task routes: mounts (evidence: `smartflow-backend/server.js`)
- HTTP server → Note routes: mounts (evidence: `smartflow-backend/server.js`)
- HTTP server → Expense routes: mounts (evidence: `smartflow-backend/server.js`)
- HTTP server → Event routes: mounts (evidence: `smartflow-backend/server.js`)
- HTTP server → Dashboard route: mounts (evidence: `smartflow-backend/server.js`)
- HTTP server → Analytics route: mounts (evidence: `smartflow-backend/server.js`)
- HTTP server → Reminder job: loads (evidence: `smartflow-backend/server.js`)
- Authentication routes → User record: queries (evidence: `smartflow-backend/routes/auth.js`)
- Authentication routes → JWT middleware: protects profile (evidence: `smartflow-backend/routes/auth.js`)
- Task routes → JWT middleware: checks token (evidence: `smartflow-backend/routes/tasks.js`)
- Task routes → Task record: reads and writes (evidence: `smartflow-backend/routes/tasks.js`)
- Note routes → Note record: uses (evidence: `smartflow-backend/routes/notes.js`)
- Dashboard route → Task record: queries (evidence: `smartflow-backend/routes/dashboard.js`)
- Dashboard route → Note record: queries (evidence: `smartflow-backend/routes/dashboard.js`)
- Dashboard route → Expense record: queries (evidence: `smartflow-backend/routes/dashboard.js`)
- Dashboard route → Event record: queries (evidence: `smartflow-backend/routes/dashboard.js`)
- Dashboard route → JWT middleware: checks token (evidence: `smartflow-backend/routes/dashboard.js`)
- Analytics route → Task record: counts (evidence: `smartflow-backend/routes/analyticsRoutes.js`)
- Analytics route → Expense record: aggregates (evidence: `smartflow-backend/routes/analyticsRoutes.js`)
