# chillinmalware/mini_project architecture

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

- Interactive diagram: https://gitdiagram.com/chillinmalware/mini_project
- Repository: https://github.com/chillinmalware/mini_project

## Overview

ASEAN Phonebook is a console application for managing student and partner contacts. The principal workflow reads a versioned command stream, parses and dispatches each command, validates contact data, then queries or changes a manually maintained, surname/name/ID-sorted linked list and prints results. The graph also captures the contact model and shared country/update-field definitions. Source excerpts show the command dispatcher and core list operations; links to those modules are cited where their calls or dependencies are visible.

Main entry points: [`main.py`](https://github.com/chillinmalware/mini_project/blob/main/main.py) (Command parser), [`phonebook.py`](https://github.com/chillinmalware/mini_project/blob/main/phonebook.py) (Sorted linked list), [`constants.py`](https://github.com/chillinmalware/mini_project/blob/main/constants.py) (Shared definitions), [`contact.py`](https://github.com/chillinmalware/mini_project/blob/main/contact.py) (Contact model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Command interface"]
  node_entry["Program entry<br/>[main.py]"]
  node_parser["Command parser<br/>[main.py]"]
  node_output(("Console output"))
end

subgraph group_domain["Contact domain"]
  node_contact["Contact model<br/>[contact.py]"]
  node_validation["Contact validation<br/>[contact.py]"]
  node_definitions["Shared definitions<br/>[constants.py]"]
end

subgraph group_management["Phonebook management"]
  node_phonebook[("Sorted linked list<br/>[phonebook.py]")]
end

node_user(("Console user"))

node_user -->|"provides input"| node_entry
node_entry -->|"processes commands"| node_parser
node_entry -->|"prints results"| node_output
node_parser -->|"dispatches operations"| node_phonebook
node_parser -->|"creates contacts"| node_contact
node_parser -->|"validates additions"| node_validation
node_parser -->|"checks country codes"| node_definitions
node_phonebook -->|"uses contact data"| node_contact
node_phonebook -->|"validates updates"| node_validation
node_phonebook -->|"checks update fields"| node_definitions
node_validation -->|"checks country codes"| node_definitions
node_contact -->|"formats country name"| node_definitions

click node_entry "https://github.com/chillinmalware/mini_project/blob/main/main.py"
click node_parser "https://github.com/chillinmalware/mini_project/blob/main/main.py"
click node_contact "https://github.com/chillinmalware/mini_project/blob/main/contact.py"
click node_validation "https://github.com/chillinmalware/mini_project/blob/main/contact.py"
click node_definitions "https://github.com/chillinmalware/mini_project/blob/main/constants.py"
click node_phonebook "https://github.com/chillinmalware/mini_project/blob/main/phonebook.py"

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_entry,node_parser,node_output,node_user toneBlue
class node_contact,node_validation,node_definitions toneAmber
class node_phonebook toneMint
```

## Components

### Command interface

- [Program entry](https://github.com/chillinmalware/mini_project/blob/main/main.py): `main.py`
- [Command parser](https://github.com/chillinmalware/mini_project/blob/main/main.py): `main.py`
- **Console output**

### Contact domain

- [Contact model](https://github.com/chillinmalware/mini_project/blob/main/contact.py): `contact.py`
- [Contact validation](https://github.com/chillinmalware/mini_project/blob/main/contact.py): `contact.py`
- [Shared definitions](https://github.com/chillinmalware/mini_project/blob/main/constants.py): `constants.py`

### Phonebook management

- [Sorted linked list](https://github.com/chillinmalware/mini_project/blob/main/phonebook.py): `phonebook.py`

### Other components

- **Console user**

## Connections

- Console user → Program entry: provides input (evidence: `README.md`)
- Program entry → Command parser: processes commands (evidence: `main.py`)
- Program entry → Console output: prints results (evidence: `main.py`)
- Command parser → Sorted linked list: dispatches operations (evidence: `main.py`)
- Command parser → Contact model: creates contacts (evidence: `main.py`)
- Command parser → Contact validation: validates additions (evidence: `main.py`)
- Command parser → Shared definitions: checks country codes (evidence: `main.py`)
- Sorted linked list → Contact model: uses contact data (evidence: `phonebook.py`)
- Sorted linked list → Contact validation: validates updates (evidence: `phonebook.py`)
- Sorted linked list → Shared definitions: checks update fields (evidence: `phonebook.py`)
- Contact validation → Shared definitions: checks country codes (evidence: `contact.py`)
- Contact model → Shared definitions: formats country name (evidence: `contact.py`)
