How rsavnani18/todoapp-mern-capacitor works
ToDoApp is a web and Capacitor task-and-notes workspace backed by an Express/MongoDB API. Users authenticate, then manage priority tasks and Keep-style notes/checklists, including filtering, archiving, trash, reminders, and conversions between notes and tasks. The graph follows the documented client-to-API workflow and source-indexed calls; some backend routes and UI components were not excerpted, so their links rely on the README or indexed references rather than assumptions about unsampled code.
Main entry points: App.tsx App shell · HomeScreen.tsx Workspace screen · capacitor.ts Native reminders · app.ts Express API
Components 25
React Client
- App shell
frontend/src/App.tsx - Sign-in UI
frontend/src/screens/AuthScreen.tsx - Session state
frontend/src/context/AuthContext.tsx - Theme state
frontend/src/context/ThemeContext.tsx - Workspace screen
frontend/src/screens/HomeScreen.tsx - Profile screen
frontend/src/screens/ProfileScreen.tsx - Task controls
frontend/src/components/TodoSheet.tsx - Note editor
frontend/src/components/NoteEditorSheet.tsx - Note cards
frontend/src/components/NoteCard.tsx - REST client
frontend/src/services/api.ts
API and Security
- Express API
backend/src/app.ts - Auth routes
backend/src/routes/auth.routes.ts - Task routes
backend/src/routes/todo.routes.ts - Note routes
backend/src/routes/note.routes.ts - JWT guard
backend/src/middleware/auth.middleware.ts
Domain Data
- Auth operations
backend/src/controllers/auth.controller.ts - Task operations
backend/src/controllers/todo.controller.ts - Note operations
backend/src/controllers/note.controller.ts - User records
backend/src/models/user.model.ts - Task records
backend/src/models/todo.model.ts - Note records
backend/src/models/note.model.ts
Native Features
- Native reminders
frontend/src/services/capacitor.ts
Other components
- Workspace user
- Capacitor platform
- MongoDB
Connections 35
- Workspace user → App shell: uses
README.md - App shell → Sign-in UI: shows
frontend/src/App.tsx - App shell → Workspace screen: shows
frontend/src/App.tsx - App shell → Profile screen: shows
frontend/src/App.tsx - Sign-in UI → Session state: authenticates through
frontend/src/screens/AuthScreen.tsx - Session state → REST client: calls
frontend/src/context/AuthContext.tsx - App shell → Session state: reads session
frontend/src/App.tsx - Workspace screen → REST client: loads and updates
frontend/src/screens/HomeScreen.tsx - Workspace screen → Task controls: opens
frontend/src/screens/HomeScreen.tsx - Workspace screen → Note editor: opens
frontend/src/screens/HomeScreen.tsx - Workspace screen → Note cards: renders
frontend/src/screens/HomeScreen.tsx - Profile screen → REST client: calls
frontend/src/screens/ProfileScreen.tsx - REST client → Express API: sends REST requests
README.md - Express API → Auth routes: mounts
backend/src/app.ts - Express API → Task routes: mounts
backend/src/app.ts - Express API → Note routes: mounts
backend/src/app.ts - Auth routes → JWT guard: uses
backend/src/routes/auth.routes.ts - Auth routes → Auth operations: routes to
backend/src/routes/auth.routes.ts - Task routes → JWT guard: protects routes
backend/src/routes/todo.routes.ts - Task routes → Task operations: routes to
backend/src/routes/todo.routes.ts - Note routes → JWT guard: protects routes
backend/src/routes/note.routes.ts - Note routes → Note operations: routes to
backend/src/routes/note.routes.ts - Auth operations → User records: reads and writes
backend/src/controllers/auth.controller.ts - Task operations → Task records: reads and writes
backend/src/controllers/todo.controller.ts - Task operations → Note records: creates converted notes
backend/src/controllers/todo.controller.ts - Note operations → Note records: reads and writes
backend/src/controllers/note.controller.ts - Note operations → Task records: creates converted tasks
backend/src/controllers/note.controller.ts - User records → MongoDB: persists
- Task records → MongoDB: persists
- Note records → MongoDB: persists
- Note editor → Native reminders: schedules reminders
README.md - Task controls → Native reminders: schedules reminders
README.md - Sign-in UI → Native reminders: uses haptics
frontend/src/screens/AuthScreen.tsx - Theme state → Native reminders: syncs status bar
frontend/src/context/ThemeContext.tsx - Native reminders → Capacitor platform: invokes plugins
frontend/src/services/capacitor.ts