# kenziiken/encarguez-sia architecture

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

- Interactive diagram: https://gitdiagram.com/kenziiken/encarguez-sia
- Repository: https://github.com/kenziiken/encarguez-sia

## Overview

This repository contains two small Express examples: a basic read-only endpoint and a practice JSON API. The main workflow is an HTTP request reaching a route, which reads or updates in-memory records and returns JSON. The examples run on different ports and keep independent data. The graph reflects the sampled JavaScript; other files are not mapped because their runtime roles are unclear from the available evidence.

Main entry points: [`api_prac.js`](https://github.com/kenziiken/encarguez-sia/blob/main/api_prac.js) (API routes), [`index.js`](https://github.com/kenziiken/encarguez-sia/blob/main/index.js) (Root data route)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_basic["Basic server"]
  node_basic_server["Basic server<br/>[index.js]"]
  node_basic_route["Root data route<br/>[index.js]"]
  node_basic_data[("People data<br/>[index.js]")]
end

subgraph group_api["Practice API"]
  node_api_server["API server<br/>[api_prac.js]"]
  node_json_parser["JSON body parser<br/>[api_prac.js]"]
  node_api_routes["API routes<br/>[api_prac.js]"]
  node_api_data[("People data<br/>[api_prac.js]")]
end

node_client(("HTTP client"))

node_client -->|"requests :2607"| node_basic_server
node_basic_server -->|"dispatches"| node_basic_route
node_basic_route -->|"reads"| node_basic_data
node_basic_route -->|"sends data"| node_client
node_client -->|"requests :2107"| node_api_server
node_api_server -->|"uses middleware"| node_json_parser
node_api_server -->|"dispatches"| node_api_routes
node_api_routes -->|"reads"| node_api_data
node_api_routes -->|"adds record"| node_api_data
node_api_routes -->|"returns JSON"| node_client

click node_basic_server "https://github.com/kenziiken/encarguez-sia/blob/main/index.js"
click node_basic_route "https://github.com/kenziiken/encarguez-sia/blob/main/index.js"
click node_basic_data "https://github.com/kenziiken/encarguez-sia/blob/main/index.js"
click node_api_server "https://github.com/kenziiken/encarguez-sia/blob/main/api_prac.js"
click node_json_parser "https://github.com/kenziiken/encarguez-sia/blob/main/api_prac.js"
click node_api_routes "https://github.com/kenziiken/encarguez-sia/blob/main/api_prac.js"
click node_api_data "https://github.com/kenziiken/encarguez-sia/blob/main/api_prac.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_basic_server,node_basic_route,node_basic_data,node_client toneBlue
class node_api_server,node_json_parser,node_api_routes,node_api_data toneAmber
```

## Components

### Basic server

- [Basic server](https://github.com/kenziiken/encarguez-sia/blob/main/index.js): `index.js`
- [Root data route](https://github.com/kenziiken/encarguez-sia/blob/main/index.js): `index.js`
- [People data](https://github.com/kenziiken/encarguez-sia/blob/main/index.js): `index.js`

### Practice API

- [API server](https://github.com/kenziiken/encarguez-sia/blob/main/api_prac.js): `api_prac.js`
- [JSON body parser](https://github.com/kenziiken/encarguez-sia/blob/main/api_prac.js): `api_prac.js`
- [API routes](https://github.com/kenziiken/encarguez-sia/blob/main/api_prac.js): `api_prac.js`
- [People data](https://github.com/kenziiken/encarguez-sia/blob/main/api_prac.js): `api_prac.js`

### Other components

- **HTTP client**

## Connections

- HTTP client → Basic server: requests :2607
- Basic server → Root data route: dispatches
- Root data route → People data: reads
- Root data route → HTTP client: sends data
- HTTP client → API server: requests :2107
- API server → JSON body parser: uses middleware
- API server → API routes: dispatches
- API routes → People data: reads
- API routes → People data: adds record
- API routes → HTTP client: returns JSON
