# telugujayaprakash/frontpocket architecture

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

- Interactive diagram: https://gitdiagram.com/telugujayaprakash/frontpocket
- Repository: https://github.com/telugujayaprakash/frontpocket

## Overview

FrontPocket is a creator profile and link-in-bio platform: visitors browse and interact with public creator pages, while creators register, manage their profile and content, and review analytics and account settings. The browser app routes public and protected experiences and sends API requests; server routes dispatch to domain controllers, which access PostgreSQL and supporting services. The graph preserves major dashboard capabilities identified in the route map and source index. Evidence is limited to the supplied excerpts and index, so unsampled subsystem wiring is not expanded.

Main entry points: [`server/src/app.js`](https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/app.js) (API application), [`server/src/controllers/settingsController.js`](https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/controllers/settingsController.js) (Account security), [`client/src/routes/AppRoutes.jsx`](https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/routes/AppRoutes.jsx) (App routes), [`server/src/controllers/bannerController.js`](https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/controllers/bannerController.js) (Featured banners)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Creator and visitor app"]
  node_app["App shell<br/>[App.jsx]"]
  node_routes["App routes<br/>[AppRoutes.jsx]"]
  node_authui["Registration and login"]
  node_dashboard["Dashboard"]
  node_profileui["Profile editor"]
  node_contentui["Content manager<br/>[ContentPage.jsx]"]
  node_analyticsui["Analytics dashboard<br/>[AnalyticsPage.jsx]"]
  node_settingsui["Account settings<br/>[SettingsPage.jsx]"]
  node_publicui["Public profile"]
  node_authstate["Auth state<br/>[authSlice.js]"]
  node_authrequests["Auth requests<br/>[authThunk.js]"]
  node_http["HTTP client<br/>[axios.js]"]
end

subgraph group_api["Backend API domains"]
  node_server["API application<br/>[app.js]"]
  node_authdomain["Authentication<br/>[authController.js]"]
  node_profiledomain["Profile management"]
  node_contentdomain["Content and links"]
  node_bannerdomain["Featured banners"]
  node_publicdomain["Public profiles"]
  node_analyticsdomain["Analytics"]
  node_settingsdomain["Account security"]
  node_authguard["Auth guard<br/>[authMiddleware.js]"]
end

subgraph group_data["Persistence and services"]
  node_postgres[("PostgreSQL<br/>[db.js]")]
  node_users["User records<br/>[userModel.js]"]
  node_cache["Cache service<br/>[cacheService.js]"]
  node_redis["Redis and fallback<br/>[redisClient.js]"]
end

subgraph group_integrations["External services"]
  node_media["Media uploads"]
  node_cloudinary["Cloudinary"]
  node_mail["Email delivery<br/>[mailer.js]"]
  node_emailservice["Email provider"]
end

node_visitor(("Profile visitor"))
node_creator(("Creator"))

node_creator -->|"opens app"| node_routes
node_visitor -->|"opens profile"| node_routes
node_app -->|"renders"| node_routes
node_routes -->|"routes auth"| node_authui
node_routes -->|"routes dashboard"| node_dashboard
node_routes -->|"routes profile"| node_publicui
node_creator -.->|"registers"| node_authui
node_authui -->|"dispatches auth"| node_authrequests
node_authrequests -->|"sends requests"| node_http
node_app -->|"checks session"| node_authrequests
node_creator -.->|"edits profile"| node_profileui
node_creator -.->|"manages content"| node_contentui
node_creator -.->|"reviews metrics"| node_analyticsui
node_creator -.->|"manages account"| node_settingsui
node_visitor -.->|"views profile"| node_publicui
node_server -->|"mounts routes"| node_authdomain
node_server -->|"mounts routes"| node_profiledomain
node_server -->|"mounts routes"| node_contentdomain
node_server -->|"mounts routes"| node_bannerdomain
node_server -->|"mounts routes"| node_publicdomain
node_server -->|"mounts routes"| node_analyticsdomain
node_server -->|"mounts routes"| node_settingsdomain
node_http -.->|"calls API"| node_server
node_settingsdomain -->|"queries"| node_postgres
node_settingsdomain -->|"updates security"| node_users
node_settingsdomain -->|"invalidates profile"| node_cache
node_settingsdomain -->|"sends OTP"| node_mail
node_settingsdomain -.->|"delivers mail"| node_emailservice
node_profiledomain -->|"queries profile"| node_postgres
node_profiledomain -->|"uploads media"| node_media
node_profiledomain -->|"invalidates profile"| node_cache
node_bannerdomain -->|"queries banners"| node_postgres
node_bannerdomain -->|"uploads banners"| node_media
node_bannerdomain -->|"invalidates profile"| node_cache
node_bannerdomain -->|"deduplicates clicks"| node_redis
node_publicdomain -->|"reads profiles"| node_postgres
node_publicdomain -->|"uses cache"| node_cache
node_authguard -->|"checks user"| node_users
node_users -->|"queries database"| node_postgres
node_cache -->|"uses Redis"| node_redis
node_media -.->|"stores media"| node_cloudinary

