Projects that run in the terminal/console, perfect for learning fundamentals.
Difficulty: Beginner Time: 10-15 hours
A command-line todo application with file persistence.
Features:
- Add, remove, edit todos
- Mark as complete/incomplete
- Save/load from file
- List all/completed/pending
- Search todos
- Categories/tags
Key Concepts:
- Class design
- STL containers (vector, string)
- File I/O
- User input handling
- Command parsing
File Structure:
todo_app/
├── src/
│ ├── main.cpp
│ ├── todo.cpp
│ ├── todo.h
│ ├── todo_manager.cpp
│ └── todo_manager.h
├── data/
│ └── todos.txt
└── CMakeLists.txt
Difficulty: Beginner-Intermediate Time: 15-20 hours
Contact management system with search capabilities.
Features:
- Add/remove/edit contacts
- Search by name, phone, email
- Import/export CSV
- Sort by various fields
- Multiple address books
- Backup/restore
Key Concepts:
- OOP design
- STL algorithms
- File parsing (CSV)
- String manipulation
- Search algorithms
File Structure:
address_book/
├── src/
│ ├── main.cpp
│ ├── contact.cpp
│ ├── contact.h
│ ├── address_book.cpp
│ ├── address_book.h
│ ├── csv_handler.cpp
│ └── csv_handler.h
└── data/
└── contacts.csv
Difficulty: Intermediate Time: 25-35 hours
Simple console-based text editor.
Features:
- Open/save files
- Edit text
- Navigation
- Search/replace
- Undo/redo
- Syntax highlighting (basic)
Key Concepts:
- String handling
- Terminal control
- File operations
- Buffer management
- Command pattern
File Structure:
text_editor/
├── src/
│ ├── main.cpp
│ ├── editor.cpp
│ ├── editor.h
│ ├── buffer.cpp
│ ├── buffer.h
│ ├── terminal.cpp
│ └── terminal.h
└── CMakeLists.txt
Difficulty: Intermediate Time: 20-30 hours
Track income, expenses, and generate reports.
Features:
- Add transactions (income/expense)
- Categorize transactions
- Monthly reports
- Budget tracking
- Export to CSV
- Charts/visualization (text-based)
Key Concepts:
- Data models
- Date/time handling
- Statistics
- Report generation
- Data persistence
File Structure:
finance_tracker/
├── src/
│ ├── main.cpp
│ ├── transaction.cpp
│ ├── transaction.h
│ ├── tracker.cpp
│ ├── tracker.h
│ ├── reports.cpp
│ └── reports.h
└── data/
└── transactions.json
Difficulty: Intermediate-Advanced Time: 30-40 hours
Secure password storage with encryption.
Features:
- Store passwords
- Generate random passwords
- Encrypt database
- Search passwords
- Copy to clipboard
- Password strength checker
Key Concepts:
- Cryptography (basic)
- Security best practices
- Secure storage
- String handling
- Clipboard operations
File Structure:
password_manager/
├── src/
│ ├── main.cpp
│ ├── password.cpp
│ ├── password.h
│ ├── vault.cpp
│ ├── vault.h
│ ├── crypto.cpp
│ └── crypto.h
└── data/
└── vault.enc
// cli_app.h
#ifndef CLI_APP_H
#define CLI_APP_H
#include <string>
#include <vector>
class CLIApp {
public:
CLIApp(const std::string& name, const std::string& version);
void run();
private:
void printWelcome();
void printHelp();
void processCommand(const std::string& cmd);
std::string appName_;
std::string version_;
bool running_;
};
#endif // CLI_APP_H// cli_app.cpp
#include "cli_app.h"
#include <iostream>
#include <sstream>
CLIApp::CLIApp(const std::string& name, const std::string& version)
: appName_(name), version_(version), running_(true) {
}
void CLIApp::run() {
printWelcome();
std::string line;
while (running_) {
std::cout << "> ";
std::getline(std::cin, line);
if (!line.empty()) {
processCommand(line);
}
}
}
void CLIApp::printWelcome() {
std::cout << appName_ << " v" << version_ << "\n";
std::cout << "Type 'help' for commands\n\n";
}
void CLIApp::printHelp() {
std::cout << "Available commands:\n";
std::cout << " help - Show this help\n";
std::cout << " version - Show version\n";
std::cout << " exit - Exit application\n";
}
void CLIApp::processCommand(const std::string& cmd) {
std::istringstream iss(cmd);
std::string command;
iss >> command;
if (command == "help") {
printHelp();
} else if (command == "version") {
std::cout << appName_ << " v" << version_ << "\n";
} else if (command == "exit") {
running_ = false;
std::cout << "Goodbye!\n";
} else {
std::cout << "Unknown command: " << command << "\n";
std::cout << "Type 'help' for available commands\n";
}
}// main.cpp
#include "cli_app.h"
int main() {
CLIApp app("MyApp", "1.0.0");
app.run();
return 0;
}// Parse: command [arg1] [arg2] [options]
struct Command {
std::string name;
std::vector<std::string> args;
std::map<std::string, std::string> options;
};
Command parseCommand(const std::string& input);// Use consistent formatting
std::cout << std::left << std::setw(20) << "Name"
<< std::setw(10) << "Value" << "\n";
std::cout << std::string(30, '-') << "\n";// Always validate user input
if (input.empty() || input.size() > MAX_LENGTH) {
std::cerr << "Invalid input\n";
return;
}// Provide helpful error messages
try {
// Operation
} catch (const std::exception& e) {
std::cerr << "Error: " << e.what() << "\n";
}- Test each command handler
- Test validation logic
- Test data operations
- Test command sequences
- Test file operations
- Test error recovery
- Walk through all features
- Test edge cases
- Test with various inputs
cmake_minimum_required(VERSION 3.30)
project(MyCLIApp VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Executable
add_executable(my_cli_app
src/main.cpp
src/cli_app.cpp
)
target_include_directories(my_cli_app
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
)- Choose project - Pick from list above
- Plan features - Define MVP
- Set up project - Create directory structure
- Implement - Build feature by feature
- Test - Verify all functionality
- Document - Write README
- Share - Put on GitHub
Ready to start? Pick a project and begin coding! 🚀