Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“’ Address Book Application

A terminal-based Address Book Management System written in pure C with file persistence, modular programming, contact validation, and interactive CLI menus.

Language Platform Build Storage License


πŸ“Œ What is this Project?

The Address Book Application is a menu-driven terminal application developed using the C programming language.

It allows users to:

  • Create contacts
  • Search contacts
  • Edit contact details
  • Delete contacts
  • List all contacts
  • Save contacts permanently using CSV file handling

The application demonstrates core system programming concepts such as:

  • Structures
  • File handling
  • Modular programming
  • Input validation
  • String handling
  • Dynamic menu systems

πŸ—‚οΈ Project Structure

AddressBook-Application/
β”œβ”€β”€ main.c          # Main menu system and navigation
β”œβ”€β”€ contact.c       # Contact operations and validation logic
β”œβ”€β”€ contact.h       # Structures, constants, function declarations
β”œβ”€β”€ file.c          # File save/load operations
β”œβ”€β”€ file.h          # File handling declarations
β”œβ”€β”€ populate.c      # Dummy contact population
β”œβ”€β”€ populate.h      # Populate function declaration
β”œβ”€β”€ Makefile        # Build automation
β”œβ”€β”€ contact.csv     # Persistent contact storage
β”œβ”€β”€ .gitignore      # Git ignored files
└── README.md       # Project documentation

βš™οΈ Features

Contact Management

  • Add new contacts
  • Edit existing contacts
  • Delete contacts
  • Search contacts

Search Modes

Search contacts using:

  • Name
  • Phone Number
  • Email Address

Validation System

The application validates:

  • Empty input
  • Invalid names
  • Invalid phone numbers
  • Invalid email addresses
  • Duplicate phone numbers
  • Duplicate emails

File Persistence

Contacts are automatically stored using CSV file handling.

Even after closing the application, contact data remains saved.

Example:

John Doe,9876543210,john@gmail.com
Alice Smith,9123456780,alice@gmail.com

πŸ–₯️ Terminal UI

The project uses ANSI escape sequences for:

  • Colored menus
  • Better readability
  • Highlighted errors
  • Success messages
  • Structured terminal tables

Example:

==================================================
                ADDRESS BOOK SYSTEM
==================================================

1. Create Contact
2. List Contacts
3. Search Contact
4. Edit Contact
5. Delete Contact
6. Save Contacts
7. Exit

πŸ”„ Application Flow

Start Program
      ↓
Load Contacts From CSV
      ↓
Display Main Menu
      ↓
User Selects Operation
      ↓
Perform Validation
      ↓
Execute Contact Operation
      ↓
Auto Save to CSV
      ↓
Return to Menu

πŸš€ Getting Started

Prerequisites

  • GCC Compiler
  • Linux / Unix Environment
  • Terminal with ANSI color support

βš’οΈ Build Project

Using Makefile

make

Manual Compilation

gcc main.c contact.c file.c populate.c -Wall -Wextra -Werror -std=c11 -o addressbook

▢️ Run the Application

Linux / Mac

./addressbook

Windows

addressbook.exe

🧹 Clean Build Files

make clean

πŸ” Rebuild Project

make rebuild

πŸ“‹ Core Concepts Demonstrated

Concept Usage
Structures Contact data management
File Handling CSV storage
String Functions Search and validation
Arrays Contact storage
Modular Programming Separate source modules
ANSI Escape Codes Colored terminal UI
Input Validation User safety checks
Makefile Build automation

πŸ“‚ Contact Structure

typedef struct
{
    char name[50];
    char phone[20];
    char email[50];
} Contact;

πŸ” Search Functionality

The application supports:

  • Partial name matching
  • Exact phone matching
  • Email-based lookup

Example:

Search by Name β†’ "John"
Matches:
- John Doe
- Johnson Mark

⚠️ Limitations

  • Fixed maximum contacts (MAX_CONTACTS = 100)
  • Terminal-only interface
  • CSV storage only
  • Single-user application

πŸš€ Future Improvements

  • Contact sorting
  • Password protection
  • Binary file storage
  • Case-insensitive search
  • Import/export support
  • Contact categories
  • GUI version
  • Dynamic memory allocation

πŸ‘¨β€πŸ’» Author

Santhosh Pandian SG
Embedded Systems Engineer | Emertxe ECEP Trainee

LinkedIn GitHub


πŸ“„ License

This project is licensed under the MIT License.

About

Terminal-based Address Book Application in C with file handling, modular programming, contact management, validation, and persistent CSV storage.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages