# sibisiddharth8/mymind-admin architecture

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

- Interactive diagram: https://gitdiagram.com/sibisiddharth8/mymind-admin
- Repository: https://github.com/sibisiddharth8/mymind-admin

## Overview

This is a portfolio-management product: administrators use a web console to manage portfolio content, users, blogs, API keys, and operational settings; a backend exposes those capabilities and public-user interactions. The clearest sampled end-to-end flow is blog handling: backend route dispatch applies validation/authentication and calls controllers, which delegate blog operations to a service. The source index also identifies dashboard, AI, speech, hosting, and notification capabilities. Several frontend-to-backend links are not shown in sampled source, so those connections are omitted or marked unverified.

Main entry points: [`backend/src/index.ts`](https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/index.ts) (HTTP and socket server), [`backend/src/routes/blog.routes.ts`](https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/routes/blog.routes.ts) (Blog routes), [`admin_frontend/src/App.tsx`](https://github.com/sibisiddharth8/mymind-admin/blob/master/admin_frontend/src/App.tsx) (Admin application), [`admin_frontend/src/services/apiClient.ts`](https://github.com/sibisiddharth8/mymind-admin/blob/master/admin_frontend/src/services/apiClient.ts) (HTTP client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_console["Admin console"]
  node_app["Admin application<br/>[App.tsx]"]
  node_adminpages["Admin screens"]
  node_authcontext["Admin session<br/>[AuthContext.tsx]"]
  node_apiclient["HTTP client<br/>[apiClient.ts]"]
  node_blogui["Blog management UI<br/>[BlogsPage.tsx]"]
end

subgraph group_api["Backend API"]
  node_server["HTTP and socket server<br/>[index.ts]"]
  node_blogroutes["Blog routes<br/>[blog.routes.ts]"]
  node_publicroutes["Public-user routes"]
  node_authmw["Admin authentication<br/>[auth.middleware.ts]"]
  node_validation["Request validation"]
  node_upload["Media upload<br/>[multer.ts]"]
end

subgraph group_content["Portfolio content"]
  node_blogcontroller["Blog controller<br/>[blog.controller.ts]"]
  node_blogservice["Blog operations<br/>[blog.service.ts]"]
  node_publicusercontroller["User controller"]
  node_publicuserservice["User accounts"]
  node_otherfeatures["Other API capabilities"]
end

subgraph group_platform["Platform services"]
  node_prisma["Data access and sync<br/>[prisma.ts]"]
  node_embedding["Content embeddings"]
  node_keymanager["AI key management<br/>[api-key-manager.ts]"]
  node_cloudinary["Cloudinary storage"]
  node_aiandvoice["AI and speech services"]
  node_operations["Monitoring and notifications"]
end

node_admin(("Admin operator"))
node_publicuser(("Public user"))

node_admin -.->|"uses"| node_app
node_app -->|"routes to"| node_adminpages
node_app -->|"provides session"| node_authcontext
node_authcontext -->|"uses"| node_apiclient
node_adminpages -.->|"includes"| node_blogui
node_blogui -.->|"requests data"| node_apiclient
node_apiclient -.->|"sends API requests"| node_server
node_server -->|"mounts routes"| node_blogroutes
node_server -->|"mounts routes"| node_publicroutes
node_server -->|"mounts feature routes"| node_otherfeatures
node_server -->|"mounts AI and speech routes"| node_aiandvoice
node_server -->|"mounts platform routes"| node_operations
node_blogroutes -->|"protects admin routes"| node_authmw
node_blogroutes -->|"validates requests"| node_validation
node_blogroutes -->|"uploads covers"| node_upload
node_blogroutes -->|"dispatches requests"| node_blogcontroller
node_blogcontroller -->|"delegates blog work"| node_blogservice
node_publicroutes -->|"dispatches requests"| node_publicusercontroller
node_publicusercontroller -->|"delegates account work"| node_publicuserservice
node_publicuser -.->|"uses public endpoints"| node_publicroutes
node_upload -->|"uploads files"| node_cloudinary
node_prisma -->|"syncs content vectors"| node_embedding
node_embedding -->|"requests embeddings"| node_keymanager
node_prisma -.->|"backs data operations"| node_otherfeatures

click node_app "https://github.com/sibisiddharth8/mymind-admin/blob/master/admin_frontend/src/App.tsx"
click node_adminpages "https://github.com/sibisiddharth8/mymind-admin/tree/master/admin_frontend/src/pages"
click node_authcontext "https://github.com/sibisiddharth8/mymind-admin/blob/master/admin_frontend/src/context/AuthContext.tsx"
click node_apiclient "https://github.com/sibisiddharth8/mymind-admin/blob/master/admin_frontend/src/services/apiClient.ts"
click node_blogui "https://github.com/sibisiddharth8/mymind-admin/blob/master/admin_frontend/src/pages/BlogsPage.tsx"
click node_server "https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/index.ts"
click node_blogroutes "https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/routes/blog.routes.ts"
click node_publicroutes "https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/routes/publicUser.routes.ts"
click node_authmw "https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/middleware/auth.middleware.ts"
click node_validation "https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/middleware/validateResource.ts"
click node_upload "https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/middleware/multer.ts"
click node_blogcontroller "https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/controllers/blog.controller.ts"
click node_blogservice "https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/services/blog.service.ts"
click node_publicusercontroller "https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/controllers/publicUser.controller.ts"
click node_publicuserservice "https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/services/publicUser.service.ts"
click node_prisma "https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/lib/prisma.ts"
click node_embedding "https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/services/embedding.service.ts"
click node_keymanager "https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/lib/api-key-manager.ts"
click node_cloudinary "https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/utils/cloudinaryUpload.ts"
click node_otherfeatures "https://github.com/sibisiddharth8/mymind-admin/tree/master/backend/src/controllers"
click node_aiandvoice "https://github.com/sibisiddharth8/mymind-admin/tree/master/backend/src/services"
click node_operations "https://github.com/sibisiddharth8/mymind-admin/tree/master/backend/src/routes"

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_adminpages,node_authcontext,node_apiclient,node_blogui,node_publicuser toneBlue
class node_server,node_blogroutes,node_publicroutes,node_authmw,node_validation,node_upload toneAmber
class node_blogcontroller,node_blogservice,node_publicusercontroller,node_publicuserservice,node_otherfeatures toneMint
class node_prisma,node_embedding,node_keymanager,node_cloudinary,node_aiandvoice,node_operations toneRose
class node_admin toneIndigo
```

## Components

### Admin console

- [Admin application](https://github.com/sibisiddharth8/mymind-admin/blob/master/admin_frontend/src/App.tsx): `admin_frontend/src/App.tsx`
- [Admin screens](https://github.com/sibisiddharth8/mymind-admin/tree/master/admin_frontend/src/pages): `admin_frontend/src/pages`
- [Admin session](https://github.com/sibisiddharth8/mymind-admin/blob/master/admin_frontend/src/context/AuthContext.tsx): `admin_frontend/src/context/AuthContext.tsx`
- [HTTP client](https://github.com/sibisiddharth8/mymind-admin/blob/master/admin_frontend/src/services/apiClient.ts): `admin_frontend/src/services/apiClient.ts`
- [Blog management UI](https://github.com/sibisiddharth8/mymind-admin/blob/master/admin_frontend/src/pages/BlogsPage.tsx): `admin_frontend/src/pages/BlogsPage.tsx`

### Backend API

- [HTTP and socket server](https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/index.ts): `backend/src/index.ts`
- [Blog routes](https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/routes/blog.routes.ts): `backend/src/routes/blog.routes.ts`
- [Public-user routes](https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/routes/publicUser.routes.ts): `backend/src/routes/publicUser.routes.ts`
- [Admin authentication](https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/middleware/auth.middleware.ts): `backend/src/middleware/auth.middleware.ts`
- [Request validation](https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/middleware/validateResource.ts): `backend/src/middleware/validateResource.ts`
- [Media upload](https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/middleware/multer.ts): `backend/src/middleware/multer.ts`

### Portfolio content

- [Blog controller](https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/controllers/blog.controller.ts): `backend/src/controllers/blog.controller.ts`
- [Blog operations](https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/services/blog.service.ts): `backend/src/services/blog.service.ts`
- [User controller](https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/controllers/publicUser.controller.ts): `backend/src/controllers/publicUser.controller.ts`
- [User accounts](https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/services/publicUser.service.ts): `backend/src/services/publicUser.service.ts`
- [Other API capabilities](https://github.com/sibisiddharth8/mymind-admin/tree/master/backend/src/controllers): `backend/src/controllers`

### Platform services

- [Data access and sync](https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/lib/prisma.ts): `backend/src/lib/prisma.ts`
- [Content embeddings](https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/services/embedding.service.ts): `backend/src/services/embedding.service.ts`
- [AI key management](https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/lib/api-key-manager.ts): `backend/src/lib/api-key-manager.ts`
- [Cloudinary storage](https://github.com/sibisiddharth8/mymind-admin/blob/master/backend/src/utils/cloudinaryUpload.ts): `backend/src/utils/cloudinaryUpload.ts`
- [AI and speech services](https://github.com/sibisiddharth8/mymind-admin/tree/master/backend/src/services): `backend/src/services`
- [Monitoring and notifications](https://github.com/sibisiddharth8/mymind-admin/tree/master/backend/src/routes): `backend/src/routes`

### Other components

- **Admin operator**
- **Public user**

## Connections

- Admin operator → Admin application: uses
- Admin application → Admin screens: routes to
- Admin application → Admin session: provides session (evidence: `admin_frontend/src/App.tsx`)
- Admin session → HTTP client: uses (evidence: `admin_frontend/src/context/AuthContext.tsx`)
- Admin screens → Blog management UI: includes
- Blog management UI → HTTP client: requests data
- HTTP client → HTTP and socket server: sends API requests
- HTTP and socket server → Blog routes: mounts routes (evidence: `backend/src/index.ts`)
- HTTP and socket server → Public-user routes: mounts routes (evidence: `backend/src/index.ts`)
- HTTP and socket server → Other API capabilities: mounts feature routes (evidence: `backend/src/index.ts`)
- HTTP and socket server → AI and speech services: mounts AI and speech routes (evidence: `backend/src/index.ts`)
- HTTP and socket server → Monitoring and notifications: mounts platform routes (evidence: `backend/src/index.ts`)
- Blog routes → Admin authentication: protects admin routes (evidence: `backend/src/routes/blog.routes.ts`)
- Blog routes → Request validation: validates requests (evidence: `backend/src/routes/blog.routes.ts`)
- Blog routes → Media upload: uploads covers (evidence: `backend/src/routes/blog.routes.ts`)
- Blog routes → Blog controller: dispatches requests (evidence: `backend/src/routes/blog.routes.ts`)
- Blog controller → Blog operations: delegates blog work (evidence: `backend/src/controllers/blog.controller.ts`)
- Public-user routes → User controller: dispatches requests (evidence: `backend/src/routes/publicUser.routes.ts`)
- User controller → User accounts: delegates account work (evidence: `backend/src/controllers/publicUser.controller.ts`)
- Public user → Public-user routes: uses public endpoints
- Media upload → Cloudinary storage: uploads files (evidence: `backend/src/middleware/multer.ts`)
- Data access and sync → Content embeddings: syncs content vectors (evidence: `backend/src/lib/prisma.ts`)
- Content embeddings → AI key management: requests embeddings (evidence: `backend/src/services/embedding.service.ts`)
- Data access and sync → Other API capabilities: backs data operations
