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:
52
claude.md
52
claude.md
@@ -23,32 +23,50 @@ This is not a greenfield project. The architecture is proven. The Rust rewrite e
|
||||
4. **Template-driven CRUD** — each data domain is a Rust struct implementing the `NamasteCore` trait. Adding a domain means adding a struct. Nothing else changes.
|
||||
5. **Single codebase, config-driven nodes** — all service nodes run the same binary. Node role (appServer, admin, segundo, tercero) is determined entirely by startup configuration.
|
||||
|
||||
## Project Structure (Target)
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
beds/
|
||||
rustybeds/
|
||||
├── src/
|
||||
│ ├── core/
|
||||
│ │ ├── trait.rs # NamasteCore trait definition
|
||||
│ │ ├── factory.rs # Template name → adapter dispatch
|
||||
│ │ └── meta.rs # Request metadata parsing
|
||||
│ ├── adapters/
|
||||
│ │ ├── mysql.rs # gacPDO equivalent
|
||||
│ │ └── mongodb.rs # gacMongoDB equivalent
|
||||
│ ├── brokers/
|
||||
│ │ ├── pool.rs # Broker pool management
|
||||
│ │ └── broker.rs # Individual broker task
|
||||
│ ├── templates/ # Domain-specific structs (one per data domain)
|
||||
│ ├── config/
|
||||
│ │ └── loader.rs # TOML config loading and merging
|
||||
│ └── main.rs
|
||||
│ │ ├── mod.rs # load() + load_from() — layered TOML config
|
||||
│ │ └── 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 + console mirror init
|
||||
│ └── main.rs # ipl() sequence + main()
|
||||
├── config/
|
||||
│ ├── beds.toml # Base production config
|
||||
│ └── env.toml # Environment overrides
|
||||
│ ├── beds.toml # Base config — checked in, no credentials
|
||||
│ ├── 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
|
||||
└── CLAUDE.md
|
||||
```
|
||||
|
||||
### Planned additions (not yet implemented)
|
||||
|
||||
```
|
||||
src/
|
||||
├── core/
|
||||
│ ├── trait.rs # NamasteCore trait definition
|
||||
│ ├── factory.rs # Template name → adapter dispatch
|
||||
│ └── meta.rs # Request metadata parsing
|
||||
├── adapters/
|
||||
│ ├── mysql.rs # gacPDO equivalent
|
||||
│ └── mongodb.rs # gacMongoDB equivalent
|
||||
└── brokers/
|
||||
├── pool.rs # Broker pool management
|
||||
└── broker.rs # Individual broker task
|
||||
```
|
||||
|
||||
## Key Rust Mappings from PHP
|
||||
|
||||
| PHP | Rust |
|
||||
|
||||
Reference in New Issue
Block a user