* initial development * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * ci/cd * ci/cd * ci/cd * ci/cd * ci/cd * ci/cd * ci/cd * pokemon * pokemon * pokemon * pokemon * pokemon * pokemon * improvements * improvements * ci/cd * ci/cd * improvements * improvements * improvements * improvements * improvements * improvements * improvements * improvements * improvements --------- Co-authored-by: sdine <sdine@sdine.com>
4.2 KiB
#documentation #onboarding #architecture
Intro For New Developers
This document orients new contributors to Card Collection Manager 3. For local setup and build commands, start with Build Locally Guide; then use this guide to understand architecture boundaries and daily workflows.
Quick Setup: read AGENTS.md files first, build once, run tests once, then make one small layer-scoped change to validate your environment.
Toolchain Snapshot
Card Collection Manager 3 builds as a native C++ desktop binary with CMake. The project standard is C++20, with Clang as the preferred compiler on Windows and Linux, plus a verified MinGW-w64 fallback path on Windows.
- build system: CMake 3.22+ with
FetchContent - language/toolchain: C++20, Clang preferred, MinGW-w64 GCC fallback on Windows
- UI toolkit: wxWidgets (
ui_wx/only) - REST/HTTP client library:
cpr(libcurl-based, used throughIHttpClient/CprHttpClient) - JSON library:
nlohmann/json - test framework:
doctest
Use Build Locally Guide for exact commands, generator options, runtime DLL notes, and troubleshooting details.
Project Shape
Card Collection Manager 3 is a native desktop app written in C++20 with wxWidgets. The architecture is intentionally layered so core logic stays UI-agnostic.
core/: domain logic, services, and infrastructure adaptersui_wx/: wxWidgets UI code onlyapp/: composition root that wires adapters, services, and views
Dependency direction is strict: app -> ui_wx -> core.
Architecture Rules
These rules are the baseline for all feature work:
core/must never include or depend on wxWidgets.- UI code consumes services through
ccm::ui::AppContext. - Concrete adapter wiring belongs in
app/main.cpp. - JSON keys and aliases are contract-sensitive and must stay stable.
Repository Map
core/
core/ contains domain and non-UI behavior:
domain/: value types and enums (MagicCard,PokemonCard,Set,Configuration)ports/: seam interfaces (IHttpClient,IFileSystem, repositories, game seams)services/: use-case logic (CollectionService,SetService,ConfigService)infra/: concrete adapters (Json*Repository,StdFileSystem,CprHttpClient,LocalImageStore)games/: per-game modules (magic,pokemon)
ui_wx/
ui_wx/ contains all presentation code:
MainFrame: top-level shell and menu/split-view orchestrationBaseCardListPanel,BaseCardEditDialog,BaseSelectedCardPanel: reusable UI templatesMagic*andPokemon*classes: game-specific view/panel implementationsTheme.cpp,SvgIcons.cpp,IconListCtrl.cpp: theming and visual behavior
app/
app/main.cpp is the composition root:
- instantiate adapters, services, and modules
- register game modules and game views
- build
AppContext - create and show
MainFrame
Keep this file focused on wiring, not business logic.
tests/
Tests target non-UI behavior with deterministic fakes and in-memory adapters. When a domain JSON contract or filesystem naming rule changes, update the matching tests in the same change.
Common Workflows
Add A Small Feature
- Identify the correct layer (
core,ui_wx, or both). - Make the smallest coherent change in that layer.
- Rebuild the affected target.
- Run tests when core behavior changes.
Add A New Game
Use Adding a new game to Card Collection Manager. Do not bypass the existing seams or invent parallel architecture for a new game.
Release-Oriented Changes
Use CI/CD Guide and Versioning Guide for workflow and release policy decisions.
Avoid These Pitfalls
- adding wx headers in
core/ - putting business logic in
app/main.cpp - accessing concrete adapters directly from UI code instead of
AppContext - changing JSON key spellings casually
- using unpinned dependency versions
First-Day Checklist
- Read repository
AGENTS.mdfiles (core/,ui_wx/,app/,tests/). - Build locally with Build Locally Guide.
- Run the test suite once.
- Make one small layer-contained change.
- Rebuild and rerun relevant tests.