How cheung4843/todo-app works
Project type and purpose
• This is a small, standalone, full-stack (single-process) command-line application written in modern C++20.
• Purpose: Manage a todo list via CLI. Supports add, list, mark, delete. Unit-tested with Catch2. Cross-platform build via CMake. CI/CD via GitHub Actions.
File structure
• Top-level:
• CMakeLists.txt + build scripts (build.sh, build.bat, build.py): build layer
• src/ : implementation (.cpp)
• / : public headers (.hpp)
• tests/ : Catch2-based unit tests
• docs/ : UML and documentation
• .github/workflows/: CI/CD YAML
• Pattern: simple layered architecture with clear separation of CLI, core domain (TodoList, TodoItem), and test harness.
README insights
• Confirms CMake, cross-platform support, Catch2 testing, GitHub Actions pipelines.
• Points to docs/todo_app_uml.md for an existing class-level UML.
Components
a. Main components
• CLI Module (main.cpp): parses commands, calls domain API
• Domain Layer: TodoList manager (todo_list.cpp/hpp) & TodoItem model (todo_item.hpp)
• Persistence (in-memory / future file store)
• Test Harness (Catch2 in tests/)
• Build System (CMake + build scripts)
• CI/CD (GitHub Actions workflows)
b. Relationships & interactions
• CLI → Domain Layer: “invoke add/mark/delete/list”
• Domain Layer → Persistence: “store/retrieve tasks” (currently in memory)
• Test Harness → Domain Layer: “unit tests exercising public API”
• Build Scripts → CMake → Compiler/Linker → Produced binaries
• CI/CD → invokes build & test workflows on GitHub
c. Architectural patterns & principles
• Layered architecture: CLI / Domain / Infrastructure / Tests
• Single-responsibility: each class/file has one role
• Modularization via clear include/ src split
d. Key technologies
• C++20, CMake, Catch2, GitHub Actions