# kondurumanogna/project1 architecture

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

- Interactive diagram: https://gitdiagram.com/kondurumanogna/project1
- Repository: https://github.com/kondurumanogna/project1

## Overview

This is a console address book. A user selects menu operations in `main.c`; contacts are created, searched, edited, deleted, or listed in the in-memory address book, and can be saved as CSV. Contact validation, matching, and sorting are internal domain behavior. The persistence code also has a CSV loader, but the shown initialization leaves loading disabled, so no startup-load path is drawn. Source excerpts support the main operation and persistence links; unsampled implementation details are not inferred.

Main entry points: [`contact.c`](https://github.com/kondurumanogna/project1/blob/main/contact.c) (Contact operations), [`main.c`](https://github.com/kondurumanogna/project1/blob/main/main.c) (Menu loop), [`file.c`](https://github.com/kondurumanogna/project1/blob/main/file.c) (CSV file operations), [`contact.h`](https://github.com/kondurumanogna/project1/blob/main/contact.h) (Address book state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Console interface"]
  node_menu["Menu loop<br/>[main.c]"]
end

subgraph group_domain["Contact domain"]
  node_addressbook["Address book state<br/>[contact.h]"]
  node_contact_ops["Contact operations<br/>[contact.c]"]
  node_field_input["Field input checks<br/>[contact.c]"]
  node_search_match["Contact matching<br/>[contact.c]"]
  node_sort_contacts["Contact sorting<br/>[contact.c]"]
end

subgraph group_persistence["CSV persistence"]
  node_file_io["CSV file operations<br/>[file.c]"]
  node_saved_csv[("Saved contacts CSV<br/>[contacts.csv]")]
  node_loaded_csv[("Load contacts CSV<br/>[contact.csv]")]
end

node_user(("Address book user"))

node_user -->|"chooses operation"| node_menu
node_menu -->|"initializes"| node_addressbook
node_menu -->|"dispatches CRUD/list"| node_contact_ops
node_contact_ops -->|"updates or reads"| node_addressbook
node_contact_ops -->|"reads fields"| node_field_input
node_contact_ops -->|"matches contacts"| node_search_match
node_contact_ops -->|"sorts contacts"| node_sort_contacts
node_menu -->|"saves contacts"| node_file_io
node_file_io -->|"writes"| node_saved_csv
node_file_io -->|"reads"| node_loaded_csv

click node_menu "https://github.com/kondurumanogna/project1/blob/main/main.c"
click node_addressbook "https://github.com/kondurumanogna/project1/blob/main/contact.h"
click node_contact_ops "https://github.com/kondurumanogna/project1/blob/main/contact.c"
click node_field_input "https://github.com/kondurumanogna/project1/blob/main/contact.c"
click node_search_match "https://github.com/kondurumanogna/project1/blob/main/contact.c"
click node_sort_contacts "https://github.com/kondurumanogna/project1/blob/main/contact.c"
click node_file_io "https://github.com/kondurumanogna/project1/blob/main/file.c"
click node_saved_csv "https://github.com/kondurumanogna/project1/blob/main/contacts.csv"
click node_loaded_csv "https://github.com/kondurumanogna/project1/blob/main/contact.csv"

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_menu,node_user toneBlue
class node_addressbook,node_contact_ops,node_field_input,node_search_match,node_sort_contacts toneAmber
class node_file_io,node_saved_csv,node_loaded_csv toneMint
```

## Components

### Console interface

- [Menu loop](https://github.com/kondurumanogna/project1/blob/main/main.c): `main.c`

### Contact domain

- [Address book state](https://github.com/kondurumanogna/project1/blob/main/contact.h): `contact.h`
- [Contact operations](https://github.com/kondurumanogna/project1/blob/main/contact.c): `contact.c`
- [Field input checks](https://github.com/kondurumanogna/project1/blob/main/contact.c): `contact.c`
- [Contact matching](https://github.com/kondurumanogna/project1/blob/main/contact.c): `contact.c`
- [Contact sorting](https://github.com/kondurumanogna/project1/blob/main/contact.c): `contact.c`

### CSV persistence

- [CSV file operations](https://github.com/kondurumanogna/project1/blob/main/file.c): `file.c`
- [Saved contacts CSV](https://github.com/kondurumanogna/project1/blob/main/contacts.csv): `contacts.csv`
- [Load contacts CSV](https://github.com/kondurumanogna/project1/blob/main/contact.csv): `contact.csv`

### Other components

- **Address book user**

## Connections

- Address book user → Menu loop: chooses operation (evidence: `main.c`)
- Menu loop → Address book state: initializes (evidence: `main.c`)
- Menu loop → Contact operations: dispatches CRUD/list (evidence: `main.c`)
- Contact operations → Address book state: updates or reads (evidence: `contact.c`)
- Contact operations → Field input checks: reads fields (evidence: `contact.c`)
- Contact operations → Contact matching: matches contacts (evidence: `contact.c`)
- Contact operations → Contact sorting: sorts contacts (evidence: `contact.c`)
- Menu loop → CSV file operations: saves contacts (evidence: `main.c`)
- CSV file operations → Saved contacts CSV: writes (evidence: `file.c`)
- CSV file operations → Load contacts CSV: reads (evidence: `file.c`)
