# abhinandan12317/mean-devops-assignment architecture

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

- Interactive diagram: https://gitdiagram.com/abhinandan12317/mean-devops-assignment
- Repository: https://github.com/abhinandan12317/mean-devops-assignment

## Overview

This is a containerized MEAN tutorial-management application. Users browse, search, add, view, edit, publish, and delete tutorials through an Angular UI; requests pass through Nginx to an Express API, which persists tutorial records in MongoDB. The README documents the reverse-proxy and container layout. Some UI components and deployment wiring were not sampled, so those links reflect documented architecture or are omitted where call ownership is uncertain.

Main entry points: [`frontend/src/app/app-routing.module.ts`](https://github.com/abhinandan12317/mean-devops-assignment/blob/main/frontend/src/app/app-routing.module.ts) (Page routing), [`nginx.conf`](https://github.com/abhinandan12317/mean-devops-assignment/blob/main/nginx.conf) (Nginx proxy), [`frontend/src/app/services/tutorial.service.ts`](https://github.com/abhinandan12317/mean-devops-assignment/blob/main/frontend/src/app/services/tutorial.service.ts) (HTTP service), [`docker-compose.yml`](https://github.com/abhinandan12317/mean-devops-assignment/blob/main/docker-compose.yml) (Container stack)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Angular UI"]
  node_app["Angular app<br/>[app.component.ts]"]
  node_routing["Page routing"]
  node_list["Tutorial list"]
  node_details["Tutorial details"]
  node_add["Add tutorial"]
  node_service["HTTP service"]
end

subgraph group_api["Tutorial API"]
  node_server["Express server<br/>[server.js]"]
  node_routes["Tutorial routes<br/>[turorial.routes.js]"]
  node_controller["Tutorial handlers"]
end

subgraph group_data["Persistence"]
  node_model["Tutorial model<br/>[tutorial.model.js]"]
  node_dbconfig["Database setup<br/>[index.js]"]
  node_mongo[("MongoDB<br/>[docker-compose.yml]")]
end

subgraph group_runtime["Runtime routing"]
  node_proxy["Nginx proxy<br/>[nginx.conf]"]
  node_compose["Container stack<br/>[docker-compose.yml]"]
  node_frontend["Angular container"]
  node_backend["Node container"]
end

node_user(("Browser user"))

node_user -->|"HTTP requests"| node_proxy
node_proxy -->|"serves UI"| node_frontend
node_proxy -->|"proxies API"| node_backend
node_frontend -->|"loads"| node_app
node_app -->|"routes pages"| node_routing
node_routing -->|"opens list"| node_list
node_routing -->|"opens detail"| node_details
node_routing -->|"opens add"| node_add
node_list -->|"lists, searches, clears"| node_service
node_details -->|"reads, updates, deletes"| node_service
node_add -->|"creates"| node_service
node_service -->|"calls API"| node_proxy
node_backend -->|"runs"| node_server
node_server -->|"mounts routes"| node_routes
node_routes -->|"dispatches handlers"| node_controller
node_controller -->|"queries, mutates"| node_model
node_server -->|"connects database"| node_dbconfig
node_dbconfig -->|"registers schema"| node_model
node_model -->|"persists records"| node_mongo
node_compose -->|"runs"| node_frontend
node_compose -->|"runs"| node_backend
node_compose -->|"runs"| node_mongo

click node_app "https://github.com/abhinandan12317/mean-devops-assignment/blob/main/frontend/src/app/app.component.ts"
click node_routing "https://github.com/abhinandan12317/mean-devops-assignment/blob/main/frontend/src/app/app-routing.module.ts"
click node_list "https://github.com/abhinandan12317/mean-devops-assignment/tree/main/frontend/src/app/components/tutorials-list"
click node_details "https://github.com/abhinandan12317/mean-devops-assignment/tree/main/frontend/src/app/components/tutorial-details"
click node_add "https://github.com/abhinandan12317/mean-devops-assignment/tree/main/frontend/src/app/components/add-tutorial"
click node_service "https://github.com/abhinandan12317/mean-devops-assignment/blob/main/frontend/src/app/services/tutorial.service.ts"
click node_proxy "https://github.com/abhinandan12317/mean-devops-assignment/blob/main/nginx.conf"
click node_server "https://github.com/abhinandan12317/mean-devops-assignment/blob/main/backend/server.js"
click node_routes "https://github.com/abhinandan12317/mean-devops-assignment/blob/main/backend/app/routes/turorial.routes.js"
click node_controller "https://github.com/abhinandan12317/mean-devops-assignment/blob/main/backend/app/controllers/tutorial.controller.js"
click node_model "https://github.com/abhinandan12317/mean-devops-assignment/blob/main/backend/app/models/tutorial.model.js"
click node_dbconfig "https://github.com/abhinandan12317/mean-devops-assignment/blob/main/backend/app/models/index.js"
click node_mongo "https://github.com/abhinandan12317/mean-devops-assignment/blob/main/docker-compose.yml"
click node_compose "https://github.com/abhinandan12317/mean-devops-assignment/blob/main/docker-compose.yml"
click node_frontend "https://github.com/abhinandan12317/mean-devops-assignment/blob/main/frontend/Dockerfile"
click node_backend "https://github.com/abhinandan12317/mean-devops-assignment/blob/main/backend/Dockerfile"

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_routing,node_list,node_details,node_add,node_service,node_user toneBlue
class node_server,node_routes,node_controller toneAmber
class node_model,node_dbconfig,node_mongo toneMint
class node_proxy,node_compose,node_frontend,node_backend toneRose
```

## Components

### Angular UI

- [Angular app](https://github.com/abhinandan12317/mean-devops-assignment/blob/main/frontend/src/app/app.component.ts): `frontend/src/app/app.component.ts`
- [Page routing](https://github.com/abhinandan12317/mean-devops-assignment/blob/main/frontend/src/app/app-routing.module.ts): `frontend/src/app/app-routing.module.ts`
- [Tutorial list](https://github.com/abhinandan12317/mean-devops-assignment/tree/main/frontend/src/app/components/tutorials-list): `frontend/src/app/components/tutorials-list`
- [Tutorial details](https://github.com/abhinandan12317/mean-devops-assignment/tree/main/frontend/src/app/components/tutorial-details): `frontend/src/app/components/tutorial-details`
- [Add tutorial](https://github.com/abhinandan12317/mean-devops-assignment/tree/main/frontend/src/app/components/add-tutorial): `frontend/src/app/components/add-tutorial`
- [HTTP service](https://github.com/abhinandan12317/mean-devops-assignment/blob/main/frontend/src/app/services/tutorial.service.ts): `frontend/src/app/services/tutorial.service.ts`

### Tutorial API

- [Express server](https://github.com/abhinandan12317/mean-devops-assignment/blob/main/backend/server.js): `backend/server.js`
- [Tutorial routes](https://github.com/abhinandan12317/mean-devops-assignment/blob/main/backend/app/routes/turorial.routes.js): `backend/app/routes/turorial.routes.js`
- [Tutorial handlers](https://github.com/abhinandan12317/mean-devops-assignment/blob/main/backend/app/controllers/tutorial.controller.js): `backend/app/controllers/tutorial.controller.js`

### Persistence

- [Tutorial model](https://github.com/abhinandan12317/mean-devops-assignment/blob/main/backend/app/models/tutorial.model.js): `backend/app/models/tutorial.model.js`
- [Database setup](https://github.com/abhinandan12317/mean-devops-assignment/blob/main/backend/app/models/index.js): `backend/app/models/index.js`
- [MongoDB](https://github.com/abhinandan12317/mean-devops-assignment/blob/main/docker-compose.yml): `docker-compose.yml`

### Runtime routing

- [Nginx proxy](https://github.com/abhinandan12317/mean-devops-assignment/blob/main/nginx.conf): `nginx.conf`
- [Container stack](https://github.com/abhinandan12317/mean-devops-assignment/blob/main/docker-compose.yml): `docker-compose.yml`
- [Angular container](https://github.com/abhinandan12317/mean-devops-assignment/blob/main/frontend/Dockerfile): `frontend/Dockerfile`
- [Node container](https://github.com/abhinandan12317/mean-devops-assignment/blob/main/backend/Dockerfile): `backend/Dockerfile`

### Other components

- **Browser user**

## Connections

- Browser user → Nginx proxy: HTTP requests
- Nginx proxy → Angular container: serves UI
- Nginx proxy → Node container: proxies API
- Angular container → Angular app: loads
- Angular app → Page routing: routes pages
- Page routing → Tutorial list: opens list
- Page routing → Tutorial details: opens detail
- Page routing → Add tutorial: opens add
- Tutorial list → HTTP service: lists, searches, clears
- Tutorial details → HTTP service: reads, updates, deletes
- Add tutorial → HTTP service: creates
- HTTP service → Nginx proxy: calls API
- Node container → Express server: runs
- Express server → Tutorial routes: mounts routes
- Tutorial routes → Tutorial handlers: dispatches handlers
- Tutorial handlers → Tutorial model: queries, mutates
- Express server → Database setup: connects database
- Database setup → Tutorial model: registers schema
- Tutorial model → MongoDB: persists records
- Container stack → Angular container: runs
- Container stack → Node container: runs
- Container stack → MongoDB: runs
