How nammayatri/shared-kernel-rs works
Project Type and Purpose
• This is a Rust-based backend microservice (“location-tracking-service”) organized as a Cargo workspace.
• Its primary role is to expose an HTTP/GRPC API for ingesting and querying geolocation data, persist that data in Redis, and interoperate with an upstream “dynamic-driver-offer-app” for authentication and testing flows.
File Structure Analysis
• Root: Cargo.toml defines a workspace.
• crates/macros: A procedural-macro crate; provides code-generation utilities at compile-time (not a runtime service component).
• crates/shared: A library crate containing common domain types, Redis client abstractions (commands, error handling, types).
• CI/dev config files: nix files, rust-toolchain.toml, justfiles – support reproducible builds, formatting, and services (Redis).
README Insights
• Dependencies: Redis (for state), dynamic-driver-offer-app (for auth), Postman/Newman (for testing).
• Build & run: via Nix flakes and Cargo; services-flake launches Redis locally.
• Top: HTTP server (actix-web / hyper)
• Middle: business logic (uses types and interfaces from crates/shared)
• Bottom: Redis adapter (crates/shared/src/redis)
5. Service’s data layer to Redis, labeling “GET/SET location data”.
• the Cargo workspace structure (macros + shared + main service)
• the runtime interactions (client ↔ service ↔ Redis/Auth)
• the architectural layering and code-generation aspects