Back to projects

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.

KafkaTypeScriptNestJSFastifyPostgreSQLTimescaleDBRedisAWSTerraformDockerSvelteKitNx

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

ServiceWhat It Does
GPS GatewayTCP/UDP server accepting raw device frames (Teltonika, Queclink, etc.)
Frames ProcessorKafka consumer — decodes GPS protocol frames into structured telemetry
Event DetectorKafka consumer — detects speeding, harsh braking, ignition, fuel events
GeofencingKafka consumer — zone entry/exit detection
Chat ServiceReal-time dispatcher ↔ driver communication (Socket.IO)
Public APIExternal-facing REST API for integrations
Tacho GatewayMediates tachograph file download authorization between TCA clients and TMR terminals (APDU exchange via company card)
ZSL GatewayFull integration with KAS PUESC (Polish govt system)
Nominatim ProxyReverse geocoding service
TCP MultiplexerTraffic multiplexing for GPS streams
Superadmin UIInternal 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.

tzezar. © 2026 Sebastian Drozd

built with svelte & too much coffee