A modular C++ based Address Book application designed to start with a Command-Line Interface (CLI). Provides core contact management features—CRUD operations, JSON persistence, search and validation.
- Project Overview
- Features
- Prerequisites
- Getting Started
- Usage Examples
- Project Structure
- Configuration
- Testing
- Contributing
- License
- Acknowledgments
This repository contains a single source file, App.cpp, which implements a console‑based Address Book. It uses a binary‑search tree (BST) for in‑memory contact storage and the nlohmann/json library for JSON persistence. User authentication, input validation, and animated console output are all contained within App.cpp.
- On startup, all profiles and existing contacts are loaded from
addressbook.json(if present). - User Sign Up / Sign In from loaded JSON file
- Add / Update / Delete / Search / View All contacts
- BST‑backed in‑memory data structure
- JSON-based persistence (load on startup, save on exit)
- Validation, duplicate detection, and basic search/filter capabilities
- Animated CLI with clear‑screen and typing effects
- A C++ compiler supporting C++11 or later (e.g.,
g++,clang++, MSVC) - The included nlohmann/json library (in
libs/json)
git clone https://github.com/sumoondev/Address-Book-CLI-CPP.git
cd Address-Book-CLI-CPPg++ -std=c++11 -Ilibs/json/include src/App.cpp -o addressbookcl /EHsc /std:c++17 /I libs\json\include src/App.cpp /Fe:addressbook.exe# On Linux / macOS
./addressbook
# On Windows
addressbook.exeOn first run, choose Sign Up to create an account. On subsequent runs, choose Sign In to load your contacts.
-- Main Page --
=== Address Book CLI by The G's ===
1) Create Profile
2) Login To Profile
3) List Profile
4) Delete Profile
5) Exit
Enter a choice :
-- Sign Up --
=== Create Profile ===
Username : Alice
Password : *****
Re-password : *****
----------------------------------
User created
-- Sign In --
Username: Alice
Password: *****
Login successful! Loading your contacts...
-- After Login --
User : Alice
=== Address Book CLI ===
1) Add Contact
2) List All Contacts
3) Search Contacts
4) Edit Contact
5) Delete Contact
6) Log Out
Enter a choice :
-- Add Contact --
Name : Bob Smith
Mobile : 1234567890
Address : 123 Maple Street
Email : [email protected]
Contact added!
Press Enter to continue…Address-Book-CLI-CPP/ ← Top-level repository
├── README.md ← Overview, usage, and module guide
├── .gitignore ← Files and folders to ignore in Git
├── LICENSE
│── target/ ← Output: compiled objects (`.obj`), etc.
│── src/ ← Contains all the source code
│── libs/ ← Consists all the third party libraries
│── test/
└── addressbook.json ← Default JSON persistence file
- User files: Each account’s data is stored in
addressbook.jsonin the working directory. - To modify storage behavior, edit the JSON handling in
App.cpp.
(No automated tests provided. You may write your own by refactoring into smaller modules.)
Contributions are welcome! Since all functionality resides in App.cpp, please keep changes well commented and minimal:
- Fork the repository
- Create a feature branch
- Make and test your changes
- Submit a Pull Request
This module is distributed under the Apache License.
This project uses the nlohmann/json library for JSON handling, which is licensed under the MIT License. The original copyright notice is included in the libs/json directory.
— Built by The G's | © 2025