Autonomous gRPC Microservice for Exchange Rate Management
Standalone Go microservice that autonomously collects, stores, and serves live and historical currency exchange rates to applications within the Expense Tracker ecosystem via gRPC. Addresses multi-currency visibility requirements and establishes the first inter-service communication pattern in the evolving microservice architecture.
Core implementation complete (Stages 1–6). The service starts, polls three external providers
(fawazahmed0, ExchangeRate-API, Frankfurter), stores rates in PostgreSQL, serves them via gRPC,
and exposes health endpoints — all components verified manually.
Three fiat pairs live: RSD↔EUR, RSD↔USD, EUR↔USD.
gRPC methods GetRate, GetRates, ListSupportedPairs tested with grpcurl.
Next: E2E testing (Stage 7), Docker deployment to Hetzner (Stage 8), release v0.1.0 (Stage 9).
currency-rate-service — standalone microservice repository with independent deployment lifecycle.
/cmd/server — service entrypoint: config loading, DB connection, component wiring, graceful shutdown.
/internal/adapter — RateProvider interface, generic JSON adapter (URL templates + JSONPath), adapter registry.
/internal/polling — scheduler with per-pair goroutines, failover logic, pgx type converters.
/internal/grpc — gRPC server handlers + protoc-generated pb files (GetRate, GetRates, ListSupportedPairs).
/internal/health — HTTP health handler: /healthz (liveness) and /readyz (readiness + JSON status).
/internal/repository — sqlc-generated type-safe queries for all 5 tables.
/migrations — 5 golang-migrate migrations with seed data (pairs, providers, assignments, rates, health).
/proto — protobuf definition for CurrencyRateService.
/Documentation — BRD and SRS.