chore: initialiser le projet imagod-web (Rust)

- Structure du projet Cargo avec dépendances (clap, axum, reqwest, rusqlite, arboard, tray-icon)
- CLI avec sous-commandes start, serve, stop, status, config, install, uninstall, logs
- Module config: parsing TOML, chemins Windows/Linux
- Module dedup: dédoublonnage SHA-256 avec cache SQLite
- Module imago_client: client HTTP pour API Imago (upload, search, get)
- Module watcher: boucle de polling stub
- Module server: serveur web axum avec routes API REST stub
- Platform-specific: clipboard, tray, service, window_info (Windows)
- Frontend placeholder HTML
- Config par défaut (imagod.toml)
- README.md, LICENSE (MIT), .gitignore
This commit is contained in:
2026-06-22 16:44:47 -04:00
commit a3b853de04
19 changed files with 923 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
//! Routes API REST du dashboard
use axum::{Router, routing::get};
/// Routes de l'API REST
pub fn api_routes() -> Router {
Router::new()
.route("/api/health", get(health_check))
.route("/api/images", get(list_images))
.route("/api/images/search", get(search_images))
.route("/api/stats", get(stats))
}
/// Routes statiques (frontend embarqué)
pub fn static_routes() -> Router {
// Phase 9: Servir le frontend Svelte via rust-embed
Router::new()
}
async fn health_check() -> &'static str {
"OK"
}
async fn list_images() -> &'static str {
// Phase 9: Liste paginée des images
"[]"
}
async fn search_images() -> &'static str {
// Phase 9: Recherche full-text
"[]"
}
async fn stats() -> &'static str {
// Phase 9: Statistiques
r#"{"total_images":0,"total_storage_bytes":0}"#
}