GPS Fleet Management Platform
Professional work: event-driven microservices platform for GPS fleet tracking. Kafka pipelines, real-time event detection, geofencing, chat, tachograph integration, and full AWS infrastructure.
Context
This is professional work at Logisat (~1.5 years), not a personal project. I’m responsible for most of the GPS backend: architecture, implementation, infrastructure, monitoring.
What I Built
The platform tracks thousands of vehicles reporting GPS positions every few seconds. Raw binary frames arrive over TCP/UDP, flow through Kafka, get decoded, stored, and analyzed in real-time.
Services I Wrote
| Service | What It Does |
|---|---|
| GPS Gateway | TCP/UDP server accepting raw device frames (Teltonika, Queclink, etc.) |
| Frames Processor | Kafka consumer — decodes GPS protocol frames into structured telemetry |
| Event Detector | Kafka consumer — detects speeding, harsh braking, ignition, fuel events |
| Geofencing | Kafka consumer — zone entry/exit detection |
| Chat Service | Real-time dispatcher ↔ driver communication (Socket.IO) |
| Public API | External-facing REST API for integrations |
| Tacho Gateway | Mediates tachograph file download authorization between TCA clients and TMR terminals (APDU exchange via company card) |
| ZSL Gateway | Full integration with KAS PUESC (Polish govt system) |
| Nominatim Proxy | Reverse geocoding service |
| TCP Multiplexer | Traffic multiplexing for GPS streams |
| Superadmin UI | Internal SvelteKit dashboard with charts, analytics, and management tools |
Infrastructure
Built entirely with Terraform on AWS:
- ECS Fargate for all containerized services
- MSK (Managed Kafka) in KRaft mode
- RDS PostgreSQL + TimescaleDB for time-series
- ElastiCache Redis for caching and pub/sub
- ALB/NLB for routing (HTTP + TCP)
- S3 + CloudFront for static assets
- VPC, security groups, NAT
Three environments: dev, staging, production. Grafana dashboards for monitoring. Docker Compose for local development. GitHub Actions CI/CD with Nx affected detection.
Shared Packages
Wrote internal packages (@platform/*): database schemas (Kysely), GPS protocol parsers, state machines (vehicle activity, fuel events, driver activity, country stays), telemetry types, and shared utilities.
Data Flow
Devices → TCP Gateway → Kafka (raw-frames) → Frames Processor → Kafka (processed-telemetry) → [Telemetry Producer | Event Detector | Geofencing] → PostgreSQL/TimescaleDB → Alert Service → Notifications
Tech Decisions
- Kafka over RabbitMQ — needed ordered replay, partitioning by device ID, and high throughput
- TimescaleDB — PostgreSQL extension for time-series, avoids managing a separate TSDB
- Nx monorepo — single repo for all services and shared packages, affected-based CI
- Biome over ESLint — faster, simpler config
- Kysely for shared DB queries — type-safe SQL without ORM magic
Scale
40k+ devices, ~1000 frames/second throughput. End-to-end latency under 2 seconds from device report to database write.