Recommended Rust Workspace
The initial rough idea is good, but the crates should be named around lifecycle and dependency direction.
A suggested layout:
ttrpg-forge/
├── Cargo.toml
├── crates/
│ ├── forge-domain/
│ ├── forge-application/
│ ├── forge-storage/
│ ├── forge-storage-postgres/
│ ├── forge-auth/
│ ├── forge-search/
│ ├── forge-api-contracts/
│ ├── forge-api-http/
│ ├── forge-api-grpc/
│ ├── forge-webui/
│ ├── forge-rules-core/
│ ├── forge-rules-dnd5e/
│ ├── forge-rules-pathfinder/
│ ├── forge-rules-hero/
│ └── forge-cli/
├── doc/
│ ├── book.toml
│ └── src/
└── deploy/
Suggested Workspace Dependencies
[workspace]
members = ["crates/*"]
resolver = "2"
[workspace.package]
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://example.invalid/ttrpg-forge"
[workspace.dependencies]
anyhow = "1"
async-trait = "0.1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "2"
time = { version = "0.3", features = ["serde"] }
uuid = { version = "1", features = ["serde", "v7"] }
Why Not minimal-api?
minimal-api describes the current implementation style, not the long-term responsibility.
Prefer names like:
forge-api-http
forge-api-grpc
forge-api-contracts
That lets the HTTP API grow beyond a minimal API without a crate rename.
Why Not Put Everything in core?
core often becomes a dumping ground.
Prefer clearer crates:
forge-domain pure business types
forge-application use cases
forge-storage storage traits
forge-api-http REST API