# neelabhshukla018/despiree-_blogs architecture

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

- Interactive diagram: https://gitdiagram.com/neelabhshukla018/despiree-_blogs
- Repository: https://github.com/neelabhshukla018/despiree-_blogs

## Overview

DESPIRE is an AI-assisted blogging and reading platform. Readers discover and search posts, open details, save posts, and engage; creators generate drafts, edit and publish them, with followers notified of new posts. Accounts, follows, contacts, notifications, and Pro payments are distinct supporting workflows. The graph connects the React app to the Express API and shows sampled controller/model behavior. The README documents search, comments, admin tools, and other capabilities not fully represented in sampled source, so their internal wiring is not inferred.

Main entry points: [`FrontEnd/src/App.jsx`](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/App.jsx) (App Routing), [`Backend/server.js`](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/server.js) (Express Server), [`Backend/controllers/aiController.js`](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/controllers/aiController.js) (AI Generation), [`Backend/controllers/blogController.js`](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/controllers/blogController.js) (Blog Workflows)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Reader and Creator App"]
  node_app["App Routing<br/>[App.jsx]"]
  node_blog_ui["Blog Experience<br/>[Blog.jsx]"]
  node_details_ui["Blog Details<br/>[BlogDetails.jsx]"]
  node_create_ui["Create Blog<br/>[CreateBlog.jsx]"]
  node_edit_ui["Edit Blog<br/>[EditBlog.jsx]"]
  node_dashboard_ui["Dashboard<br/>[Dashboard.jsx]"]
  node_saved_ui["Saved Blogs<br/>[SavedBlogs.jsx]"]
  node_contact_ui["Contact Form<br/>[ContactUs.jsx]"]
  node_auth["Clerk Auth<br/>[main.jsx]"]
  node_blog_service["Blog API Client<br/>[blogService.js]"]
end

subgraph group_api["API and Workflows"]
  node_server["Express Server<br/>[server.js]"]
  node_blog_routes["Blog Routes<br/>[blogRoutes.js]"]
  node_user_routes["User Routes<br/>[userRoutes.js]"]
  node_follow_routes["Follow Routes<br/>[followRoutes.js]"]
  node_notification_routes["Notification Routes"]
  node_contact_routes["Contact Routes<br/>[contactRoutes.js]"]
  node_payment_routes["Payment Routes<br/>[paymentRoutes.js]"]
end

subgraph group_content["Content and Community"]
  node_blog_controller["Blog Workflows<br/>[blogController.js]"]
  node_follow_model[("Follow Records<br/>[Follow.js]")]
  node_notification_model[("Notifications<br/>[Notification.js]")]
end

subgraph group_ai["AI and Pro"]
  node_ai_routes["AI Routes<br/>[aiRoutes.js]"]
  node_ai_controller["AI Generation<br/>[aiController.js]"]
  node_prompt_builder["Cover Prompt<br/>[promptBuilder.js]"]
  node_image_service["Cover Image Service<br/>[imageService.js]"]
  node_payment_controller["Payment Workflow"]
end

subgraph group_state["Persistence and Services"]
  node_blog_model[("Blog Records<br/>[blog.js]")]
  node_user_model[("User Records<br/>[user.js]")]
  node_contact_model[("Contact Messages<br/>[contactModel.js]")]
  node_payment_model[("Payment Records<br/>[Payment.js]")]
end

node_reader(("Reader or Creator"))
node_mongodb[("MongoDB")]
node_groq["Groq API"]
node_image_provider["Image Generation"]
node_cloudinary["Cloudinary"]

