# sunbeam-g2v
A ConnectRPC-based framework for building microservices in Rust.
## Features
- **Service trait** – lifecycle hooks and graceful shutdown
- **Configuration** – Figment-based config with env-var support
- **Server builders** – Axum and standalone server abstractions
- **Middleware** – auth (JWT, Keto), logging, metrics, tracing, rate limiting
- **Database** – SQLx integration with automatic migrations
- **Message queue** – NATS / JetStream integration
- **Leader election** – Vault and NATS-based coordination
- **Client utilities** – factory, retry, circuit-breaker patterns
- **Testing** – test harness, mocks, fixtures
- **Proc-macros** – `#[derive(Instrumented)]` and `#[derive(Metrics)]`
## Quick start
```toml
[dependencies]
sunbeam-g2v = "0.1.0"
```
```rust
use sunbeam_g2v::prelude::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let router = ServiceRouter::new();
ServerBuilder::new()
.with_router(router)
.with_metrics()
.with_tracing()
.serve()
.await
}
```
See the `examples/` directory for a complete working service.
## License
MIT