# genotr/tugas-kelompok-simple-manual-database-app-c architecture

> Architecture diagram of the GitHub repository genotr/tugas-kelompok-simple-manual-database-app-c, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/genotr/tugas-kelompok-simple-manual-database-app-c
- Repository: https://github.com/genotr/tugas-kelompok-simple-manual-database-app-c

## Overview

A command-line student-record database: the user starts the program with a CSV file, loads and sorts its records, then enters commands to add or search; quitting rewrites the sorted data. The README also documents help and case-insensitive substring search. Database operations and CSV persistence share an implementation file, so their separate nodes represent responsibilities, not separate modules. Edges are limited to calls or file operations visible in the excerpts; no external service or unsampled subsystem is inferred.

Main entry points: [`database.c`](https://github.com/genotr/tugas-kelompok-simple-manual-database-app-c/blob/main/database.c) (In-memory records), [`command.c`](https://github.com/genotr/tugas-kelompok-simple-manual-database-app-c/blob/main/command.c) (Command handlers), [`2501020090.c`](https://github.com/genotr/tugas-kelompok-simple-manual-database-app-c/blob/main/2501020090.c) (Program entry), [`search.c`](https://github.com/genotr/tugas-kelompok-simple-manual-database-app-c/blob/main/search.c) (Substring search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application runtime"]
  node_launcher["Program entry<br/>[2501020090.c]"]
  node_command_loop["Command loop<br/>[command.c]"]
  node_command_handlers["Command handlers<br/>[command.c]"]
end

subgraph group_records["Records and persistence"]
  node_record_store["In-memory records<br/>[database.c]"]
  node_csv_file[("CSV file")]
end

subgraph group_search["Search"]
  node_search_engine["Substring search<br/>[search.c]"]
end

node_user(("CLI user"))

node_user -->|"enters commands"| node_command_loop
node_launcher -->|"loads and sorts"| node_record_store
node_launcher -->|"starts loop"| node_command_loop
node_command_loop -->|"dispatches commands"| node_command_handlers
node_command_handlers -->|"adds records"| node_record_store
node_command_handlers -->|"searches records"| node_search_engine
node_search_engine -->|"reads records"| node_record_store
node_record_store -->|"loads and appends"| node_csv_file
node_record_store -->|"rewrites on exit"| node_csv_file

click node_launcher "https://github.com/genotr/tugas-kelompok-simple-manual-database-app-c/blob/main/2501020090.c"
click node_command_loop "https://github.com/genotr/tugas-kelompok-simple-manual-database-app-c/blob/main/command.c"
click node_command_handlers "https://github.com/genotr/tugas-kelompok-simple-manual-database-app-c/blob/main/command.c"
click node_record_store "https://github.com/genotr/tugas-kelompok-simple-manual-database-app-c/blob/main/database.c"
click node_search_engine "https://github.com/genotr/tugas-kelompok-simple-manual-database-app-c/blob/main/search.c"

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_launcher,node_command_loop,node_command_handlers,node_user toneBlue
class node_record_store,node_csv_file toneAmber
class node_search_engine toneMint
```

## Components

### Application runtime

- [Program entry](https://github.com/genotr/tugas-kelompok-simple-manual-database-app-c/blob/main/2501020090.c): `2501020090.c`
- [Command loop](https://github.com/genotr/tugas-kelompok-simple-manual-database-app-c/blob/main/command.c): `command.c`
- [Command handlers](https://github.com/genotr/tugas-kelompok-simple-manual-database-app-c/blob/main/command.c): `command.c`

### Records and persistence

- [In-memory records](https://github.com/genotr/tugas-kelompok-simple-manual-database-app-c/blob/main/database.c): `database.c`
- **CSV file**

### Search

- [Substring search](https://github.com/genotr/tugas-kelompok-simple-manual-database-app-c/blob/main/search.c): `search.c`

### Other components

- **CLI user**

## Connections

- CLI user → Command loop: enters commands (evidence: `command.c`)
- Program entry → In-memory records: loads and sorts (evidence: `2501020090.c`)
- Program entry → Command loop: starts loop (evidence: `2501020090.c`)
- Command loop → Command handlers: dispatches commands (evidence: `command.c`)
- Command handlers → In-memory records: adds records (evidence: `command.c`)
- Command handlers → Substring search: searches records (evidence: `command.c`)
- Substring search → In-memory records: reads records (evidence: `search.c`)
- In-memory records → CSV file: loads and appends (evidence: `database.c`)
- In-memory records → CSV file: rewrites on exit
