# vivinantony/simplecrudusingmean architecture

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

- Interactive diagram: https://gitdiagram.com/vivinantony/simplecrudusingmean
- Repository: https://github.com/vivinantony/simplecrudusingmean

## Overview

This is a small MEAN-stack user CRUD app. A user interacts with the Angular client, which lists, creates, reads, updates, and deletes users through Express `/api` routes; the server uses Mongoose to persist user records in MongoDB. The source shows the client requests, route handlers, model operations, and static hosting. The HTML shell is present in the tree but was not excerpted, so its detailed UI behavior is not represented.

Main entry points: [`server.js`](https://github.com/vivinantony/simplecrudusingmean/blob/master/server.js) (CRUD routes), [`app/index.html`](https://github.com/vivinantony/simplecrudusingmean/blob/master/app/index.html) (App shell), [`app/app.js`](https://github.com/vivinantony/simplecrudusingmean/blob/master/app/app.js) (Angular controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser client"]
  node_html["App shell<br/>[index.html]"]
  node_angular["Angular controller<br/>[app.js]"]
end

subgraph group_server["Express API"]
  node_express["Express server<br/>[server.js]"]
  node_crud["CRUD routes<br/>[server.js]"]
end

subgraph group_data["Persistence"]
  node_model["User model<br/>[server.js]"]
  node_mongo[("MongoDB")]
end

node_user(("User"))

node_user -->|"uses"| node_html
node_express -->|"serves static"| node_html
node_html -.->|"loads controller"| node_angular
node_angular -->|"requests CRUD"| node_crud
node_crud -->|"returns data"| node_angular
node_express -->|"registers routes"| node_crud
node_crud -->|"queries and saves"| node_model
node_model -->|"reads and writes"| node_mongo

click node_html "https://github.com/vivinantony/simplecrudusingmean/blob/master/app/index.html"
click node_angular "https://github.com/vivinantony/simplecrudusingmean/blob/master/app/app.js"
click node_express "https://github.com/vivinantony/simplecrudusingmean/blob/master/server.js"
click node_crud "https://github.com/vivinantony/simplecrudusingmean/blob/master/server.js"
click node_model "https://github.com/vivinantony/simplecrudusingmean/blob/master/server.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_html,node_angular,node_user toneBlue
class node_express,node_crud toneAmber
class node_model,node_mongo toneMint
```

## Components

### Browser client

- [App shell](https://github.com/vivinantony/simplecrudusingmean/blob/master/app/index.html): `app/index.html`
- [Angular controller](https://github.com/vivinantony/simplecrudusingmean/blob/master/app/app.js): `app/app.js`

### Express API

- [Express server](https://github.com/vivinantony/simplecrudusingmean/blob/master/server.js): `server.js`
- [CRUD routes](https://github.com/vivinantony/simplecrudusingmean/blob/master/server.js): `server.js`

### Persistence

- [User model](https://github.com/vivinantony/simplecrudusingmean/blob/master/server.js): `server.js`
- **MongoDB**

### Other components

- **User**

## Connections

- User → App shell: uses
- Express server → App shell: serves static (evidence: `server.js`)
- App shell → Angular controller: loads controller
- Angular controller → CRUD routes: requests CRUD (evidence: `app/app.js`)
- CRUD routes → Angular controller: returns data (evidence: `server.js`)
- Express server → CRUD routes: registers routes (evidence: `server.js`)
- CRUD routes → User model: queries and saves (evidence: `server.js`)
- User model → MongoDB: reads and writes (evidence: `server.js`)
