@@ -10,11 +10,19 @@ Rust workspace implementing a card game simulation (President/Asshole variant) w
1010## STRUCTURE
1111```
1212roosevelt/
13- ├── Cargo.toml # Workspace with 3 crates
13+ ├── Cargo.toml # Workspace with 4 crates
1414├── Cargo.lock
1515├── rust-toolchain.toml # Stable + rust-analyzer
1616├── rustfmt.toml # Import grouping rules
17- ├── notes.txt # Project todo
17+ ├── database/ # Database persistence layer
18+ │ ├── src/
19+ │ │ ├── collectors/ # GameEventCollector, GameMetadata
20+ │ │ ├── writers/ # BulkGameWriter, StreamingGameWriter
21+ │ │ ├── config.rs # DatabaseConfig with writer type selection
22+ │ │ ├── error.rs # DatabaseError types
23+ │ │ ├── models.rs # ActionRecord, GameResultRecord
24+ │ │ └── lib.rs
25+ │ └── Cargo.toml
1826├── types/ # Core data structures
1927│ ├── src/
2028│ │ ├── action.rs
@@ -47,13 +55,16 @@ roosevelt/
4755| CLI entry point | ` simulation/src/bin/run_simulation.rs ` | YAML config loading, infinite loop |
4856| Card ordering | ` types/src/card.rs ` | Two is highest rank |
4957| Player data | ` types/src/player.rs ` , ` player_state.rs ` | Roles, hands, public/private state |
58+ | Database writers | ` database/src/writers/ ` | BulkGameWriter, StreamingGameWriter |
59+ | Game recording | ` database/src/collectors/ ` | GameEventCollector, GameMetadata |
60+ | Database config | ` database/src/config.rs ` | Writer type selection |
5061
5162## CONVENTIONS
5263- ** Workspace** : Centralized dependency management in root ` Cargo.toml `
5364- ** Strategy pattern** : Dynamic dispatch via ` Box<dyn Strategy> `
5465- ** Logging** : Use ` log:: ` facade, initialize with ` env_logger::init() `
5566- ** Formatting** : ` imports_granularity = "Crate" ` , ` group_imports = "StdExternalCrate" `
56- - ** No tests ** : Zero test infrastructure exists
67+ - ** Testing ** : Unit and integration tests exist for database, simulation, and types crates
5768- ** CI/CD** : ` .github/workflows/ci.yml ` enforces fmt, clippy, build, test
5869
5970## ANTI-PATTERNS (THIS PROJECT)
0 commit comments