Update README and CLAUDE.md to reflect current project state
- Project structure updated: amqp.rs, lib.rs, tests/, templates/, env_* config files - Configuration section updated: BEDS_ENV-based env file selection - Status table updated: completed items marked done, next steps listed - CLAUDE.md: split current structure from planned additions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
40
README.md
40
README.md
@@ -85,13 +85,24 @@ Every node runs the same binary. Configuration determines what it does.
|
||||
rustybeds/
|
||||
├── src/
|
||||
│ ├── config/
|
||||
│ │ ├── mod.rs # Loader — layered TOML, base + env override
|
||||
│ │ ├── mod.rs # Loader — load() and load_from() for testability
|
||||
│ │ └── structs.rs # Typed config structs (serde Deserialize)
|
||||
│ ├── amqp.rs # RabbitMQ transport — validate(), future channel/queue ops
|
||||
│ ├── lib.rs # Public API surface for integration test harness
|
||||
│ ├── logging.rs # tracing + journald init
|
||||
│ └── main.rs
|
||||
│ └── main.rs # ipl() sequence + main()
|
||||
├── config/
|
||||
│ ├── beds.toml # Base config — checked in, no credentials
|
||||
│ └── env.toml # Environment overrides — gitignored
|
||||
│ ├── env_dev.toml # Dev overrides — gitignored
|
||||
│ ├── env_qa.toml # QA overrides — gitignored
|
||||
│ └── env_prod.toml # Prod overrides — gitignored
|
||||
├── templates/
|
||||
│ ├── example_rec.toml # Canonical self-documenting REC template
|
||||
│ └── mst_logger_rec.toml # Logger collection template (msLogs)
|
||||
├── tests/
|
||||
│ ├── common/mod.rs # Shared test helpers — load_test_config()
|
||||
│ └── fixtures/
|
||||
│ └── beds_test.toml # Canonical test config fixture
|
||||
└── Cargo.toml
|
||||
```
|
||||
|
||||
@@ -99,7 +110,7 @@ rustybeds/
|
||||
|
||||
## Configuration
|
||||
|
||||
Two-file layered TOML system. `beds.toml` contains production defaults and is checked into version control. `env.toml` overrides per-environment values and is never committed.
|
||||
Layered TOML system. `beds.toml` holds production-safe defaults and is checked into version control. An env override file (`env_{BEDS_ENV}.toml`) is layered on top and is never committed. Set `BEDS_ENV` to `dev`, `qa`, or `prod` — defaults to `dev`.
|
||||
|
||||
```toml
|
||||
# beds.toml — base
|
||||
@@ -107,13 +118,13 @@ Two-file layered TOML system. `beds.toml` contains production defaults and is ch
|
||||
host = "prod-broker.internal"
|
||||
port = 5672
|
||||
|
||||
# env.toml — local override
|
||||
# env_dev.toml — local override (gitignored)
|
||||
[broker_services.app_server]
|
||||
host = "localhost"
|
||||
pass = "your-actual-password"
|
||||
pass = "your-dev-password"
|
||||
```
|
||||
|
||||
The `config` crate deep-merges these at startup. Only keys present in `env.toml` are overridden — everything else inherits from base.
|
||||
The `config` crate deep-merges these at startup. Only keys present in the env file are overridden — everything else inherits from the base.
|
||||
|
||||
---
|
||||
|
||||
@@ -121,11 +132,18 @@ The `config` crate deep-merges these at startup. Only keys present in `env.toml`
|
||||
|
||||
| Component | Status |
|
||||
|---|---|
|
||||
| Config loading | Done |
|
||||
| Structured logging (journald + console) | Done |
|
||||
| Broker pool | Next |
|
||||
| Config loading (layered TOML + env select) | Done |
|
||||
| Structured logging (journald + console mirror) | Done |
|
||||
| IPL sequence with env-aware error handling | Done |
|
||||
| RabbitMQ reachability validation | Done |
|
||||
| Unit test scaffolding + config fixture pattern | Done |
|
||||
| MongoDB reachability validation | Next |
|
||||
| MariaDB reachability validation | Next |
|
||||
| Shared filesystem validation | Next |
|
||||
| AMQP channel / queue declaration | Planned |
|
||||
| Broker pool (Tokio tasks) | Planned |
|
||||
| NamasteCore trait | Planned |
|
||||
| Database adapters (MySQL, MongoDB) | Planned |
|
||||
| Database adapters (MariaDB, MongoDB) | Planned |
|
||||
| Factory dispatch | Planned |
|
||||
| AI database object generation | Phase 2 |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user