chore: initialise la structure du projet SentinelMesh

- Workspace Cargo avec backend, agent-scan-network, agent-metric
- Skeleton Rust pour les trois crates (Axum, Tokio, SQLx)
- Documentation : README, FEATURES, ROADMAP, ARCHITECTURE, API, INSTALL
- Exemples de widgets Glance (custom-api)
- Script d'installation agents (squelette Phase 5)
- Docker Compose + Dockerfile backend
- .gitignore et CLAUDE.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-19 05:59:12 +02:00
parent 452fded27f
commit 7cf56f24ef
22 changed files with 671 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
[package]
name = "sentinelmesh-backend"
version = "0.1.0"
edition = "2021"
[dependencies]
axum = "0.8"
tokio = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
anyhow = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
sqlx = { version = "0.8", features = ["sqlite", "runtime-tokio", "macros", "migrate"] }
tower-http = { version = "0.6", features = ["cors", "trace"] }
utoipa = { version = "4", features = ["axum_extras"] }
utoipa-swagger-ui = { version = "7", features = ["axum"] }
+13
View File
@@ -0,0 +1,13 @@
FROM rust:1.82-alpine AS builder
RUN apk add --no-cache musl-dev
WORKDIR /app
COPY Cargo.toml Cargo.lock* ./
COPY src ./src
RUN cargo build --release
FROM alpine:3.21
RUN apk add --no-cache ca-certificates
WORKDIR /app
COPY --from=builder /app/target/release/sentinelmesh-backend .
EXPOSE 8080
CMD ["./sentinelmesh-backend"]
+24
View File
@@ -0,0 +1,24 @@
use axum::{routing::get, Router};
use tracing::info;
use tracing_subscriber::EnvFilter;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
tracing_subscriber::fmt()
.with_env_filter(EnvFilter::from_default_env())
.init();
let app = Router::new().route("/api/v1/health", get(health));
let addr = "0.0.0.0:8080";
info!("SentinelMesh backend démarré sur {addr}");
let listener = tokio::net::TcpListener::bind(addr).await?;
axum::serve(listener, app).await?;
Ok(())
}
async fn health() -> &'static str {
"ok"
}