node_reader -->|"uses"| node_app
node_app -->|"routes to"| node_blog_ui
node_app -->|"routes to"| node_details_ui
node_app -->|"routes to"| node_create_ui
node_app -->|"routes to"| node_edit_ui
node_app -->|"routes to"| node_dashboard_ui
node_app -->|"routes to"| node_saved_ui
node_app -->|"routes to"| node_contact_ui
node_blog_ui -->|"requests posts"| node_blog_service
node_details_ui -->|"requests details"| node_blog_service
node_create_ui -->|"submits post"| node_blog_service
node_edit_ui -->|"updates post"| node_blog_service
node_server -->|"mounts"| node_blog_routes
node_server -->|"mounts"| node_user_routes
node_server -->|"mounts"| node_follow_routes
node_server -->|"mounts"| node_notification_routes
node_server -->|"mounts"| node_contact_routes
node_server -->|"mounts"| node_payment_routes
node_server -->|"connects"| node_mongodb
node_blog_routes -->|"dispatches"| node_blog_controller
node_blog_controller -->|"reads and writes"| node_blog_model
node_blog_controller -->|"finds followers"| node_follow_model
node_blog_controller -->|"creates alerts"| node_notification_model
node_user_routes -->|"reads and writes"| node_user_model
node_follow_routes -->|"reads and writes"| node_follow_model
node_notification_routes -->|"reads and updates"| node_notification_model
node_contact_routes -->|"stores messages"| node_contact_model
node_payment_routes -->|"dispatches"| node_payment_controller
node_payment_controller -->|"records payment"| node_payment_model
node_payment_controller -->|"activates Pro"| node_user_model
node_payment_controller -.->|"creates Razorpay order"| node_reader
node_ai_routes -->|"dispatches"| node_ai_controller
node_ai_controller -->|"checks limits"| node_user_model
node_ai_controller -.->|"generates text and prompts"| node_groq
node_ai_controller -->|"builds cover prompt"| node_prompt_builder
node_ai_controller -->|"generates cover"| node_image_service
node_image_service -.->|"requests image"| node_image_provider
node_image_service -.->|"uploads image"| node_cloudinary

