Technical Documentation
System Architecture
Quick search…⌘K
The Auto Glass platform is built as a cloud-native microservices architecture designed for high availability, horizontal scalability, and clean separation of domain concerns. Each service owns its data and exposes a well-defined REST API consumed by the API Gateway.
Architecture Principles: Single-responsibility services · Event-driven async communication via Redis Pub/Sub · Zero-trust internal networking · Circuit-breaker pattern on all external API calls · 99.9% SLA target
High-Level System Architecture
The platform is organized into five horizontal layers: Client, API Gateway, Microservices, Data, and External Integrations. Each layer has a distinct responsibility boundary.
Loading diagram…
Technology Stack
| Layer | Technology | Rationale |
|---|---|---|
| Frontend Web | Next.js 15, React 19, Tailwind CSS | Server-side rendering, edge-optimised delivery, type-safe components |
| Mobile App | React Native + Expo SDK 52 | Single codebase for iOS + Android technician app |
| API Gateway | Kong Gateway 3.x | Rate limiting, JWT validation, request logging, plugin ecosystem |
| Backend Services | Node.js 22 (LTS), Go 1.23 | Node for I/O-heavy services; Go for Dispatch Engine requiring high concurrency |
| Primary Database | PostgreSQL 16 | ACID compliance, JSONB for flexible glass catalog, row-level security |
| Cache / Queue | Redis 7.x (Cluster) | Job queues, technician geolocation (Geo commands), session store |
| Telemetry | TimescaleDB | Time-series extension of PostgreSQL for GPS tracks and sensor data |
| Object Storage | S3-compatible (AWS / MinIO) | Damage photos, calibration certificates, signed invoice PDFs |
| CDN / Edge | Vercel Edge Network, CloudFront | Sub-50ms TTFB globally for customer-facing web app |
| Observability | Prometheus + Grafana, Sentry, Datadog APM | Metrics, alerting, distributed tracing, error tracking |
Deployment Pipeline
Code travels from a developer's local machine through automated CI/CD gating before reaching production. A mandatory manual approval gate protects the production namespace.
Loading diagram…
Service Communication Patterns
Synchronous (Request/Response)
- All client-to-service calls via HTTPS REST through the API Gateway
- Service-to-service calls within the same request lifecycle use internal HTTP with mTLS
Asynchronous (Event-Driven)
BookingCreated→ Dispatch Engine picks up and assigns nearest technicianJobCompleted→ Invoice Service auto-generates PDF → Notification Service sends SMS/emailPaymentSucceeded→ Inventory Service decrements parts stockClaimSubmitted→ Insurance EDI Service queues 837P electronic claim
Scalability & Resilience
| Concern | Strategy |
|---|---|
| Horizontal scaling | All services are stateless; deployed as K8s Deployments with HPA (Horizontal Pod Autoscaler) |
| Database read scaling | Two read replicas behind PgBouncer connection pool; writes to primary only |
| Cache warming | NAGS glass catalog pre-loaded into Redis on startup; TTL 24h with background refresh |
| Circuit breaker | All external API calls (NHTSA, NAGS, Stripe) wrapped with opossum circuit breaker |
| Failover | PostgreSQL automatic failover via Patroni; Redis Sentinel for cache failover |
| DR / RTO | Recovery Time Objective < 15 min; daily automated snapshots to cross-region S3 |
Security Note: All internal service-to-service communication uses mTLS with certificates rotated every 30 days via cert-manager. No service is exposed directly to the internet — all traffic must flow through the API Gateway.