# sachin-bansal94/meandminee architecture

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

- Interactive diagram: https://gitdiagram.com/sachin-bansal94/meandminee
- Repository: https://github.com/sachin-bansal94/meandminee

## Overview

Me&Minee is a paired-couple app for daily goals, mood check-ins, live chat and shared photos, plus turn-based and live games. A member signs in or registers with a partner’s invite code; the authenticated client then uses API routes for shared features and a socket connection for presence and live events. The server coordinates domain routes, authentication, media and persistence in Postgres. The README documents product capabilities beyond the sampled excerpts; edges for those areas rely on its descriptions and the source index, not uninspected implementation details.

Main entry points: [`client/src/App.jsx`](https://github.com/sachin-bansal94/meandminee/blob/main/client/src/App.jsx) (App shell), [`server/index.js`](https://github.com/sachin-bansal94/meandminee/blob/main/server/index.js) (HTTP and socket server), [`server/db.js`](https://github.com/sachin-bansal94/meandminee/blob/main/server/db.js) (Postgres access), [`client/src/api.js`](https://github.com/sachin-bansal94/meandminee/blob/main/client/src/api.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_app["App shell<br/>[App.jsx]"]
  node_authui["Sign-in and pairing<br/>[Auth.jsx]"]
  node_session["Session state<br/>[session.jsx]"]
  node_api["API client<br/>[api.js]"]
  node_socketclient["Socket client<br/>[socket.js]"]
  node_home["Goals and streaks<br/>[Home.jsx]"]
  node_chatui["Chat experience<br/>[Chat.jsx]"]
  node_photosui["Photo album<br/>[Photos.jsx]"]
  node_gamesui["Game decks<br/>[Games.jsx]"]
  node_liveui["Live games<br/>[LiveGames.jsx]"]
  node_drawui["Draw and guess<br/>[DrawGame.jsx]"]
  node_usui["Mood and couple<br/>[Us.jsx]"]
  node_sharedui["Shared UI<br/>[ui.jsx]"]
end

subgraph group_server["Server features"]
  node_server["HTTP and socket server<br/>[index.js]"]
  node_account["Account and pairing<br/>[account.js]"]
  node_goals["Goal management<br/>[goals.js]"]
  node_mood["Mood check-ins<br/>[mood.js]"]
  node_chat["Messages and chat<br/>[chat.js]"]
  node_games["Game answers<br/>[games.js]"]
  node_livegames["Live game routes<br/>[live.js]"]
  node_drawservice["Draw game runtime<br/>[drawLive.js]"]
  node_photos["Photo operations<br/>[photos.js]"]
  node_albums["Album helpers<br/>[album.js]"]
end

subgraph group_shared["Runtime services"]
  node_media["Private media<br/>[media.js]"]
  node_authservice["Token authentication<br/>[auth.js]"]
  node_db[("Postgres access<br/>[db.js]")]
end

node_couple(("Couple members"))
node_cloudinary[("Cloudinary storage")]

node_couple -->|"uses"| node_app
node_app -->|"shows when signed out"| node_authui
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_chatui
node_app -->|"routes to"| node_photosui
node_app -->|"routes to"| node_gamesui
node_app -->|"routes to"| node_liveui
node_app -->|"routes to"| node_drawui
node_app -->|"routes to"| node_usui
node_authui -->|"logs in or registers"| node_session
node_session -->|"requests session data"| node_api
node_session -->|"connects after login"| node_socketclient
node_home -->|"requests goals"| node_api
node_chatui -->|"requests messages"| node_api
node_chatui -->|"listens for live events"| node_socketclient
node_photosui -->|"requests photos"| node_api
node_gamesui -->|"requests games"| node_api
node_liveui -->|"requests turns"| node_api
node_liveui -->|"exchanges live events"| node_socketclient
node_drawui -->|"requests game state"| node_api
node_drawui -->|"exchanges strokes"| node_socketclient
node_server -->|"mounts routes"| node_account
node_server -->|"mounts routes"| node_goals
node_server -->|"mounts routes"| node_mood
node_server -->|"mounts routes"| node_chat
node_server -->|"mounts routes"| node_games
node_server -->|"mounts routes"| node_livegames
node_server -->|"mounts routes"| node_photos
node_server -->|"initializes and attaches"| node_drawservice
node_account -->|"uses authentication"| node_authservice
node_goals -->|"authenticates requests"| node_authservice
node_mood -->|"authenticates requests"| node_authservice
node_chat -->|"authenticates requests"| node_authservice
node_games -->|"authenticates requests"| node_authservice
node_photos -->|"authenticates requests"| node_authservice
node_account -->|"queries users and couples"| node_db
node_goals -->|"reads and writes goals"| node_db
node_mood -->|"reads and writes moods"| node_db
node_chat -->|"reads and writes messages"| node_db
node_games -->|"reads and writes answers"| node_db
node_livegames -.->|"persists game state"| node_db
node_drawservice -->|"persists live drawing"| node_db
node_photos -->|"stores photo records"| node_db
node_chat -->|"uploads chat media"| node_media
node_photos -->|"uploads and releases files"| node_media
node_albums -->|"uses media helpers"| node_media
node_media -->|"stores media metadata"| node_db
node_media -.->|"streams optional storage"| node_cloudinary

click node_app "https://github.com/sachin-bansal94/meandminee/blob/main/client/src/App.jsx"
click node_authui "https://github.com/sachin-bansal94/meandminee/blob/main/client/src/pages/Auth.jsx"
click node_session "https://github.com/sachin-bansal94/meandminee/blob/main/client/src/session.jsx"
click node_api "https://github.com/sachin-bansal94/meandminee/blob/main/client/src/api.js"
click node_socketclient "https://github.com/sachin-bansal94/meandminee/blob/main/client/src/socket.js"
click node_home "https://github.com/sachin-bansal94/meandminee/blob/main/client/src/pages/Home.jsx"
click node_chatui "https://github.com/sachin-bansal94/meandminee/blob/main/client/src/pages/Chat.jsx"
click node_photosui "https://github.com/sachin-bansal94/meandminee/blob/main/client/src/pages/Photos.jsx"
click node_gamesui "https://github.com/sachin-bansal94/meandminee/blob/main/client/src/pages/Games.jsx"
click node_liveui "https://github.com/sachin-bansal94/meandminee/blob/main/client/src/pages/LiveGames.jsx"
click node_drawui "https://github.com/sachin-bansal94/meandminee/blob/main/client/src/pages/DrawGame.jsx"
click node_usui "https://github.com/sachin-bansal94/meandminee/blob/main/client/src/pages/Us.jsx"
click node_sharedui "https://github.com/sachin-bansal94/meandminee/blob/main/client/src/components/ui.jsx"
click node_server "https://github.com/sachin-bansal94/meandminee/blob/main/server/index.js"
click node_account "https://github.com/sachin-bansal94/meandminee/blob/main/server/routes/account.js"
click node_goals "https://github.com/sachin-bansal94/meandminee/blob/main/server/routes/goals.js"
click node_mood "https://github.com/sachin-bansal94/meandminee/blob/main/server/routes/mood.js"
click node_chat "https://github.com/sachin-bansal94/meandminee/blob/main/server/routes/chat.js"
click node_games "https://github.com/sachin-bansal94/meandminee/blob/main/server/routes/games.js"
click node_livegames "https://github.com/sachin-bansal94/meandminee/blob/main/server/routes/live.js"
click node_drawservice "https://github.com/sachin-bansal94/meandminee/blob/main/server/games/drawLive.js"
click node_photos "https://github.com/sachin-bansal94/meandminee/blob/main/server/routes/photos.js"
click node_albums "https://github.com/sachin-bansal94/meandminee/blob/main/server/album.js"
click node_media "https://github.com/sachin-bansal94/meandminee/blob/main/server/media.js"
click node_authservice "https://github.com/sachin-bansal94/meandminee/blob/main/server/auth.js"
click node_db "https://github.com/sachin-bansal94/meandminee/blob/main/server/db.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_authui,node_session,node_api,node_socketclient,node_home,node_chatui,node_photosui,node_gamesui,node_liveui,node_drawui,node_usui,node_sharedui toneBlue
class node_server,node_account,node_goals,node_mood,node_chat,node_games,node_livegames,node_drawservice,node_photos,node_albums,node_cloudinary toneAmber
class node_media,node_authservice,node_db toneMint
class node_couple toneIndigo
```

## Components

### Client experience

- [App shell](https://github.com/sachin-bansal94/meandminee/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Sign-in and pairing](https://github.com/sachin-bansal94/meandminee/blob/main/client/src/pages/Auth.jsx): `client/src/pages/Auth.jsx`
- [Session state](https://github.com/sachin-bansal94/meandminee/blob/main/client/src/session.jsx): `client/src/session.jsx`
- [API client](https://github.com/sachin-bansal94/meandminee/blob/main/client/src/api.js): `client/src/api.js`
- [Socket client](https://github.com/sachin-bansal94/meandminee/blob/main/client/src/socket.js): `client/src/socket.js`
- [Goals and streaks](https://github.com/sachin-bansal94/meandminee/blob/main/client/src/pages/Home.jsx): `client/src/pages/Home.jsx`
- [Chat experience](https://github.com/sachin-bansal94/meandminee/blob/main/client/src/pages/Chat.jsx): `client/src/pages/Chat.jsx`
- [Photo album](https://github.com/sachin-bansal94/meandminee/blob/main/client/src/pages/Photos.jsx): `client/src/pages/Photos.jsx`
- [Game decks](https://github.com/sachin-bansal94/meandminee/blob/main/client/src/pages/Games.jsx): `client/src/pages/Games.jsx`
- [Live games](https://github.com/sachin-bansal94/meandminee/blob/main/client/src/pages/LiveGames.jsx): `client/src/pages/LiveGames.jsx`
- [Draw and guess](https://github.com/sachin-bansal94/meandminee/blob/main/client/src/pages/DrawGame.jsx): `client/src/pages/DrawGame.jsx`
- [Mood and couple](https://github.com/sachin-bansal94/meandminee/blob/main/client/src/pages/Us.jsx): `client/src/pages/Us.jsx`
- [Shared UI](https://github.com/sachin-bansal94/meandminee/blob/main/client/src/components/ui.jsx): `client/src/components/ui.jsx`

### Server features

- [HTTP and socket server](https://github.com/sachin-bansal94/meandminee/blob/main/server/index.js): `server/index.js`
- [Account and pairing](https://github.com/sachin-bansal94/meandminee/blob/main/server/routes/account.js): `server/routes/account.js`
- [Goal management](https://github.com/sachin-bansal94/meandminee/blob/main/server/routes/goals.js): `server/routes/goals.js`
- [Mood check-ins](https://github.com/sachin-bansal94/meandminee/blob/main/server/routes/mood.js): `server/routes/mood.js`
- [Messages and chat](https://github.com/sachin-bansal94/meandminee/blob/main/server/routes/chat.js): `server/routes/chat.js`
- [Game answers](https://github.com/sachin-bansal94/meandminee/blob/main/server/routes/games.js): `server/routes/games.js`
- [Live game routes](https://github.com/sachin-bansal94/meandminee/blob/main/server/routes/live.js): `server/routes/live.js`
- [Draw game runtime](https://github.com/sachin-bansal94/meandminee/blob/main/server/games/drawLive.js): `server/games/drawLive.js`
- [Photo operations](https://github.com/sachin-bansal94/meandminee/blob/main/server/routes/photos.js): `server/routes/photos.js`
- [Album helpers](https://github.com/sachin-bansal94/meandminee/blob/main/server/album.js): `server/album.js`

### Runtime services

- [Private media](https://github.com/sachin-bansal94/meandminee/blob/main/server/media.js): `server/media.js`
- [Token authentication](https://github.com/sachin-bansal94/meandminee/blob/main/server/auth.js): `server/auth.js`
- [Postgres access](https://github.com/sachin-bansal94/meandminee/blob/main/server/db.js): `server/db.js`

### Other components

- **Couple members**
- **Cloudinary storage**

## Connections

- Couple members → App shell: uses (evidence: `README.md`)
- App shell → Sign-in and pairing: shows when signed out (evidence: `client/src/App.jsx`)
- App shell → Goals and streaks: routes to (evidence: `client/src/App.jsx`)
- App shell → Chat experience: routes to (evidence: `client/src/App.jsx`)
- App shell → Photo album: routes to (evidence: `client/src/App.jsx`)
- App shell → Game decks: routes to (evidence: `client/src/App.jsx`)
- App shell → Live games: routes to (evidence: `client/src/App.jsx`)
- App shell → Draw and guess: routes to (evidence: `client/src/App.jsx`)
- App shell → Mood and couple: routes to (evidence: `client/src/App.jsx`)
- Sign-in and pairing → Session state: logs in or registers (evidence: `client/src/pages/Auth.jsx`)
- Session state → API client: requests session data (evidence: `client/src/session.jsx`)
- Session state → Socket client: connects after login (evidence: `client/src/session.jsx`)
- Goals and streaks → API client: requests goals (evidence: `client/src/pages/Home.jsx`)
- Chat experience → API client: requests messages (evidence: `client/src/pages/Chat.jsx`)
- Chat experience → Socket client: listens for live events (evidence: `client/src/pages/Chat.jsx`)
- Photo album → API client: requests photos (evidence: `client/src/pages/Photos.jsx`)
- Game decks → API client: requests games (evidence: `client/src/pages/Games.jsx`)
- Live games → API client: requests turns (evidence: `client/src/pages/LiveGames.jsx`)
- Live games → Socket client: exchanges live events (evidence: `client/src/pages/LiveGames.jsx`)
- Draw and guess → API client: requests game state (evidence: `client/src/pages/DrawGame.jsx`)
- Draw and guess → Socket client: exchanges strokes (evidence: `client/src/pages/DrawGame.jsx`)
- HTTP and socket server → Account and pairing: mounts routes (evidence: `server/index.js`)
- HTTP and socket server → Goal management: mounts routes (evidence: `server/index.js`)
- HTTP and socket server → Mood check-ins: mounts routes (evidence: `server/index.js`)
- HTTP and socket server → Messages and chat: mounts routes (evidence: `server/index.js`)
- HTTP and socket server → Game answers: mounts routes (evidence: `server/index.js`)
- HTTP and socket server → Live game routes: mounts routes (evidence: `server/index.js`)
- HTTP and socket server → Photo operations: mounts routes (evidence: `server/index.js`)
- HTTP and socket server → Draw game runtime: initializes and attaches (evidence: `server/index.js`)
- Account and pairing → Token authentication: uses authentication (evidence: `server/routes/account.js`)
- Goal management → Token authentication: authenticates requests (evidence: `server/routes/goals.js`)
- Mood check-ins → Token authentication: authenticates requests (evidence: `server/routes/mood.js`)
- Messages and chat → Token authentication: authenticates requests (evidence: `server/routes/chat.js`)
- Game answers → Token authentication: authenticates requests (evidence: `server/routes/games.js`)
- Photo operations → Token authentication: authenticates requests (evidence: `server/routes/photos.js`)
- Account and pairing → Postgres access: queries users and couples (evidence: `server/routes/account.js`)
- Goal management → Postgres access: reads and writes goals (evidence: `server/routes/goals.js`)
- Mood check-ins → Postgres access: reads and writes moods (evidence: `server/routes/mood.js`)
- Messages and chat → Postgres access: reads and writes messages (evidence: `server/routes/chat.js`)
- Game answers → Postgres access: reads and writes answers (evidence: `server/routes/games.js`)
- Live game routes → Postgres access: persists game state
- Draw game runtime → Postgres access: persists live drawing (evidence: `server/games/drawLive.js`)
- Photo operations → Postgres access: stores photo records (evidence: `server/routes/photos.js`)
- Messages and chat → Private media: uploads chat media (evidence: `server/routes/chat.js`)
- Photo operations → Private media: uploads and releases files (evidence: `server/routes/photos.js`)
- Album helpers → Private media: uses media helpers (evidence: `server/album.js`)
- Private media → Postgres access: stores media metadata (evidence: `server/media.js`)
- Private media → Cloudinary storage: streams optional storage (evidence: `README.md`)
