# adityadhamanaskar4-sys/cloudpocket architecture

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

- Interactive diagram: https://gitdiagram.com/adityadhamanaskar4-sys/cloudpocket
- Repository: https://github.com/adityadhamanaskar4-sys/cloudpocket

## Overview

CloudPocket is a full-stack personal-data manager for authenticated users to store ID files, drawing/text notes, and todos. The user journey runs from signup or login through the protected dashboard to a chosen data area, whose API operations are routed by Express and persisted through Supabase. The graph preserves the README’s documented account, file, notes, and todo capabilities. Some frontend and backend modules were not excerpted; their documented links are shown only where the README or source index supports them.

Main entry points: [`backend/app.js`](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/backend/app.js) (Express router), [`cloudpocket/app/dashboard/ids/page.tsx`](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/dashboard/ids/page.tsx) (ID files), [`cloudpocket/app/login/page.tsx`](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/login/page.tsx) (Login), [`cloudpocket/app/dashboard/page.tsx`](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/dashboard/page.tsx) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_landing["Landing page<br/>[page.tsx]"]
  node_signup["Signup<br/>[page.tsx]"]
  node_login["Login<br/>[page.tsx]"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_account["Account settings<br/>[page.tsx]"]
  node_idsui["ID files<br/>[page.tsx]"]
  node_notesui["Notes<br/>[page.tsx]"]
  node_todosui["Todos<br/>[page.tsx]"]
end

subgraph group_ui["Shared interface"]
  node_header["Navigation header<br/>[header.tsx]"]
  node_menu["Dashboard menu<br/>[menu.tsx]"]
  node_authhook["Auth check hook<br/>[useAuthCheck.tsx]"]
  node_popup["Popup dialogs<br/>[popup.tsx]"]
  node_toast["Toast display<br/>[infoToast.tsx]"]
  node_toastutil["Toast events<br/>[infoToast.ts]"]
  node_background["Animated background<br/>[background.tsx]"]
  node_rotating["Rotating text<br/>[rotatingtext.tsx]"]
  node_welcome["Welcome panel<br/>[welcome.tsx]"]
  node_todoitem["Todo template<br/>[todoTemplate.tsx]"]
end

subgraph group_api["Backend services"]
  node_apiapp["Express router<br/>[app.js]"]
  node_auth["Authentication routes<br/>[getstarted.js]"]
  node_idapi["ID file routes<br/>[ids.js]"]
  node_notesapi["Notes routes<br/>[notes.js]"]
  node_todoapi["Todo routes<br/>[todo.js]"]
  node_authcheck["JWT middleware<br/>[authcheck.js]"]
  node_jwt["JWT utilities<br/>[jwt.js]"]
end

subgraph group_data["Persistence"]
  node_supabaseclient["Supabase client<br/>[supabase.js]"]
  node_postgres[("Supabase database")]
  node_filestore[("Supabase file storage")]
end

node_visitor(("User"))

node_visitor -->|"visits"| node_landing
node_visitor -->|"creates account"| node_signup
node_visitor -->|"signs in"| node_login
node_visitor -->|"manages data"| node_dashboard
node_landing -->|"renders"| node_header
node_landing -->|"renders"| node_rotating
node_signup -->|"renders"| node_header
node_signup -->|"renders"| node_popup
node_signup -->|"submits account"| node_apiapp
node_login -->|"renders"| node_header
node_login -->|"renders"| node_popup
node_login -->|"emits toast"| node_toastutil
node_login -->|"submits credentials"| node_apiapp
node_dashboard -->|"renders"| node_menu
node_dashboard -->|"renders"| node_welcome
node_dashboard -->|"checks session"| node_authhook
node_dashboard -->|"renders"| node_popup
node_account -.->|"uses account APIs"| node_apiapp
node_idsui -->|"checks session"| node_authhook
node_idsui -->|"renders"| node_menu
node_idsui -->|"renders"| node_popup
node_idsui -->|"emits toast"| node_toastutil
node_idsui -->|"uploads and lists"| node_apiapp
node_notesui -->|"uses notes APIs"| node_apiapp
node_todosui -->|"uses todo APIs"| node_apiapp
node_apiapp -->|"mounts routes"| node_auth
node_apiapp -->|"mounts routes"| node_idapi
node_apiapp -->|"mounts routes"| node_notesapi
node_apiapp -->|"mounts routes"| node_todoapi
node_auth -->|"queries users"| node_supabaseclient
node_auth -->|"signs tokens"| node_jwt
node_idapi -->|"guards routes"| node_authcheck
node_notesapi -->|"guards routes"| node_authcheck
node_todoapi -->|"guards routes"| node_authcheck
node_authcheck -->|"verifies tokens"| node_jwt
node_idapi -->|"stores file metadata"| node_supabaseclient
node_idapi -.->|"uploads files"| node_filestore
node_notesapi -->|"reads and writes"| node_supabaseclient
node_todoapi -->|"reads and writes"| node_supabaseclient
node_supabaseclient -->|"queries tables"| node_postgres
node_todoitem -->|"renders"| node_popup

click node_landing "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/page.tsx"
click node_signup "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/signup/page.tsx"
click node_login "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/login/page.tsx"
click node_dashboard "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/dashboard/page.tsx"
click node_account "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/dashboard/account/page.tsx"
click node_idsui "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/dashboard/ids/page.tsx"
click node_notesui "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/dashboard/notes/page.tsx"
click node_todosui "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/dashboard/todos/page.tsx"
click node_header "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/components/header.tsx"
click node_menu "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/components/menu.tsx"
click node_authhook "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/components/useAuthCheck.tsx"
click node_popup "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/components/popup.tsx"
click node_toast "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/components/infoToast.tsx"
click node_toastutil "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/utils/infoToast.ts"
click node_background "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/components/background.tsx"
click node_rotating "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/components/rotatingtext.tsx"
click node_welcome "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/components/welcome.tsx"
click node_todoitem "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/components/todoTemplate.tsx"
click node_apiapp "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/backend/app.js"
click node_auth "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/backend/modules/getstarted.js"
click node_idapi "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/backend/modules/ids.js"
click node_notesapi "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/backend/modules/notes.js"
click node_todoapi "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/backend/modules/todo.js"
click node_authcheck "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/backend/middleware/authcheck.js"
click node_jwt "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/backend/utils/jwt.js"
click node_supabaseclient "https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/backend/supabase.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_landing,node_signup,node_login,node_dashboard,node_account,node_idsui,node_notesui,node_todosui,node_visitor toneBlue
class node_header,node_menu,node_authhook,node_popup,node_toast,node_toastutil,node_background,node_rotating,node_welcome,node_todoitem toneAmber
class node_apiapp,node_auth,node_idapi,node_notesapi,node_todoapi,node_authcheck,node_jwt toneMint
class node_supabaseclient,node_postgres,node_filestore toneRose
```

## Components

### Web experience

- [Landing page](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/page.tsx): `cloudpocket/app/page.tsx`
- [Signup](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/signup/page.tsx): `cloudpocket/app/signup/page.tsx`
- [Login](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/login/page.tsx): `cloudpocket/app/login/page.tsx`
- [Dashboard](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/dashboard/page.tsx): `cloudpocket/app/dashboard/page.tsx`
- [Account settings](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/dashboard/account/page.tsx): `cloudpocket/app/dashboard/account/page.tsx`
- [ID files](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/dashboard/ids/page.tsx): `cloudpocket/app/dashboard/ids/page.tsx`
- [Notes](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/dashboard/notes/page.tsx): `cloudpocket/app/dashboard/notes/page.tsx`
- [Todos](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/dashboard/todos/page.tsx): `cloudpocket/app/dashboard/todos/page.tsx`

### Shared interface

- [Navigation header](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/components/header.tsx): `cloudpocket/app/components/header.tsx`
- [Dashboard menu](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/components/menu.tsx): `cloudpocket/app/components/menu.tsx`
- [Auth check hook](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/components/useAuthCheck.tsx): `cloudpocket/app/components/useAuthCheck.tsx`
- [Popup dialogs](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/components/popup.tsx): `cloudpocket/app/components/popup.tsx`
- [Toast display](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/components/infoToast.tsx): `cloudpocket/app/components/infoToast.tsx`
- [Toast events](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/utils/infoToast.ts): `cloudpocket/app/utils/infoToast.ts`
- [Animated background](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/components/background.tsx): `cloudpocket/app/components/background.tsx`
- [Rotating text](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/components/rotatingtext.tsx): `cloudpocket/app/components/rotatingtext.tsx`
- [Welcome panel](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/components/welcome.tsx): `cloudpocket/app/components/welcome.tsx`
- [Todo template](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/cloudpocket/app/components/todoTemplate.tsx): `cloudpocket/app/components/todoTemplate.tsx`

### Backend services

- [Express router](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/backend/app.js): `backend/app.js`
- [Authentication routes](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/backend/modules/getstarted.js): `backend/modules/getstarted.js`
- [ID file routes](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/backend/modules/ids.js): `backend/modules/ids.js`
- [Notes routes](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/backend/modules/notes.js): `backend/modules/notes.js`
- [Todo routes](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/backend/modules/todo.js): `backend/modules/todo.js`
- [JWT middleware](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/backend/middleware/authcheck.js): `backend/middleware/authcheck.js`
- [JWT utilities](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/backend/utils/jwt.js): `backend/utils/jwt.js`

### Persistence

- [Supabase client](https://github.com/adityadhamanaskar4-sys/cloudpocket/blob/main/backend/supabase.js): `backend/supabase.js`
- **Supabase database**
- **Supabase file storage**

### Other components

- **User**

## Connections

- User → Landing page: visits (evidence: `README.md`)
- User → Signup: creates account (evidence: `README.md`)
- User → Login: signs in (evidence: `README.md`)
- User → Dashboard: manages data (evidence: `README.md`)
- Landing page → Navigation header: renders (evidence: `cloudpocket/app/page.tsx`)
- Landing page → Rotating text: renders (evidence: `cloudpocket/app/page.tsx`)
- Signup → Navigation header: renders (evidence: `cloudpocket/app/signup/page.tsx`)
- Signup → Popup dialogs: renders (evidence: `cloudpocket/app/signup/page.tsx`)
- Signup → Express router: submits account (evidence: `README.md`)
- Login → Navigation header: renders (evidence: `cloudpocket/app/login/page.tsx`)
- Login → Popup dialogs: renders (evidence: `cloudpocket/app/login/page.tsx`)
- Login → Toast events: emits toast (evidence: `cloudpocket/app/login/page.tsx`)
- Login → Express router: submits credentials (evidence: `README.md`)
- Dashboard → Dashboard menu: renders (evidence: `cloudpocket/app/dashboard/page.tsx`)
- Dashboard → Welcome panel: renders (evidence: `cloudpocket/app/dashboard/page.tsx`)
- Dashboard → Auth check hook: checks session (evidence: `cloudpocket/app/dashboard/page.tsx`)
- Dashboard → Popup dialogs: renders (evidence: `cloudpocket/app/dashboard/page.tsx`)
- Account settings → Express router: uses account APIs (evidence: `README.md`)
- ID files → Auth check hook: checks session (evidence: `cloudpocket/app/dashboard/ids/page.tsx`)
- ID files → Dashboard menu: renders (evidence: `cloudpocket/app/dashboard/ids/page.tsx`)
- ID files → Popup dialogs: renders (evidence: `cloudpocket/app/dashboard/ids/page.tsx`)
- ID files → Toast events: emits toast (evidence: `cloudpocket/app/dashboard/ids/page.tsx`)
- ID files → Express router: uploads and lists (evidence: `README.md`)
- Notes → Express router: uses notes APIs (evidence: `README.md`)
- Todos → Express router: uses todo APIs (evidence: `README.md`)
- Express router → Authentication routes: mounts routes (evidence: `backend/app.js`)
- Express router → ID file routes: mounts routes (evidence: `backend/app.js`)
- Express router → Notes routes: mounts routes (evidence: `backend/app.js`)
- Express router → Todo routes: mounts routes (evidence: `backend/app.js`)
- Authentication routes → Supabase client: queries users (evidence: `backend/modules/getstarted.js`)
- Authentication routes → JWT utilities: signs tokens (evidence: `backend/modules/getstarted.js`)
- ID file routes → JWT middleware: guards routes (evidence: `backend/modules/ids.js`)
- Notes routes → JWT middleware: guards routes (evidence: `backend/modules/notes.js`)
- Todo routes → JWT middleware: guards routes (evidence: `backend/modules/todo.js`)
- JWT middleware → JWT utilities: verifies tokens (evidence: `backend/middleware/authcheck.js`)
- ID file routes → Supabase client: stores file metadata (evidence: `backend/modules/ids.js`)
- ID file routes → Supabase file storage: uploads files (evidence: `README.md`)
- Notes routes → Supabase client: reads and writes (evidence: `backend/modules/notes.js`)
- Todo routes → Supabase client: reads and writes (evidence: `backend/modules/todo.js`)
- Supabase client → Supabase database: queries tables (evidence: `backend/supabase.js`)
- Todo template → Popup dialogs: renders (evidence: `cloudpocket/app/components/todoTemplate.tsx`)
