53 lines
2.4 KiB
Markdown
53 lines
2.4 KiB
Markdown
<!-- file: README.md -->
|
||
<!-- version: 1 -->
|
||
|
||
# Khadhroony Bot3
|
||
|
||
Khadhroony Bot3 is the consolidated successor workspace to `khadhroony-bot2`.
|
||
|
||
## Workspace crates
|
||
|
||
- `kb-core`: foundation errors and shared primitives.
|
||
- `kb-config`: configuration contracts.
|
||
- `kb-lib`: all decoder, executor and materializer APIs and implementations.
|
||
- `kb-logging`: logging and tracing runtime.
|
||
- `kb-program-ids`: Solana program identifier registry.
|
||
- `kb-pipeline`: ingestion, decoding, materialization and execution orchestration.
|
||
- `kb-rpc`: HTTP and WebSocket Solana transports.
|
||
- `kb-store`: store-neutral contracts and PostgreSQL implementation modules.
|
||
- `kb-wallet`: wallet and signer support.
|
||
- `kb-app-demo`: the only binary retained during the initial migration.
|
||
|
||
## Migration principle
|
||
|
||
The previous workspace is preserved under `migration/khadhroony-bot2-reference`. The new workspace compiles independently as a controlled scaffold. Public APIs are ported into `kb-lib` module by module, with compatibility recorded in `migration/module-map.json`.
|
||
|
||
## Validation
|
||
|
||
```bash
|
||
cargo fmt --all
|
||
cargo check --workspace
|
||
cargo test --workspace
|
||
cargo clippy --workspace --all-targets
|
||
```
|
||
|
||
## État de migration `0.1.0-pre.001`
|
||
|
||
- `kb-wallet` remplace définitivement le scaffold `kb_wallet`.
|
||
- `kb-core` conserve l’architecture de `kb_core` : implémentations dans `error.rs` et `module.rs`, façade et réexports dans `lib.rs`.
|
||
- Les prochaines APIs consolidées de `kb-lib` suivront la même règle : aucun contrat métier ne sera défini directement dans `lib.rs`.
|
||
|
||
## Contrats consolidés
|
||
|
||
À partir de `0.1.0-pre.002`, `kb-lib` porte les modèles et contrats fondamentaux autrefois répartis entre `kb_model`, `kb_decoder_api`, `kb_materializer_api` et `kb_execution_api`. Les implémentations restent dans des modules dédiés ; `kb-lib/src/lib.rs` ne contient que les déclarations de modules et les réexports publics.
|
||
|
||
## Stockage consolidé
|
||
|
||
À partir de `0.1.0-pre.003`, `kb-store` remplace le scaffold initial par une implémentation complète :
|
||
|
||
- contrats store-neutral : DTO, entités, pagination, santé et traits de repository ;
|
||
- adaptateur PostgreSQL : connexion, initialisation idempotente, requêtes, diagnostics et replay ;
|
||
- façade unique dans `kb-store/src/lib.rs` ;
|
||
- modèle de replay partagé conservé dans `kb-lib`, sans duplication ;
|
||
- options PostgreSQL indépendantes de `kb-config`, adaptées par la frontière applicative.
|