Note: This is a comprehensive technical audit of the OLManager codebase. It is intended as a reference for maintainers and contributors, and should not block the v0.2.0 release cycle.
Problem or opportunity
There is no centralized technical overview of the OLManager codebase available to contributors. New developers (and AI assistants) need to spend hours reverse-engineering the architecture, stack, conventions, and testing strategy. This audit consolidates everything into a single reference document, identifying:
- Full technology stack and version matrix
- Architecture patterns (frontend, backend, Tauri bridge, data layer)
- Testing strategy and coverage gaps
- Code quality assessment (TypeScript strictness, Rust patterns, clean architecture)
- Feature inventory (30+ features mapped to files)
- Security posture (CSP, audits, input validation)
- CI/CD pipeline analysis
- Key risks and recommendations for v0.3.0-beta readiness
Proposed solution
Use this audit as the foundation for:
- CONTRIBUTING.md enhancements — Add an "Architecture Overview" section linking to this analysis.
- docs/ARCHITECTURE.md updates — Refresh with current stack versions and crate diagrams.
- Team onboarding — New contributors can read this instead of grepping 536 source files.
- Roadmap prioritization — The identified risks (CSP disabled, lol_sim_v2.rs monolith, CI non-blocking) feed directly into v0.3 planning.
Architecture Summary
Stack: React 19 + TypeScript 6.0 + Vite 8 + Tailwind CSS 4 (frontend) | Rust edition 2024 workspace with 4 crates + Tauri 2.10 (backend) | SQLite (rusqlite) | Zustand | i18next (8 locales)
Frontend (347 TS files):
- Feature-based component structure (~36 subdirectories)
- Zustand stores (gameStore, settingsStore)
- Typed service layer over Tauri IPC (10 services)
- Lazy-loaded pages with react-router-dom 7
- 117 test files (Vitest + Testing Library + jsdom)
Backend (189 Rust files):
domain crate — Pure types, serializable, ts-rs feature flag for TS generation
engine crate — Match simulation (pure, no I/O)
ofm_core crate — Game logic (43 modules, ~100+ Tauri commands)
db crate — SQLite persistence (52 migrations, 15 repositories)
StateManager with Mutex<Session> (single-lock pattern)
Data Layer:
- 52 SQLite migrations (V1–V51)
- Per-save
.db files with SHA2 checksums
- Legacy migration path from OpenFootManager
- Deterministic player stat generation from IGN hash
Testing Capabilities
| Capability |
Status |
| Test Runner (TS) |
Vitest 4.1.2 ✅ |
| Test Runner (Rust) |
cargo test ✅ |
| Unit Tests |
✅ (117 TS + 22 Rust files) |
| Integration Tests |
✅ (@testing-library/react + Rust integration tests) |
| Coverage (TS) | ✅ @vitest/coverage-v8 |
| Coverage (Rust) | ❌ Not configured |
| Linter (Rust) | ✅ cargo clippy |
| Type Checker (TS) | ✅ tsc --noEmit strict mode |
⚠️ CI Issue: cargo test for the main openleaguemanager crate is skipped in CI due to lol_sim_v2.rs blocking compilation.
Code Quality Assessment
Strengths:
- TypeScript strict mode enabled (
strict, noUnusedLocals, noUnusedParameters, noFallthroughCasesInSwitch)
- Rust clean architecture separation (domain → engine → ofm_core → db)
ts-rs for automatic Rust→TypeScript type generation
- 52 well-structured SQLite migrations
- Single-lock
StateManager prevents deadlocks
- Auto-updater integrated (Tauri plugin)
- Legacy migration path maintained
Concerns:
- TypeScript 6.0 is bleeding edge and may have stability issues
- Rust edition 2024 is very new; monitor compatibility
lol_sim_v2.rs is 6,376 lines — monolithic, blocks tests
transfers.rs is 2,104 lines — should be split
team.rs domain is 1,266 lines with ~50 fields
store/types.ts is 843 lines with manual type duplication
- Clippy warnings suppressed in
domain and engine crates
LegacyCompatibilityValue = any breaks type safety
Security Posture
| Aspect |
Status |
| CSP |
🔴 Disabled ("csp": null) |
| SQL Injection |
✅ Prevented (parameterized queries) |
| Input Validation |
🟡 Partial (validator crate available but inconsistently used) |
| Error Disclosure |
✅ Controlled (AppError with i18n codes) |
| Secrets Management |
✅ Documented in SECURITY.md |
| Safe File Handling |
✅ Correct (path sanitization via app_data_dir()) |
| npm/cargo Audit in CI |
🟡 Runs but continue-on-error: true — does not block PRs |
| Dependabot/CodeQL |
❌ Not configured |
Key Recommendations
- Enable CSP in
tauri.conf.json — critical security gap
- Refactor
lol_sim_v2.rs — split into modules, unblock cargo test in CI
- Make CI blocking — remove
continue-on-error from clippy, fmt, and security audits
- Add Rust coverage — configure
cargo test with coverage reporting
- Configure Dependabot for automatic security updates
- Review Tauri capabilities (
capabilities/default.json) for minimum privilege
Acceptance criteria
Scope
Documentation
Approval pre-flight
Problem or opportunity
There is no centralized technical overview of the OLManager codebase available to contributors. New developers (and AI assistants) need to spend hours reverse-engineering the architecture, stack, conventions, and testing strategy. This audit consolidates everything into a single reference document, identifying:
Proposed solution
Use this audit as the foundation for:
Architecture Summary
Stack: React 19 + TypeScript 6.0 + Vite 8 + Tailwind CSS 4 (frontend) | Rust edition 2024 workspace with 4 crates + Tauri 2.10 (backend) | SQLite (rusqlite) | Zustand | i18next (8 locales)
Frontend (347 TS files):
Backend (189 Rust files):
domaincrate — Pure types, serializable, ts-rs feature flag for TS generationenginecrate — Match simulation (pure, no I/O)ofm_corecrate — Game logic (43 modules, ~100+ Tauri commands)dbcrate — SQLite persistence (52 migrations, 15 repositories)StateManagerwithMutex<Session>(single-lock pattern)Data Layer:
.dbfiles with SHA2 checksumsTesting Capabilities
| Coverage (TS) | ✅ @vitest/coverage-v8 |
| Coverage (Rust) | ❌ Not configured |
| Linter (Rust) | ✅ cargo clippy |
| Type Checker (TS) | ✅ tsc --noEmit strict mode |
cargo testfor the mainopenleaguemanagercrate is skipped in CI due tolol_sim_v2.rsblocking compilation.Code Quality Assessment
Strengths:
strict,noUnusedLocals,noUnusedParameters,noFallthroughCasesInSwitch)ts-rsfor automatic Rust→TypeScript type generationStateManagerprevents deadlocksConcerns:
lol_sim_v2.rsis 6,376 lines — monolithic, blocks teststransfers.rsis 2,104 lines — should be splitteam.rsdomain is 1,266 lines with ~50 fieldsstore/types.tsis 843 lines with manual type duplicationdomainandenginecratesLegacyCompatibilityValue = anybreaks type safetySecurity Posture
"csp": null)validatorcrate available but inconsistently used)AppErrorwith i18n codes)SECURITY.mdapp_data_dir())continue-on-error: true— does not block PRsKey Recommendations
tauri.conf.json— critical security gaplol_sim_v2.rs— split into modules, unblockcargo testin CIcontinue-on-errorfrom clippy, fmt, and security auditscargo testwith coverage reportingcapabilities/default.json) for minimum privilegeAcceptance criteria
docs/ARCHITECTURE.mdis updated to reflect current stack versions.Scope
Documentation
Approval pre-flight
status:approvedbefore a PR is opened.developmentusingtype/lowercase-slugif this is approved.