click node_app "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/App.jsx"
click node_blog_ui "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/Components/Blog.jsx"
click node_details_ui "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/Components/BlogDetails.jsx"
click node_create_ui "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/Components/CreateBlog.jsx"
click node_edit_ui "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/Components/EditBlog.jsx"
click node_dashboard_ui "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/Components/Dashboard.jsx"
click node_saved_ui "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/Components/SavedBlogs.jsx"
click node_contact_ui "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/Components/ContactUs.jsx"
click node_auth "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/main.jsx"
click node_blog_service "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/services/blogService.js"
click node_server "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/server.js"
click node_blog_routes "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/routes/blogRoutes.js"
click node_user_routes "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/routes/userRoutes.js"
click node_follow_routes "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/routes/followRoutes.js"
click node_notification_routes "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/routes/notificationRoutes.js"
click node_contact_routes "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/routes/contactRoutes.js"
click node_payment_routes "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/routes/paymentRoutes.js"
click node_blog_controller "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/controllers/blogController.js"
click node_follow_model "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/models/Follow.js"
click node_notification_model "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/models/Notification.js"
click node_blog_model "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/models/blog.js"
click node_user_model "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/models/user.js"
click node_contact_model "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/models/contactModel.js"
click node_ai_routes "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/routes/aiRoutes.js"
click node_ai_controller "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/controllers/aiController.js"
click node_prompt_builder "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/utils/promptBuilder.js"
click node_image_service "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/services/imageService.js"
click node_payment_controller "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/controllers/paymentController.js"
click node_payment_model "https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/models/Payment.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_blog_ui,node_details_ui,node_create_ui,node_edit_ui,node_dashboard_ui,node_saved_ui,node_contact_ui,node_auth,node_blog_service toneBlue
class node_server,node_blog_routes,node_user_routes,node_follow_routes,node_notification_routes,node_contact_routes,node_payment_routes,node_mongodb toneAmber
class node_blog_controller,node_follow_model,node_notification_model,node_groq toneMint
class node_ai_routes,node_ai_controller,node_prompt_builder,node_image_service,node_payment_controller toneRose
class node_blog_model,node_user_model,node_contact_model,node_payment_model,node_reader,node_image_provider,node_cloudinary toneIndigo
```

## Components

### Reader and Creator App

- [App Routing](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/App.jsx): `FrontEnd/src/App.jsx`
- [Blog Experience](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/Components/Blog.jsx): `FrontEnd/src/Components/Blog.jsx`
- [Blog Details](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/Components/BlogDetails.jsx): `FrontEnd/src/Components/BlogDetails.jsx`
- [Create Blog](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/Components/CreateBlog.jsx): `FrontEnd/src/Components/CreateBlog.jsx`
- [Edit Blog](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/Components/EditBlog.jsx): `FrontEnd/src/Components/EditBlog.jsx`
- [Dashboard](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/Components/Dashboard.jsx): `FrontEnd/src/Components/Dashboard.jsx`
- [Saved Blogs](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/Components/SavedBlogs.jsx): `FrontEnd/src/Components/SavedBlogs.jsx`
- [Contact Form](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/Components/ContactUs.jsx): `FrontEnd/src/Components/ContactUs.jsx`
- [Clerk Auth](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/main.jsx): `FrontEnd/src/main.jsx`
- [Blog API Client](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/FrontEnd/src/services/blogService.js): `FrontEnd/src/services/blogService.js`

### API and Workflows

- [Express Server](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/server.js): `Backend/server.js`
- [Blog Routes](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/routes/blogRoutes.js): `Backend/routes/blogRoutes.js`
- [User Routes](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/routes/userRoutes.js): `Backend/routes/userRoutes.js`
- [Follow Routes](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/routes/followRoutes.js): `Backend/routes/followRoutes.js`
- [Notification Routes](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/routes/notificationRoutes.js): `Backend/routes/notificationRoutes.js`
- [Contact Routes](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/routes/contactRoutes.js): `Backend/routes/contactRoutes.js`
- [Payment Routes](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/routes/paymentRoutes.js): `Backend/routes/paymentRoutes.js`

### Content and Community

- [Blog Workflows](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/controllers/blogController.js): `Backend/controllers/blogController.js`
- [Follow Records](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/models/Follow.js): `Backend/models/Follow.js`
- [Notifications](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/models/Notification.js): `Backend/models/Notification.js`

### AI and Pro

- [AI Routes](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/routes/aiRoutes.js): `Backend/routes/aiRoutes.js`
- [AI Generation](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/controllers/aiController.js): `Backend/controllers/aiController.js`
- [Cover Prompt](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/utils/promptBuilder.js): `Backend/utils/promptBuilder.js`
- [Cover Image Service](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/services/imageService.js): `Backend/services/imageService.js`
- [Payment Workflow](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/controllers/paymentController.js): `Backend/controllers/paymentController.js`

### Persistence and Services

- [Blog Records](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/models/blog.js): `Backend/models/blog.js`
- [User Records](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/models/user.js): `Backend/models/user.js`
- [Contact Messages](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/models/contactModel.js): `Backend/models/contactModel.js`
- [Payment Records](https://github.com/neelabhshukla018/despiree-_blogs/blob/main/Backend/models/Payment.js): `Backend/models/Payment.js`

### Other components

- **Reader or Creator**
- **MongoDB**
- **Groq API**
- **Image Generation**
- **Cloudinary**

## Connections

- Reader or Creator → App Routing: uses
- App Routing → Blog Experience: routes to
- App Routing → Blog Details: routes to
- App Routing → Create Blog: routes to
- App Routing → Edit Blog: routes to
- App Routing → Dashboard: routes to
- App Routing → Saved Blogs: routes to
- App Routing → Contact Form: routes to
- Blog Experience → Blog API Client: requests posts
- Blog Details → Blog API Client: requests details
- Create Blog → Blog API Client: submits post
- Edit Blog → Blog API Client: updates post
- Express Server → Blog Routes: mounts
- Express Server → User Routes: mounts
- Express Server → Follow Routes: mounts
- Express Server → Notification Routes: mounts
- Express Server → Contact Routes: mounts
- Express Server → Payment Routes: mounts
- Express Server → MongoDB: connects
- Blog Routes → Blog Workflows: dispatches
- Blog Workflows → Blog Records: reads and writes
- Blog Workflows → Follow Records: finds followers
- Blog Workflows → Notifications: creates alerts
- User Routes → User Records: reads and writes
- Follow Routes → Follow Records: reads and writes
- Notification Routes → Notifications: reads and updates
- Contact Routes → Contact Messages: stores messages
- Payment Routes → Payment Workflow: dispatches
- Payment Workflow → Payment Records: records payment
- Payment Workflow → User Records: activates Pro
- Payment Workflow → Reader or Creator: creates Razorpay order
- AI Routes → AI Generation: dispatches
- AI Generation → User Records: checks limits
- AI Generation → Groq API: generates text and prompts
- AI Generation → Cover Prompt: builds cover prompt
- AI Generation → Cover Image Service: generates cover
- Cover Image Service → Image Generation: requests image
- Cover Image Service → Cloudinary: uploads image
