# pradeepmajji853/scalable-url-management-platform architecture

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

- Interactive diagram: https://gitdiagram.com/pradeepmajji853/scalable-url-management-platform
- Repository: https://github.com/pradeepmajji853/scalable-url-management-platform

## Overview

Linkly is a URL-management SaaS: users create and configure short links, share them with teams, and review click analytics through a React dashboard and Express API. Redirect resolution is a separate runtime path; the README describes Redis cache-aside lookup and asynchronous click tracking, while the sampled controller shows redirects and password verification. The graph preserves authentication, teams, developer keys, analytics, and background processing. Some feature implementations and wiring were not sampled, so undocumented relationships are omitted or marked unverified.

Main entry points: [`backend/src/app.ts`](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/app.ts) (Express API), [`frontend/src/App.tsx`](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/frontend/src/App.tsx) (React application), [`backend/src/queues/index.ts`](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/queues/index.ts) (BullMQ queues), [`backend/src/database/connection.ts`](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/database/connection.ts) (PostgreSQL access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web dashboard"]
  node_spa["React application<br/>[App.tsx]"]
  node_auth_ui["Authentication screens<br/>[AuthContext.tsx]"]
  node_link_ui["Link management<br/>[UrlsPage.tsx]"]
  node_analytics_ui["Analytics dashboard<br/>[AnalyticsPage.tsx]"]
  node_team_ui["Team workspace<br/>[TeamPage.tsx]"]
  node_settings_ui["Account settings<br/>[SettingsPage.tsx]"]
  node_api_client["HTTP API client<br/>[client.ts]"]
end

subgraph group_api["API and domain"]
  node_api["Express API<br/>[app.ts]"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_urls["Link and redirect service<br/>[url.service.ts]"]
  node_teams["Team service<br/>[team.service.ts]"]
  node_api_keys["Developer API keys<br/>[apiKey.service.ts]"]
  node_analytics["Analytics service"]
end

subgraph group_persistence["Persistence and cache"]
  node_postgres[("PostgreSQL access<br/>[connection.ts]")]
  node_redis[("Redis cache<br/>[redis.ts]")]
end

subgraph group_workers["Background processing"]
  node_queues["BullMQ queues<br/>[index.ts]"]
  node_click_worker["Click processing<br/>[clickProcessor.ts]"]
  node_analytics_worker["Analytics processing"]
  node_email_worker["Email processing<br/>[emailProcessor.ts]"]
end

node_browser(("Browser user"))

node_browser -->|"uses"| node_spa
node_spa -->|"provides auth"| node_auth_ui
node_spa -->|"routes to"| node_link_ui
node_spa -->|"routes to"| node_analytics_ui
node_spa -->|"routes to"| node_team_ui
node_spa -->|"routes to"| node_settings_ui
node_spa -.->|"makes API calls"| node_api_client
node_api_client -->|"sends requests"| node_api
node_api -->|"dispatches redirects"| node_urls
node_api -->|"routes auth"| node_auth
node_api -->|"routes teams"| node_teams
node_api -.->|"routes key operations"| node_api_keys
node_api -.->|"routes analytics"| node_analytics
node_auth -->|"enqueues email"| node_queues
node_api -->|"persists records"| node_postgres
node_api -->|"reads and writes cache"| node_redis
node_api -->|"enqueues click jobs"| node_queues
node_queues -->|"dispatches jobs"| node_click_worker
node_queues -->|"dispatches jobs"| node_analytics_worker
node_queues -->|"dispatches jobs"| node_email_worker
node_click_worker -->|"logs clicks"| node_postgres
node_analytics_worker -.->|"reads click data"| node_postgres

click node_spa "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/frontend/src/App.tsx"
click node_auth_ui "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/frontend/src/contexts/AuthContext.tsx"
click node_link_ui "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/frontend/src/pages/dashboard/UrlsPage.tsx"
click node_analytics_ui "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/frontend/src/pages/dashboard/AnalyticsPage.tsx"
click node_team_ui "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/frontend/src/pages/dashboard/TeamPage.tsx"
click node_settings_ui "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/frontend/src/pages/dashboard/SettingsPage.tsx"
click node_api_client "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/frontend/src/api/client.ts"
click node_api "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/app.ts"
click node_auth "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/services/auth.service.ts"
click node_urls "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/services/url.service.ts"
click node_teams "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/services/team.service.ts"
click node_api_keys "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/services/apiKey.service.ts"
click node_analytics "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/services/analytics.service.ts"
click node_postgres "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/database/connection.ts"
click node_redis "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/configs/redis.ts"
click node_queues "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/queues/index.ts"
click node_click_worker "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/jobs/clickProcessor.ts"
click node_analytics_worker "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/jobs/analyticsProcessor.ts"
click node_email_worker "https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/jobs/emailProcessor.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_spa,node_auth_ui,node_link_ui,node_analytics_ui,node_team_ui,node_settings_ui,node_api_client,node_browser toneBlue
class node_api,node_auth,node_urls,node_teams,node_api_keys,node_analytics toneAmber
class node_postgres,node_redis toneMint
class node_queues,node_click_worker,node_analytics_worker,node_email_worker toneRose
```

## Components

### Web dashboard

- [React application](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Authentication screens](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/frontend/src/contexts/AuthContext.tsx): `frontend/src/contexts/AuthContext.tsx`
- [Link management](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/frontend/src/pages/dashboard/UrlsPage.tsx): `frontend/src/pages/dashboard/UrlsPage.tsx`
- [Analytics dashboard](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/frontend/src/pages/dashboard/AnalyticsPage.tsx): `frontend/src/pages/dashboard/AnalyticsPage.tsx`
- [Team workspace](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/frontend/src/pages/dashboard/TeamPage.tsx): `frontend/src/pages/dashboard/TeamPage.tsx`
- [Account settings](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/frontend/src/pages/dashboard/SettingsPage.tsx): `frontend/src/pages/dashboard/SettingsPage.tsx`
- [HTTP API client](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/frontend/src/api/client.ts): `frontend/src/api/client.ts`

### API and domain

- [Express API](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/app.ts): `backend/src/app.ts`
- [Authentication](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/services/auth.service.ts): `backend/src/services/auth.service.ts`
- [Link and redirect service](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/services/url.service.ts): `backend/src/services/url.service.ts`
- [Team service](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/services/team.service.ts): `backend/src/services/team.service.ts`
- [Developer API keys](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/services/apiKey.service.ts): `backend/src/services/apiKey.service.ts`
- [Analytics service](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/services/analytics.service.ts): `backend/src/services/analytics.service.ts`

### Persistence and cache

- [PostgreSQL access](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/database/connection.ts): `backend/src/database/connection.ts`
- [Redis cache](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/configs/redis.ts): `backend/src/configs/redis.ts`

### Background processing

- [BullMQ queues](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/queues/index.ts): `backend/src/queues/index.ts`
- [Click processing](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/jobs/clickProcessor.ts): `backend/src/jobs/clickProcessor.ts`
- [Analytics processing](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/jobs/analyticsProcessor.ts): `backend/src/jobs/analyticsProcessor.ts`
- [Email processing](https://github.com/pradeepmajji853/scalable-url-management-platform/blob/main/backend/src/jobs/emailProcessor.ts): `backend/src/jobs/emailProcessor.ts`

### Other components

- **Browser user**

## Connections

- Browser user → React application: uses (evidence: `README.md`)
- React application → Authentication screens: provides auth (evidence: `frontend/src/App.tsx`)
- React application → Link management: routes to (evidence: `frontend/src/App.tsx`)
- React application → Analytics dashboard: routes to (evidence: `frontend/src/App.tsx`)
- React application → Team workspace: routes to (evidence: `frontend/src/App.tsx`)
- React application → Account settings: routes to (evidence: `frontend/src/App.tsx`)
- React application → HTTP API client: makes API calls
- HTTP API client → Express API: sends requests (evidence: `README.md`)
- Express API → Link and redirect service: dispatches redirects (evidence: `backend/src/app.ts`)
- Express API → Authentication: routes auth
- Express API → Team service: routes teams
- Express API → Developer API keys: routes key operations
- Express API → Analytics service: routes analytics
- Authentication → BullMQ queues: enqueues email (evidence: `backend/src/services/auth.service.ts`)
- Express API → PostgreSQL access: persists records (evidence: `README.md`)
- Express API → Redis cache: reads and writes cache (evidence: `README.md`)
- Express API → BullMQ queues: enqueues click jobs (evidence: `README.md`)
- BullMQ queues → Click processing: dispatches jobs (evidence: `backend/src/server.ts`)
- BullMQ queues → Analytics processing: dispatches jobs (evidence: `backend/src/server.ts`)
- BullMQ queues → Email processing: dispatches jobs (evidence: `backend/src/server.ts`)
- Click processing → PostgreSQL access: logs clicks (evidence: `README.md`)
- Analytics processing → PostgreSQL access: reads click data
