# shreyashmane-dev/mimora architecture

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

- Interactive diagram: https://gitdiagram.com/shreyashmane-dev/mimora
- Repository: https://github.com/shreyashmane-dev/mimora

## Overview

Memora is a web app for creating and sharing personalized birthday memory experiences. A creator enters through the site, builds a project in a guided wizard (recipient details, photos, design, music, AI writing, and publishing), then can manage it from a dashboard; recipients open a published preview. The graph also preserves account/profile, templates, and expiry cleanup capabilities. Some route and action internals were not sampled, so their connections are shown only where the source index or excerpts support them.

Main entry points: [`src/lib/firebase.ts`](https://github.com/shreyashmane-dev/mimora/blob/main/src/lib/firebase.ts) (Firebase access), [`src/components/Wizard.tsx`](https://github.com/shreyashmane-dev/mimora/blob/main/src/components/Wizard.tsx) (Creation wizard), [`src/context/AuthContext.tsx`](https://github.com/shreyashmane-dev/mimora/blob/main/src/context/AuthContext.tsx) (Authentication context), [`src/app/actions/theme.ts`](https://github.com/shreyashmane-dev/mimora/blob/main/src/app/actions/theme.ts) (Theme and cleanup logic)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Experience and discovery"]
  node_landing["Landing page<br/>[page.tsx]"]
  node_templates["Template gallery<br/>[page.tsx]"]
  node_preview["Memory experience<br/>[page.tsx]"]
end

subgraph group_creation["Project creation"]
  node_wizard["Creation wizard<br/>[Wizard.tsx]"]
  node_copilot["AI writing copilot<br/>[AICopilot.tsx]"]
  node_ai_actions["AI generation<br/>[ai.ts]"]
  node_theme_actions["Theme and cleanup logic<br/>[theme.ts]"]
  node_image_upload["Image upload<br/>[upload.ts]"]
end

subgraph group_accounts["Accounts and management"]
  node_dashboard["Project dashboard<br/>[page.tsx]"]
  node_project_actions["Project operations<br/>[project.ts]"]
  node_login["Login<br/>[page.tsx]"]
  node_signup["Signup<br/>[page.tsx]"]
  node_profile["User profile<br/>[page.tsx]"]
  node_auth_context["Authentication context<br/>[AuthContext.tsx]"]
  node_project_editor["Project editor<br/>[page.tsx]"]
end

subgraph group_services["Data and integrations"]
  node_firebase["Firebase access<br/>[firebase.ts]"]
  node_firebase_services[("Firebase services")]
  node_cloudinary["Cloudinary"]
  node_ai_providers["AI providers"]
  node_cleanup_route["Expiry cleanup endpoint<br/>[route.ts]"]
  node_translations_hook["Translation hook<br/>[useTranslation.ts]"]
  node_translations["Translation strings<br/>[translations.ts]"]
end

node_visitor(("Visitor or creator"))
node_recipient(("Birthday recipient"))

node_visitor -.->|"visits"| node_landing
node_visitor -.->|"browses"| node_templates
node_visitor -.->|"signs in"| node_login
node_visitor -.->|"signs up"| node_signup
node_visitor -.->|"creates project"| node_wizard
node_recipient -.->|"opens experience"| node_preview
node_landing -->|"uses auth"| node_auth_context
node_landing -->|"uses translations"| node_translations_hook
node_wizard -->|"uses auth"| node_auth_context
node_wizard -->|"saves project"| node_firebase
node_wizard -->|"uploads photos"| node_image_upload
node_wizard -->|"requests writing"| node_ai_actions
node_wizard -->|"requests design"| node_theme_actions
node_wizard -->|"uses translations"| node_translations_hook
node_wizard -->|"renders copilot"| node_copilot
node_copilot -->|"sends chat"| node_ai_actions
node_ai_actions -->|"requests generation"| node_ai_providers
node_theme_actions -->|"reads and saves"| node_firebase
node_theme_actions -->|"deletes assets"| node_cloudinary
node_dashboard -->|"uses auth"| node_auth_context
node_dashboard -->|"loads projects"| node_firebase
node_dashboard -->|"deletes project"| node_project_actions
node_dashboard -->|"uses theme logic"| node_theme_actions
node_project_actions -->|"updates project data"| node_firebase
node_project_actions -->|"delegates cleanup"| node_theme_actions
node_login -->|"uses auth"| node_auth_context
node_login -->|"authenticates"| node_firebase
node_signup -->|"uses auth"| node_auth_context
node_signup -->|"registers account"| node_firebase
node_profile -->|"uses auth"| node_auth_context
node_profile -->|"reads profile"| node_firebase
node_project_editor -->|"loads project"| node_firebase
node_project_editor -->|"renders editor"| node_wizard
node_preview -->|"loads by slug"| node_firebase
node_auth_context -->|"tracks auth"| node_firebase
node_firebase -->|"uses Firebase"| node_firebase_services
node_cleanup_route -->|"runs cleanup"| node_theme_actions
node_translations_hook -->|"looks up strings"| node_translations

click node_landing "https://github.com/shreyashmane-dev/mimora/blob/main/src/app/page.tsx"
click node_templates "https://github.com/shreyashmane-dev/mimora/blob/main/src/app/templates/page.tsx"
click node_preview "https://github.com/shreyashmane-dev/mimora/blob/main/src/app/preview/%5Bslug%5D/page.tsx"
click node_wizard "https://github.com/shreyashmane-dev/mimora/blob/main/src/components/Wizard.tsx"
click node_copilot "https://github.com/shreyashmane-dev/mimora/blob/main/src/components/AICopilot.tsx"
click node_ai_actions "https://github.com/shreyashmane-dev/mimora/blob/main/src/app/actions/ai.ts"
click node_theme_actions "https://github.com/shreyashmane-dev/mimora/blob/main/src/app/actions/theme.ts"
click node_image_upload "https://github.com/shreyashmane-dev/mimora/blob/main/src/lib/upload.ts"
click node_dashboard "https://github.com/shreyashmane-dev/mimora/blob/main/src/app/dashboard/page.tsx"
click node_project_actions "https://github.com/shreyashmane-dev/mimora/blob/main/src/app/actions/project.ts"
click node_login "https://github.com/shreyashmane-dev/mimora/blob/main/src/app/login/page.tsx"
click node_signup "https://github.com/shreyashmane-dev/mimora/blob/main/src/app/signup/page.tsx"
click node_profile "https://github.com/shreyashmane-dev/mimora/blob/main/src/app/profile/page.tsx"
click node_auth_context "https://github.com/shreyashmane-dev/mimora/blob/main/src/context/AuthContext.tsx"
click node_project_editor "https://github.com/shreyashmane-dev/mimora/blob/main/src/app/project/%5Bid%5D/page.tsx"
click node_firebase "https://github.com/shreyashmane-dev/mimora/blob/main/src/lib/firebase.ts"
click node_cleanup_route "https://github.com/shreyashmane-dev/mimora/blob/main/src/app/api/cron/cleanup/route.ts"
click node_translations_hook "https://github.com/shreyashmane-dev/mimora/blob/main/src/hooks/useTranslation.ts"
click node_translations "https://github.com/shreyashmane-dev/mimora/blob/main/src/lib/translations.ts"

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_landing,node_templates,node_preview toneBlue
class node_wizard,node_copilot,node_ai_actions,node_theme_actions,node_image_upload toneAmber
class node_dashboard,node_project_actions,node_login,node_signup,node_profile,node_auth_context,node_project_editor toneMint
class node_firebase,node_firebase_services,node_cloudinary,node_ai_providers,node_cleanup_route,node_translations_hook,node_translations toneRose
class node_visitor,node_recipient toneIndigo
```

## Components

### Experience and discovery

- [Landing page](https://github.com/shreyashmane-dev/mimora/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Template gallery](https://github.com/shreyashmane-dev/mimora/blob/main/src/app/templates/page.tsx): `src/app/templates/page.tsx`
- [Memory experience](https://github.com/shreyashmane-dev/mimora/blob/main/src/app/preview/%5Bslug%5D/page.tsx): `src/app/preview/[slug]/page.tsx`

### Project creation

- [Creation wizard](https://github.com/shreyashmane-dev/mimora/blob/main/src/components/Wizard.tsx): `src/components/Wizard.tsx`
- [AI writing copilot](https://github.com/shreyashmane-dev/mimora/blob/main/src/components/AICopilot.tsx): `src/components/AICopilot.tsx`
- [AI generation](https://github.com/shreyashmane-dev/mimora/blob/main/src/app/actions/ai.ts): `src/app/actions/ai.ts`
- [Theme and cleanup logic](https://github.com/shreyashmane-dev/mimora/blob/main/src/app/actions/theme.ts): `src/app/actions/theme.ts`
- [Image upload](https://github.com/shreyashmane-dev/mimora/blob/main/src/lib/upload.ts): `src/lib/upload.ts`

### Accounts and management

- [Project dashboard](https://github.com/shreyashmane-dev/mimora/blob/main/src/app/dashboard/page.tsx): `src/app/dashboard/page.tsx`
- [Project operations](https://github.com/shreyashmane-dev/mimora/blob/main/src/app/actions/project.ts): `src/app/actions/project.ts`
- [Login](https://github.com/shreyashmane-dev/mimora/blob/main/src/app/login/page.tsx): `src/app/login/page.tsx`
- [Signup](https://github.com/shreyashmane-dev/mimora/blob/main/src/app/signup/page.tsx): `src/app/signup/page.tsx`
- [User profile](https://github.com/shreyashmane-dev/mimora/blob/main/src/app/profile/page.tsx): `src/app/profile/page.tsx`
- [Authentication context](https://github.com/shreyashmane-dev/mimora/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Project editor](https://github.com/shreyashmane-dev/mimora/blob/main/src/app/project/%5Bid%5D/page.tsx): `src/app/project/[id]/page.tsx`

### Data and integrations

- [Firebase access](https://github.com/shreyashmane-dev/mimora/blob/main/src/lib/firebase.ts): `src/lib/firebase.ts`
- **Firebase services**
- **Cloudinary**
- **AI providers**
- [Expiry cleanup endpoint](https://github.com/shreyashmane-dev/mimora/blob/main/src/app/api/cron/cleanup/route.ts): `src/app/api/cron/cleanup/route.ts`
- [Translation hook](https://github.com/shreyashmane-dev/mimora/blob/main/src/hooks/useTranslation.ts): `src/hooks/useTranslation.ts`
- [Translation strings](https://github.com/shreyashmane-dev/mimora/blob/main/src/lib/translations.ts): `src/lib/translations.ts`

### Other components

- **Visitor or creator**
- **Birthday recipient**

## Connections

- Visitor or creator → Landing page: visits
- Visitor or creator → Template gallery: browses
- Visitor or creator → Login: signs in
- Visitor or creator → Signup: signs up
- Visitor or creator → Creation wizard: creates project
- Birthday recipient → Memory experience: opens experience
- Landing page → Authentication context: uses auth (evidence: `src/app/page.tsx`)
- Landing page → Translation hook: uses translations (evidence: `src/app/page.tsx`)
- Creation wizard → Authentication context: uses auth (evidence: `src/components/Wizard.tsx`)
- Creation wizard → Firebase access: saves project (evidence: `src/components/Wizard.tsx`)
- Creation wizard → Image upload: uploads photos (evidence: `src/components/Wizard.tsx`)
- Creation wizard → AI generation: requests writing (evidence: `src/components/Wizard.tsx`)
- Creation wizard → Theme and cleanup logic: requests design (evidence: `src/components/Wizard.tsx`)
- Creation wizard → Translation hook: uses translations (evidence: `src/components/Wizard.tsx`)
- Creation wizard → AI writing copilot: renders copilot (evidence: `src/components/Wizard.tsx`)
- AI writing copilot → AI generation: sends chat (evidence: `src/components/AICopilot.tsx`)
- AI generation → AI providers: requests generation (evidence: `src/app/actions/ai.ts`)
- Theme and cleanup logic → Firebase access: reads and saves (evidence: `src/app/actions/theme.ts`)
- Theme and cleanup logic → Cloudinary: deletes assets (evidence: `src/app/actions/theme.ts`)
- Project dashboard → Authentication context: uses auth (evidence: `src/app/dashboard/page.tsx`)
- Project dashboard → Firebase access: loads projects (evidence: `src/app/dashboard/page.tsx`)
- Project dashboard → Project operations: deletes project (evidence: `src/app/dashboard/page.tsx`)
- Project dashboard → Theme and cleanup logic: uses theme logic (evidence: `src/app/dashboard/page.tsx`)
- Project operations → Firebase access: updates project data (evidence: `src/app/actions/project.ts`)
- Project operations → Theme and cleanup logic: delegates cleanup (evidence: `src/app/actions/project.ts`)
- Login → Authentication context: uses auth (evidence: `src/app/login/page.tsx`)
- Login → Firebase access: authenticates (evidence: `src/app/login/page.tsx`)
- Signup → Authentication context: uses auth (evidence: `src/app/signup/page.tsx`)
- Signup → Firebase access: registers account (evidence: `src/app/signup/page.tsx`)
- User profile → Authentication context: uses auth (evidence: `src/app/profile/page.tsx`)
- User profile → Firebase access: reads profile (evidence: `src/app/profile/page.tsx`)
- Project editor → Firebase access: loads project (evidence: `src/app/project/[id]/page.tsx`)
- Project editor → Creation wizard: renders editor (evidence: `src/app/project/[id]/page.tsx`)
- Memory experience → Firebase access: loads by slug (evidence: `src/app/preview/[slug]/page.tsx`)
- Authentication context → Firebase access: tracks auth (evidence: `src/context/AuthContext.tsx`)
- Firebase access → Firebase services: uses Firebase (evidence: `src/lib/firebase.ts`)
- Expiry cleanup endpoint → Theme and cleanup logic: runs cleanup (evidence: `src/app/api/cron/cleanup/route.ts`)
- Translation hook → Translation strings: looks up strings (evidence: `src/hooks/useTranslation.ts`)
