# ramesh330/address-book-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/ramesh330/address-book-management-system
- Repository: https://github.com/ramesh330/address-book-management-system

## Overview

This is a console-based C address book. The user chooses an operation in the main menu; the program loads contacts into an in-memory AddressBook, performs contact operations, and can save the data to CSV. The documented capabilities also include searching, editing, deleting, sorted display, validation, and loading animations. The excerpts show menu dispatch, parts of editing and validation, and CSV saving; some internal calls and loading details are documented but not fully excerpted, so those links use the README or main.c documentation as evidence.

Main entry points: [`main.c`](https://github.com/ramesh330/address-book-management-system/blob/main/main.c) (Menu dispatcher), [`contact.h`](https://github.com/ramesh330/address-book-management-system/blob/main/contact.h) (In-memory address book), [`contact.c`](https://github.com/ramesh330/address-book-management-system/blob/main/contact.c) (Edit contact), [`contacts.csv`](https://github.com/ramesh330/address-book-management-system/blob/main/contacts.csv) (Contacts CSV)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Console interface"]
  node_menu["Menu dispatcher<br/>[main.c]"]
  node_animations["Loading animations<br/>[contact.c]"]
end

subgraph group_contacts["Contact management"]
  node_addressbook["In-memory address book<br/>[contact.h]"]
  node_add["Add contact<br/>[contact.c]"]
  node_search["Search contacts<br/>[contact.c]"]
  node_edit["Edit contact<br/>[contact.c]"]
  node_delete["Delete contact<br/>[contact.c]"]
  node_display["Display contacts<br/>[contact.c]"]
  node_sorting["Contact sorting<br/>[contact.c]"]
  node_validation["Input validation<br/>[contact.c]"]
end

subgraph group_persistence["Contact storage"]
  node_load["Load contacts<br/>[contact.c]"]
  node_save["Save contacts<br/>[contact.c]"]
  node_csv[("Contacts CSV<br/>[contacts.csv]")]
end

node_user(("User"))

node_user -->|"chooses operation"| node_menu
node_menu -->|"loads at startup"| node_load
node_menu -->|"dispatches add"| node_add
node_menu -->|"dispatches search"| node_search
node_menu -->|"dispatches edit"| node_edit
node_menu -->|"dispatches delete"| node_delete
node_menu -->|"dispatches display"| node_display
node_menu -->|"dispatches save"| node_save
node_add -->|"updates records"| node_addressbook
node_search -->|"searches records"| node_addressbook
node_edit -->|"finds contact"| node_search
node_edit -->|"updates fields"| node_addressbook
node_delete -->|"removes record"| node_addressbook
node_display -->|"lists records"| node_addressbook
node_display -->|"sorts by field"| node_sorting
node_add -->|"validates input"| node_validation
node_edit -->|"validates edits"| node_validation
node_load -->|"reads records"| node_csv
node_load -->|"fills records"| node_addressbook
node_save -->|"writes records"| node_csv
node_save -.->|"shows progress"| node_animations

click node_menu "https://github.com/ramesh330/address-book-management-system/blob/main/main.c"
click node_addressbook "https://github.com/ramesh330/address-book-management-system/blob/main/contact.h"
click node_add "https://github.com/ramesh330/address-book-management-system/blob/main/contact.c"
click node_search "https://github.com/ramesh330/address-book-management-system/blob/main/contact.c"
click node_edit "https://github.com/ramesh330/address-book-management-system/blob/main/contact.c"
click node_delete "https://github.com/ramesh330/address-book-management-system/blob/main/contact.c"
click node_display "https://github.com/ramesh330/address-book-management-system/blob/main/contact.c"
click node_sorting "https://github.com/ramesh330/address-book-management-system/blob/main/contact.c"
click node_validation "https://github.com/ramesh330/address-book-management-system/blob/main/contact.c"
click node_animations "https://github.com/ramesh330/address-book-management-system/blob/main/contact.c"
click node_load "https://github.com/ramesh330/address-book-management-system/blob/main/contact.c"
click node_save "https://github.com/ramesh330/address-book-management-system/blob/main/contact.c"
click node_csv "https://github.com/ramesh330/address-book-management-system/blob/main/contacts.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_animations,node_user toneBlue
class node_addressbook,node_add,node_search,node_edit,node_delete,node_display,node_sorting,node_validation toneAmber
class node_load,node_save,node_csv toneMint
```

## Components

### Console interface

- [Menu dispatcher](https://github.com/ramesh330/address-book-management-system/blob/main/main.c): `main.c`
- [Loading animations](https://github.com/ramesh330/address-book-management-system/blob/main/contact.c): `contact.c`

### Contact management

- [In-memory address book](https://github.com/ramesh330/address-book-management-system/blob/main/contact.h): `contact.h`
- [Add contact](https://github.com/ramesh330/address-book-management-system/blob/main/contact.c): `contact.c`
- [Search contacts](https://github.com/ramesh330/address-book-management-system/blob/main/contact.c): `contact.c`
- [Edit contact](https://github.com/ramesh330/address-book-management-system/blob/main/contact.c): `contact.c`
- [Delete contact](https://github.com/ramesh330/address-book-management-system/blob/main/contact.c): `contact.c`
- [Display contacts](https://github.com/ramesh330/address-book-management-system/blob/main/contact.c): `contact.c`
- [Contact sorting](https://github.com/ramesh330/address-book-management-system/blob/main/contact.c): `contact.c`
- [Input validation](https://github.com/ramesh330/address-book-management-system/blob/main/contact.c): `contact.c`

### Contact storage

- [Load contacts](https://github.com/ramesh330/address-book-management-system/blob/main/contact.c): `contact.c`
- [Save contacts](https://github.com/ramesh330/address-book-management-system/blob/main/contact.c): `contact.c`
- [Contacts CSV](https://github.com/ramesh330/address-book-management-system/blob/main/contacts.csv): `contacts.csv`

### Other components

- **User**

## Connections

- User → Menu dispatcher: chooses operation (evidence: `main.c`)
- Menu dispatcher → Load contacts: loads at startup (evidence: `main.c`)
- Menu dispatcher → Add contact: dispatches add (evidence: `main.c`)
- Menu dispatcher → Search contacts: dispatches search (evidence: `main.c`)
- Menu dispatcher → Edit contact: dispatches edit (evidence: `main.c`)
- Menu dispatcher → Delete contact: dispatches delete (evidence: `main.c`)
- Menu dispatcher → Display contacts: dispatches display (evidence: `main.c`)
- Menu dispatcher → Save contacts: dispatches save (evidence: `main.c`)
- Add contact → In-memory address book: updates records (evidence: `contact.c`)
- Search contacts → In-memory address book: searches records (evidence: `README.md`)
- Edit contact → Search contacts: finds contact (evidence: `contact.c`)
- Edit contact → In-memory address book: updates fields (evidence: `contact.c`)
- Delete contact → In-memory address book: removes record (evidence: `contact.c`)
- Display contacts → In-memory address book: lists records (evidence: `README.md`)
- Display contacts → Contact sorting: sorts by field (evidence: `README.md`)
- Add contact → Input validation: validates input (evidence: `contact.c`)
- Edit contact → Input validation: validates edits (evidence: `contact.c`)
- Load contacts → Contacts CSV: reads records
- Load contacts → In-memory address book: fills records (evidence: `contact.c`)
- Save contacts → Contacts CSV: writes records (evidence: `contact.c`)
- Save contacts → Loading animations: shows progress (evidence: `contact.c`)
