# kuldeep-sharmaa/remindrai architecture

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

- Interactive diagram: https://gitdiagram.com/kuldeep-sharmaa/remindrai
- Repository: https://github.com/kuldeep-sharmaa/remindrai

## Overview

RemindrAI is a web application for defining a creator’s content identity, scheduling recurring or one-time content deliveries, and receiving prepared drafts in a Deliveries inbox. Users authenticate, set preferences, create reminder intent, and the backend schedules execution and returns drafts for review. The graph includes the documented AI, notification, analytics, and timezone capabilities, but their internal wiring is not fully shown in the excerpts; those links are omitted where evidence is insufficient. Some backend modules are represented by exact source paths from the tree without implying unsampled implementation details.

Main entry points: [`src/features/remindersystem/services/remindrClient.js`](https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/features/remindersystem/services/remindrClient.js) (Reminder client), [`functions/src/execution/executeReminder.ts`](https://github.com/kuldeep-sharmaa/remindrai/blob/main/functions/src/execution/executeReminder.ts) (Reminder execution), [`src/services/firebase.js`](https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/services/firebase.js) (Firebase clients), [`src/App.jsx`](https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/App.jsx) (Route application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web experience"]
  node_app["Route application<br/>[App.jsx]"]
  node_auth_ui["Login and signup<br/>[AuthWrapper.jsx]"]
  node_auth_state["Auth context<br/>[AuthContext.jsx]"]
  node_workspace["Workspace shell"]
  node_onboarding["Content identity"]
  node_draft_inbox["Deliveries inbox<br/>[Content.jsx]"]
  node_timezone_sync["Timezone sync<br/>[useTimezoneSync.js]"]
end

subgraph group_authoring["Reminder authoring"]
  node_reminder_form["Reminder form<br/>[useReminderForm.js]"]
  node_validation["Form validation"]
  node_reminder_screen["Create delivery"]
  node_reminder_client["Reminder client<br/>[remindrClient.js]"]
  node_reminder_query["Reminder query<br/>[useRemindrQuery.js]"]
end

subgraph group_backend["Draft operations"]
  node_functions_entry["Function registry<br/>[index.ts]"]
  node_add_prompt["Add prompt<br/>[addPrompt.ts]"]
  node_scheduler["Scheduler<br/>[runScheduler.ts]"]
  node_execution["Reminder execution<br/>[executeReminder.ts]"]
  node_prompt_builder["AI prompt builder<br/>[buildPrompt.ts]"]
  node_ai_service["AI generation<br/>[callAIOnce.ts]"]
  node_push_sender["Push notification"]
end

subgraph group_platform["Firebase platform"]
  node_profile_service["Account service<br/>[authService.js]"]
  node_reminder_store[("Reminder records")]
  node_firebase["Firebase clients<br/>[firebase.js]"]
  node_firebase_auth["Firebase Auth"]
  node_firestore[("Firestore")]
end

node_visitor(("Visitor or user"))
node_ai_provider["AI provider"]

node_visitor -->|"uses"| node_app
node_app -->|"routes to"| node_auth_ui
node_auth_ui -.->|"authenticates through"| node_auth_state
node_auth_state -->|"updates profile"| node_profile_service
node_profile_service -->|"signs in"| node_firebase_auth
node_profile_service -->|"stores profile"| node_firestore
node_app -->|"routes to"| node_workspace
node_workspace -->|"reads session"| node_auth_state
node_visitor -->|"sets identity"| node_onboarding
node_visitor -->|"creates delivery"| node_reminder_screen
node_reminder_screen -.->|"collects input"| node_reminder_form
node_reminder_form -->|"validates"| node_validation
node_reminder_form -.->|"saves intent"| node_reminder_client
node_reminder_client -->|"calls callable"| node_add_prompt
node_functions_entry -->|"registers"| node_add_prompt
node_functions_entry -->|"registers"| node_scheduler
node_scheduler -->|"dispatches"| node_execution
node_execution -.->|"prepares draft"| node_prompt_builder
node_prompt_builder -.->|"builds generation request"| node_ai_service
node_ai_service -.->|"requests generation"| node_ai_provider
node_execution -.->|"delivers draft"| node_draft_inbox
node_reminder_client -->|"reads reminders"| node_reminder_store
node_reminder_query -->|"queries reminders"| node_reminder_store
node_reminder_client -->|"uses Firestore"| node_firebase
node_reminder_query -->|"uses Firestore"| node_firebase
node_firebase -->|"initializes"| node_firestore
node_firebase -->|"initializes"| node_firebase_auth
node_visitor -.->|"syncs timezone"| node_timezone_sync
node_timezone_sync -->|"writes timezone"| node_firestore
node_execution -.->|"sends notification"| node_push_sender
node_visitor -->|"reviews drafts"| node_draft_inbox

click node_app "https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/App.jsx"
click node_auth_ui "https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/components/auth/AuthWrapper.jsx"
click node_auth_state "https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/context/AuthContext.jsx"
click node_profile_service "https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/services/authService.js"
click node_workspace "https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/layouts/workspaceLayout.jsx"
click node_onboarding "https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/pages/OnboardingSetup.jsx"
click node_reminder_form "https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/features/remindersystem/hooks/useReminderForm.js"
click node_validation "https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/features/remindersystem/hooks/useReminderValidation.js"
click node_reminder_screen "https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/features/remindersystem/screens/CreateReminderScreen.jsx"
click node_reminder_client "https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/features/remindersystem/services/remindrClient.js"
click node_reminder_query "https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/features/remindersystem/hooks/useRemindrQuery.js"
click node_functions_entry "https://github.com/kuldeep-sharmaa/remindrai/blob/main/functions/src/index.ts"
click node_add_prompt "https://github.com/kuldeep-sharmaa/remindrai/blob/main/functions/src/tools/addPrompt.ts"
click node_scheduler "https://github.com/kuldeep-sharmaa/remindrai/blob/main/functions/src/scheduler/runScheduler.ts"
click node_execution "https://github.com/kuldeep-sharmaa/remindrai/blob/main/functions/src/execution/executeReminder.ts"
click node_prompt_builder "https://github.com/kuldeep-sharmaa/remindrai/blob/main/functions/src/ai/buildPrompt.ts"
click node_ai_service "https://github.com/kuldeep-sharmaa/remindrai/blob/main/functions/src/ai/callAIOnce.ts"
click node_draft_inbox "https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/pages/workspace/Content.jsx"
click node_push_sender "https://github.com/kuldeep-sharmaa/remindrai/blob/main/functions/src/notifications/sendPushNotification.ts"
click node_timezone_sync "https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/hooks/useTimezoneSync.js"
click node_firebase "https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/services/firebase.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_auth_ui,node_auth_state,node_workspace,node_onboarding,node_draft_inbox,node_timezone_sync,node_visitor toneBlue
class node_reminder_form,node_validation,node_reminder_screen,node_reminder_client,node_reminder_query toneAmber
class node_functions_entry,node_add_prompt,node_scheduler,node_execution,node_prompt_builder,node_ai_service,node_push_sender toneMint
class node_profile_service,node_reminder_store,node_firebase,node_firebase_auth,node_firestore toneRose
class node_ai_provider toneIndigo
```

## Components

### Web experience

- [Route application](https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/App.jsx): `src/App.jsx`
- [Login and signup](https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/components/auth/AuthWrapper.jsx): `src/components/auth/AuthWrapper.jsx`
- [Auth context](https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/context/AuthContext.jsx): `src/context/AuthContext.jsx`
- [Workspace shell](https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/layouts/workspaceLayout.jsx): `src/layouts/workspaceLayout.jsx`
- [Content identity](https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/pages/OnboardingSetup.jsx): `src/pages/OnboardingSetup.jsx`
- [Deliveries inbox](https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/pages/workspace/Content.jsx): `src/pages/workspace/Content.jsx`
- [Timezone sync](https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/hooks/useTimezoneSync.js): `src/hooks/useTimezoneSync.js`

### Reminder authoring

- [Reminder form](https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/features/remindersystem/hooks/useReminderForm.js): `src/features/remindersystem/hooks/useReminderForm.js`
- [Form validation](https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/features/remindersystem/hooks/useReminderValidation.js): `src/features/remindersystem/hooks/useReminderValidation.js`
- [Create delivery](https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/features/remindersystem/screens/CreateReminderScreen.jsx): `src/features/remindersystem/screens/CreateReminderScreen.jsx`
- [Reminder client](https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/features/remindersystem/services/remindrClient.js): `src/features/remindersystem/services/remindrClient.js`
- [Reminder query](https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/features/remindersystem/hooks/useRemindrQuery.js): `src/features/remindersystem/hooks/useRemindrQuery.js`

### Draft operations

- [Function registry](https://github.com/kuldeep-sharmaa/remindrai/blob/main/functions/src/index.ts): `functions/src/index.ts`
- [Add prompt](https://github.com/kuldeep-sharmaa/remindrai/blob/main/functions/src/tools/addPrompt.ts): `functions/src/tools/addPrompt.ts`
- [Scheduler](https://github.com/kuldeep-sharmaa/remindrai/blob/main/functions/src/scheduler/runScheduler.ts): `functions/src/scheduler/runScheduler.ts`
- [Reminder execution](https://github.com/kuldeep-sharmaa/remindrai/blob/main/functions/src/execution/executeReminder.ts): `functions/src/execution/executeReminder.ts`
- [AI prompt builder](https://github.com/kuldeep-sharmaa/remindrai/blob/main/functions/src/ai/buildPrompt.ts): `functions/src/ai/buildPrompt.ts`
- [AI generation](https://github.com/kuldeep-sharmaa/remindrai/blob/main/functions/src/ai/callAIOnce.ts): `functions/src/ai/callAIOnce.ts`
- [Push notification](https://github.com/kuldeep-sharmaa/remindrai/blob/main/functions/src/notifications/sendPushNotification.ts): `functions/src/notifications/sendPushNotification.ts`

### Firebase platform

- [Account service](https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/services/authService.js): `src/services/authService.js`
- **Reminder records**
- [Firebase clients](https://github.com/kuldeep-sharmaa/remindrai/blob/main/src/services/firebase.js): `src/services/firebase.js`
- **Firebase Auth**
- **Firestore**

### Other components

- **Visitor or user**
- **AI provider**

## Connections

- Visitor or user → Route application: uses (evidence: `README.md`)
- Route application → Login and signup: routes to (evidence: `src/App.jsx`)
- Login and signup → Auth context: authenticates through
- Auth context → Account service: updates profile (evidence: `src/context/AuthContext.jsx`)
- Account service → Firebase Auth: signs in (evidence: `src/services/authService.js`)
- Account service → Firestore: stores profile (evidence: `src/services/authService.js`)
- Route application → Workspace shell: routes to (evidence: `src/App.jsx`)
- Workspace shell → Auth context: reads session (evidence: `src/layouts/workspaceLayout.jsx`)
- Visitor or user → Content identity: sets identity (evidence: `README.md`)
- Visitor or user → Create delivery: creates delivery (evidence: `README.md`)
- Create delivery → Reminder form: collects input
- Reminder form → Form validation: validates (evidence: `src/features/remindersystem/hooks/useReminderForm.js`)
- Reminder form → Reminder client: saves intent (evidence: `src/features/remindersystem/hooks/useReminderForm.js`)
- Reminder client → Add prompt: calls callable (evidence: `src/features/remindersystem/services/remindrClient.js`)
- Function registry → Add prompt: registers (evidence: `functions/src/index.ts`)
- Function registry → Scheduler: registers (evidence: `functions/src/index.ts`)
- Scheduler → Reminder execution: dispatches (evidence: `functions/src/scheduler/runScheduler.ts`)
- Reminder execution → AI prompt builder: prepares draft
- AI prompt builder → AI generation: builds generation request
- AI generation → AI provider: requests generation
- Reminder execution → Deliveries inbox: delivers draft
- Reminder client → Reminder records: reads reminders (evidence: `src/features/remindersystem/services/remindrClient.js`)
- Reminder query → Reminder records: queries reminders (evidence: `src/features/remindersystem/hooks/useRemindrQuery.js`)
- Reminder client → Firebase clients: uses Firestore (evidence: `src/features/remindersystem/services/remindrClient.js`)
- Reminder query → Firebase clients: uses Firestore (evidence: `src/features/remindersystem/hooks/useRemindrQuery.js`)
- Firebase clients → Firestore: initializes (evidence: `src/services/firebase.js`)
- Firebase clients → Firebase Auth: initializes (evidence: `src/services/firebase.js`)
- Visitor or user → Timezone sync: syncs timezone
- Timezone sync → Firestore: writes timezone (evidence: `src/hooks/useTimezoneSync.js`)
- Reminder execution → Push notification: sends notification
- Visitor or user → Deliveries inbox: reviews drafts (evidence: `README.md`)
