# marianapellecchia/contactease architecture

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

- Interactive diagram: https://gitdiagram.com/marianapellecchia/contactease
- Repository: https://github.com/marianapellecchia/contactease

## Overview

ContactEase is a terminal contact manager. The user starts in the CLI menu, selects CRUD, search, display, or save operations; the UI delegates contact operations to the in-memory address book, which validates records and uses JSON storage for loading and saving. The README documents the menu capabilities and unsaved-change warning. The excerpts establish the main call paths; menu branches beyond the sampled UI excerpt are represented at the documented capability level.

Main entry points: [`src/rubrica_contatti/ui.py`](https://github.com/marianapellecchia/contactease/blob/main/src/rubrica_contatti/ui.py) (Interactive menu), [`src/rubrica_contatti/rubrica.py`](https://github.com/marianapellecchia/contactease/blob/main/src/rubrica_contatti/rubrica.py) (Address book), [`src/rubrica_contatti/storage.py`](https://github.com/marianapellecchia/contactease/blob/main/src/rubrica_contatti/storage.py) (JSON file), [`src/rubrica_contatti/contatto.py`](https://github.com/marianapellecchia/contactease/blob/main/src/rubrica_contatti/contatto.py) (Contact model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI entry"]
  node_launcher["Program entry<br/>[__main__.py]"]
  node_menu["Interactive menu<br/>[ui.py]"]
end

subgraph group_domain["Contact domain"]
  node_contact["Contact model<br/>[contatto.py]"]
  node_addressbook["Address book<br/>[rubrica.py]"]
end

subgraph group_persistence["Persistence"]
  node_jsonfile[("JSON file<br/>[storage.py]")]
end

node_user(("Terminal user"))

node_user -->|"chooses operations"| node_menu
node_launcher -->|"starts menu"| node_menu
node_menu -->|"delegates CRUD/search"| node_addressbook
node_menu -->|"uses model"| node_contact
node_addressbook -->|"validates records"| node_contact
node_addressbook -->|"loads and saves"| node_jsonfile
node_jsonfile -->|"returns stored data"| node_addressbook

click node_launcher "https://github.com/marianapellecchia/contactease/blob/main/src/rubrica_contatti/__main__.py"
click node_menu "https://github.com/marianapellecchia/contactease/blob/main/src/rubrica_contatti/ui.py"
click node_contact "https://github.com/marianapellecchia/contactease/blob/main/src/rubrica_contatti/contatto.py"
click node_addressbook "https://github.com/marianapellecchia/contactease/blob/main/src/rubrica_contatti/rubrica.py"
click node_jsonfile "https://github.com/marianapellecchia/contactease/blob/main/src/rubrica_contatti/storage.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_launcher,node_menu,node_user toneBlue
class node_contact,node_addressbook toneAmber
class node_jsonfile toneMint
```

## Components

### CLI entry

- [Program entry](https://github.com/marianapellecchia/contactease/blob/main/src/rubrica_contatti/__main__.py): `src/rubrica_contatti/__main__.py`
- [Interactive menu](https://github.com/marianapellecchia/contactease/blob/main/src/rubrica_contatti/ui.py): `src/rubrica_contatti/ui.py`

### Contact domain

- [Contact model](https://github.com/marianapellecchia/contactease/blob/main/src/rubrica_contatti/contatto.py): `src/rubrica_contatti/contatto.py`
- [Address book](https://github.com/marianapellecchia/contactease/blob/main/src/rubrica_contatti/rubrica.py): `src/rubrica_contatti/rubrica.py`

### Persistence

- [JSON file](https://github.com/marianapellecchia/contactease/blob/main/src/rubrica_contatti/storage.py): `src/rubrica_contatti/storage.py`

### Other components

- **Terminal user**

## Connections

- Terminal user → Interactive menu: chooses operations (evidence: `README.md`)
- Program entry → Interactive menu: starts menu (evidence: `src/rubrica_contatti/__main__.py`)
- Interactive menu → Address book: delegates CRUD/search (evidence: `src/rubrica_contatti/ui.py`)
- Interactive menu → Contact model: uses model (evidence: `src/rubrica_contatti/ui.py`)
- Address book → Contact model: validates records (evidence: `src/rubrica_contatti/rubrica.py`)
- Address book → JSON file: loads and saves (evidence: `src/rubrica_contatti/rubrica.py`)
- JSON file → Address book: returns stored data (evidence: `src/rubrica_contatti/rubrica.py`)
