# walkerchu/fso11-cicd architecture

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

- Interactive diagram: https://gitdiagram.com/walkerchu/fso11-cicd
- Repository: https://github.com/walkerchu/fso11-cicd

## Overview

This is a full-stack blog-list application: users sign in, browse and sort blogs, view individual posts, create posts, like them, and delete their own posts. The React app owns interaction and page state; frontend services mediate backend requests. Express routes handle blog, user, and login operations, with token middleware protecting selected actions and Mongoose models persisting users and blogs. The README is empty, and frontend service implementations plus some controllers were not excerpted, so their backend connections are shown as unverified rather than asserted.

Main entry points: [`app.js`](https://github.com/walkerchu/fso11-cicd/blob/main/app.js) (Express application), [`frontend/src/App.jsx`](https://github.com/walkerchu/fso11-cicd/blob/main/frontend/src/App.jsx) (App state and routes), [`models/user.js`](https://github.com/walkerchu/fso11-cicd/blob/main/models/user.js) (User model), [`frontend/src/services/blogs.js`](https://github.com/walkerchu/fso11-cicd/blob/main/frontend/src/services/blogs.js) (Blog API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React application"]
  node_frontend_entry["Browser entry<br/>[main.jsx]"]
  node_app_ui["App state and routes<br/>[App.jsx]"]
  node_blog_list["Blog list item<br/>[Blog.jsx]"]
  node_blog_details["Blog details<br/>[BlogDetails.jsx]"]
  node_blog_form["Blog form<br/>[BlogForm.jsx]"]
  node_notification["Notifications<br/>[Notification.jsx]"]
  node_blog_client["Blog API client<br/>[blogs.js]"]
  node_login_client["Login API client<br/>[login.js]"]
end

subgraph group_backend["Express API"]
  node_server["Express application<br/>[app.js]"]
  node_blogs_api["Blog routes<br/>[blogs.js]"]
  node_users_api["User routes<br/>[users.js]"]
  node_login_api["Login route<br/>[login.js]"]
  node_testing_api["Test routes<br/>[testing.js]"]
  node_auth_middleware["Token and user middleware<br/>[middleware.js]"]
end

subgraph group_domain["Blog and user data"]
  node_blog_model[("Blog model<br/>[blog.js]")]
  node_user_model[("User model<br/>[user.js]")]
end

subgraph group_runtime["Runtime support"]
  node_config["Database configuration<br/>[config.js]"]
  node_logger["Logger<br/>[logger.js]"]
  node_entry["Node entry point<br/>[index.js]"]
end

node_visitor(("Blog user"))
node_mongo[("MongoDB")]

node_visitor -->|"uses"| node_frontend_entry
node_frontend_entry -->|"renders"| node_app_ui
node_app_ui -->|"calls"| node_blog_client
node_app_ui -->|"calls"| node_login_client
node_app_ui -->|"renders"| node_blog_list
node_app_ui -->|"renders"| node_blog_details
node_app_ui -->|"renders"| node_blog_form
node_app_ui -->|"renders"| node_notification
node_app_ui -->|"loads blogs"| node_blog_client
node_app_ui -->|"creates and updates"| node_blog_client
node_app_ui -->|"authenticates"| node_login_client
node_blog_client -.->|"requests API"| node_server
node_login_client -.->|"requests API"| node_server
node_entry -->|"loads"| node_server
node_server -->|"reads settings"| node_config
node_server -->|"logs"| node_logger
node_server -->|"mounts routes"| node_blogs_api
node_server -->|"mounts routes"| node_users_api
node_server -->|"mounts routes"| node_login_api
node_server -->|"registers middleware"| node_auth_middleware
node_server -->|"registers in tests"| node_testing_api
node_blogs_api -->|"queries and saves"| node_blog_model
node_blogs_api -->|"uses user check"| node_auth_middleware
node_users_api -->|"queries and saves"| node_user_model
node_login_api -->|"looks up user"| node_user_model
node_testing_api -->|"uses model"| node_blog_model
node_testing_api -->|"uses model"| node_user_model
node_auth_middleware -->|"loads user"| node_user_model
node_server -->|"connects"| node_mongo
node_blog_model -.->|"persists records"| node_mongo
node_user_model -.->|"persists records"| node_mongo
node_config -->|"reports settings"| node_logger

click node_frontend_entry "https://github.com/walkerchu/fso11-cicd/blob/main/frontend/src/main.jsx"
click node_app_ui "https://github.com/walkerchu/fso11-cicd/blob/main/frontend/src/App.jsx"
click node_blog_list "https://github.com/walkerchu/fso11-cicd/blob/main/frontend/src/components/Blog.jsx"
click node_blog_details "https://github.com/walkerchu/fso11-cicd/blob/main/frontend/src/components/BlogDetails.jsx"
click node_blog_form "https://github.com/walkerchu/fso11-cicd/blob/main/frontend/src/components/BlogForm.jsx"
click node_notification "https://github.com/walkerchu/fso11-cicd/blob/main/frontend/src/components/Notification.jsx"
click node_blog_client "https://github.com/walkerchu/fso11-cicd/blob/main/frontend/src/services/blogs.js"
click node_login_client "https://github.com/walkerchu/fso11-cicd/blob/main/frontend/src/services/login.js"
click node_server "https://github.com/walkerchu/fso11-cicd/blob/main/app.js"
click node_blogs_api "https://github.com/walkerchu/fso11-cicd/blob/main/controllers/blogs.js"
click node_users_api "https://github.com/walkerchu/fso11-cicd/blob/main/controllers/users.js"
click node_login_api "https://github.com/walkerchu/fso11-cicd/blob/main/controllers/login.js"
click node_testing_api "https://github.com/walkerchu/fso11-cicd/blob/main/controllers/testing.js"
click node_auth_middleware "https://github.com/walkerchu/fso11-cicd/blob/main/utils/middleware.js"
click node_blog_model "https://github.com/walkerchu/fso11-cicd/blob/main/models/blog.js"
click node_user_model "https://github.com/walkerchu/fso11-cicd/blob/main/models/user.js"
click node_config "https://github.com/walkerchu/fso11-cicd/blob/main/utils/config.js"
click node_logger "https://github.com/walkerchu/fso11-cicd/blob/main/utils/logger.js"
click node_entry "https://github.com/walkerchu/fso11-cicd/blob/main/index.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_frontend_entry,node_app_ui,node_blog_list,node_blog_details,node_blog_form,node_notification,node_blog_client,node_login_client,node_visitor toneBlue
class node_server,node_blogs_api,node_users_api,node_login_api,node_testing_api,node_auth_middleware,node_mongo toneAmber
class node_blog_model,node_user_model toneMint
class node_config,node_logger,node_entry toneRose
```

## Components

### React application

- [Browser entry](https://github.com/walkerchu/fso11-cicd/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [App state and routes](https://github.com/walkerchu/fso11-cicd/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Blog list item](https://github.com/walkerchu/fso11-cicd/blob/main/frontend/src/components/Blog.jsx): `frontend/src/components/Blog.jsx`
- [Blog details](https://github.com/walkerchu/fso11-cicd/blob/main/frontend/src/components/BlogDetails.jsx): `frontend/src/components/BlogDetails.jsx`
- [Blog form](https://github.com/walkerchu/fso11-cicd/blob/main/frontend/src/components/BlogForm.jsx): `frontend/src/components/BlogForm.jsx`
- [Notifications](https://github.com/walkerchu/fso11-cicd/blob/main/frontend/src/components/Notification.jsx): `frontend/src/components/Notification.jsx`
- [Blog API client](https://github.com/walkerchu/fso11-cicd/blob/main/frontend/src/services/blogs.js): `frontend/src/services/blogs.js`
- [Login API client](https://github.com/walkerchu/fso11-cicd/blob/main/frontend/src/services/login.js): `frontend/src/services/login.js`

### Express API

- [Express application](https://github.com/walkerchu/fso11-cicd/blob/main/app.js): `app.js`
- [Blog routes](https://github.com/walkerchu/fso11-cicd/blob/main/controllers/blogs.js): `controllers/blogs.js`
- [User routes](https://github.com/walkerchu/fso11-cicd/blob/main/controllers/users.js): `controllers/users.js`
- [Login route](https://github.com/walkerchu/fso11-cicd/blob/main/controllers/login.js): `controllers/login.js`
- [Test routes](https://github.com/walkerchu/fso11-cicd/blob/main/controllers/testing.js): `controllers/testing.js`
- [Token and user middleware](https://github.com/walkerchu/fso11-cicd/blob/main/utils/middleware.js): `utils/middleware.js`

### Blog and user data

- [Blog model](https://github.com/walkerchu/fso11-cicd/blob/main/models/blog.js): `models/blog.js`
- [User model](https://github.com/walkerchu/fso11-cicd/blob/main/models/user.js): `models/user.js`

### Runtime support

- [Database configuration](https://github.com/walkerchu/fso11-cicd/blob/main/utils/config.js): `utils/config.js`
- [Logger](https://github.com/walkerchu/fso11-cicd/blob/main/utils/logger.js): `utils/logger.js`
- [Node entry point](https://github.com/walkerchu/fso11-cicd/blob/main/index.js): `index.js`

### Other components

- **Blog user**
- **MongoDB**

## Connections

- Blog user → Browser entry: uses
- Browser entry → App state and routes: renders (evidence: `frontend/src/main.jsx`)
- App state and routes → Blog API client: calls (evidence: `frontend/src/App.jsx`)
- App state and routes → Login API client: calls (evidence: `frontend/src/App.jsx`)
- App state and routes → Blog list item: renders (evidence: `frontend/src/App.jsx`)
- App state and routes → Blog details: renders (evidence: `frontend/src/App.jsx`)
- App state and routes → Blog form: renders (evidence: `frontend/src/App.jsx`)
- App state and routes → Notifications: renders (evidence: `frontend/src/App.jsx`)
- App state and routes → Blog API client: loads blogs (evidence: `frontend/src/App.jsx`)
- App state and routes → Blog API client: creates and updates (evidence: `frontend/src/App.jsx`)
- App state and routes → Login API client: authenticates (evidence: `frontend/src/App.jsx`)
- Blog API client → Express application: requests API
- Login API client → Express application: requests API
- Node entry point → Express application: loads (evidence: `index.js`)
- Express application → Database configuration: reads settings (evidence: `app.js`)
- Express application → Logger: logs (evidence: `app.js`)
- Express application → Blog routes: mounts routes (evidence: `app.js`)
- Express application → User routes: mounts routes (evidence: `app.js`)
- Express application → Login route: mounts routes (evidence: `app.js`)
- Express application → Token and user middleware: registers middleware (evidence: `app.js`)
- Express application → Test routes: registers in tests (evidence: `app.js`)
- Blog routes → Blog model: queries and saves (evidence: `controllers/blogs.js`)
- Blog routes → Token and user middleware: uses user check (evidence: `controllers/blogs.js`)
- User routes → User model: queries and saves (evidence: `controllers/users.js`)
- Login route → User model: looks up user (evidence: `controllers/login.js`)
- Test routes → Blog model: uses model (evidence: `controllers/testing.js`)
- Test routes → User model: uses model (evidence: `controllers/testing.js`)
- Token and user middleware → User model: loads user (evidence: `utils/middleware.js`)
- Express application → MongoDB: connects (evidence: `app.js`)
- Blog model → MongoDB: persists records
- User model → MongoDB: persists records
- Database configuration → Logger: reports settings (evidence: `utils/config.js`)