click node_app "https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/App.jsx"
click node_routes "https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/routes/AppRoutes.jsx"
click node_authui "https://github.com/telugujayaprakash/frontpocket/tree/main/client/src/pages/auth"
click node_dashboard "https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/components/dashboard/DashboardLayout.jsx"
click node_profileui "https://github.com/telugujayaprakash/frontpocket/tree/main/client/src/components/profile-editor"
click node_contentui "https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/pages/content/ContentPage.jsx"
click node_analyticsui "https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/pages/analytics/AnalyticsPage.jsx"
click node_settingsui "https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/pages/settings/SettingsPage.jsx"
click node_publicui "https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/components/profile/UniversalProfileRenderer.jsx"
click node_authstate "https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/redux/auth/authSlice.js"
click node_authrequests "https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/redux/auth/authThunk.js"
click node_http "https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/api/axios.js"
click node_server "https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/app.js"
click node_authdomain "https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/controllers/authController.js"
click node_profiledomain "https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/controllers/profileController.js"
click node_contentdomain "https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/controllers/contentController.js"
click node_bannerdomain "https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/controllers/bannerController.js"
click node_publicdomain "https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/controllers/publicController.js"
click node_analyticsdomain "https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/controllers/analyticsController.js"
click node_settingsdomain "https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/controllers/settingsController.js"
click node_authguard "https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/middleware/authMiddleware.js"
click node_postgres "https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/config/db.js"
click node_users "https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/models/userModel.js"
click node_cache "https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/services/cacheService.js"
click node_redis "https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/utils/redisClient.js"
click node_media "https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/services/media/cloudinary.service.js"
click node_mail "https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/utils/mailer.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_routes,node_authui,node_dashboard,node_profileui,node_contentui,node_analyticsui,node_settingsui,node_publicui,node_authstate,node_authrequests,node_http toneBlue
class node_server,node_authdomain,node_profiledomain,node_contentdomain,node_bannerdomain,node_publicdomain,node_analyticsdomain,node_settingsdomain,node_authguard toneAmber
class node_postgres,node_users,node_cache,node_redis toneMint
class node_media,node_cloudinary,node_mail,node_emailservice toneRose
class node_visitor,node_creator toneIndigo
```

## Components

### Creator and visitor app

- [App shell](https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [App routes](https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/routes/AppRoutes.jsx): `client/src/routes/AppRoutes.jsx`
- [Registration and login](https://github.com/telugujayaprakash/frontpocket/tree/main/client/src/pages/auth): `client/src/pages/auth`
- [Dashboard](https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/components/dashboard/DashboardLayout.jsx): `client/src/components/dashboard/DashboardLayout.jsx`
- [Profile editor](https://github.com/telugujayaprakash/frontpocket/tree/main/client/src/components/profile-editor): `client/src/components/profile-editor`
- [Content manager](https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/pages/content/ContentPage.jsx): `client/src/pages/content/ContentPage.jsx`
- [Analytics dashboard](https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/pages/analytics/AnalyticsPage.jsx): `client/src/pages/analytics/AnalyticsPage.jsx`
- [Account settings](https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/pages/settings/SettingsPage.jsx): `client/src/pages/settings/SettingsPage.jsx`
- [Public profile](https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/components/profile/UniversalProfileRenderer.jsx): `client/src/components/profile/UniversalProfileRenderer.jsx`
- [Auth state](https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/redux/auth/authSlice.js): `client/src/redux/auth/authSlice.js`
- [Auth requests](https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/redux/auth/authThunk.js): `client/src/redux/auth/authThunk.js`
- [HTTP client](https://github.com/telugujayaprakash/frontpocket/blob/main/client/src/api/axios.js): `client/src/api/axios.js`

### Backend API domains

- [API application](https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/app.js): `server/src/app.js`
- [Authentication](https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/controllers/authController.js): `server/src/controllers/authController.js`
- [Profile management](https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/controllers/profileController.js): `server/src/controllers/profileController.js`
- [Content and links](https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/controllers/contentController.js): `server/src/controllers/contentController.js`
- [Featured banners](https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/controllers/bannerController.js): `server/src/controllers/bannerController.js`
- [Public profiles](https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/controllers/publicController.js): `server/src/controllers/publicController.js`
- [Analytics](https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/controllers/analyticsController.js): `server/src/controllers/analyticsController.js`
- [Account security](https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/controllers/settingsController.js): `server/src/controllers/settingsController.js`
- [Auth guard](https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/middleware/authMiddleware.js): `server/src/middleware/authMiddleware.js`

### Persistence and services

- [PostgreSQL](https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/config/db.js): `server/src/config/db.js`
- [User records](https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/models/userModel.js): `server/src/models/userModel.js`
- [Cache service](https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/services/cacheService.js): `server/src/services/cacheService.js`
- [Redis and fallback](https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/utils/redisClient.js): `server/src/utils/redisClient.js`

### External services

- [Media uploads](https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/services/media/cloudinary.service.js): `server/src/services/media/cloudinary.service.js`
- **Cloudinary**
- [Email delivery](https://github.com/telugujayaprakash/frontpocket/blob/main/server/src/utils/mailer.js): `server/src/utils/mailer.js`
- **Email provider**

### Other components

- **Profile visitor**
- **Creator**

## Connections

- Creator → App routes: opens app (evidence: `client/src/routes/AppRoutes.jsx`)
- Profile visitor → App routes: opens profile (evidence: `client/src/routes/AppRoutes.jsx`)
- App shell → App routes: renders (evidence: `client/src/App.jsx`)
- App routes → Registration and login: routes auth (evidence: `client/src/routes/AppRoutes.jsx`)
- App routes → Dashboard: routes dashboard (evidence: `client/src/routes/AppRoutes.jsx`)
- App routes → Public profile: routes profile (evidence: `client/src/routes/AppRoutes.jsx`)
- Creator → Registration and login: registers
- Registration and login → Auth requests: dispatches auth (evidence: `client/src/redux/auth/authThunk.js`)
- Auth requests → HTTP client: sends requests (evidence: `client/src/redux/auth/authThunk.js`)
- App shell → Auth requests: checks session (evidence: `client/src/App.jsx`)
- Creator → Profile editor: edits profile
- Creator → Content manager: manages content
- Creator → Analytics dashboard: reviews metrics
- Creator → Account settings: manages account
- Profile visitor → Public profile: views profile
- API application → Authentication: mounts routes (evidence: `server/src/app.js`)
- API application → Profile management: mounts routes (evidence: `server/src/app.js`)
- API application → Content and links: mounts routes (evidence: `server/src/app.js`)
- API application → Featured banners: mounts routes (evidence: `server/src/app.js`)
- API application → Public profiles: mounts routes (evidence: `server/src/app.js`)
- API application → Analytics: mounts routes (evidence: `server/src/app.js`)
- API application → Account security: mounts routes (evidence: `server/src/app.js`)
- HTTP client → API application: calls API
- Account security → PostgreSQL: queries (evidence: `server/src/controllers/settingsController.js`)
- Account security → User records: updates security (evidence: `server/src/controllers/settingsController.js`)
- Account security → Cache service: invalidates profile (evidence: `server/src/controllers/settingsController.js`)
- Account security → Email delivery: sends OTP (evidence: `server/src/controllers/settingsController.js`)
- Account security → Email provider: delivers mail
- Profile management → PostgreSQL: queries profile (evidence: `server/src/controllers/profileController.js`)
- Profile management → Media uploads: uploads media (evidence: `server/src/controllers/profileController.js`)
- Profile management → Cache service: invalidates profile (evidence: `server/src/controllers/profileController.js`)
- Featured banners → PostgreSQL: queries banners (evidence: `server/src/controllers/bannerController.js`)
- Featured banners → Media uploads: uploads banners (evidence: `server/src/controllers/bannerController.js`)
- Featured banners → Cache service: invalidates profile (evidence: `server/src/controllers/bannerController.js`)
- Featured banners → Redis and fallback: deduplicates clicks (evidence: `server/src/controllers/bannerController.js`)
- Public profiles → PostgreSQL: reads profiles (evidence: `server/src/controllers/publicController.js`)
- Public profiles → Cache service: uses cache (evidence: `server/src/controllers/publicController.js`)
- Auth guard → User records: checks user (evidence: `server/src/middleware/authMiddleware.js`)
- User records → PostgreSQL: queries database (evidence: `server/src/models/userModel.js`)
- Cache service → Redis and fallback: uses Redis (evidence: `server/src/services/cacheService.js`)
- Media uploads → Cloudinary: stores media
