Skyflow Platform Architecture Overview
This document provides a high-level overview of the Skyflow platform architecture.Table of Contents
Introduction
Skyflow is a modern platform built with scalability, reliability, and developer experience in mind. The architecture follows microservices principles with clear service boundaries and well-defined APIs.System Architecture
The platform is organized into the following layers:- Presentation Layer: Web and mobile clients
- API Gateway: Request routing, authentication, rate limiting
- Service Layer: Business logic microservices
- Data Layer: Databases, caches, and message queues
- Infrastructure Layer: Kubernetes, monitoring, logging
Service Diagram
Figure 1 — Skyflow Service Topology. Clients connect through the API Gateway, which handles auth and rate limiting. Business-logic services interact with PostgreSQL, Redis, and Kafka. Kubernetes orchestrates all services while Prometheus and Grafana provide observability.
Trace ID Requirement Rationale Test Case SKY-ARCH-001All client traffic shall pass through the API Gateway for authentication and rate limiting Prevents unauthenticated or excessive access to backend services TC-SKY-ARCH-001SKY-ARCH-002Event-driven communication between services shall use Kafka with durable topics Decouples producers from consumers and enables replay for recovery TC-SKY-ARCH-002SKY-ARCH-003All services shall expose Prometheus metrics on a standard /metricsendpointEnables unified monitoring and alerting across the platform TC-SKY-ARCH-003
Technology Stack
Backend
| Component | Technology | Purpose |
|---|---|---|
| Runtime | Go 1.22+ | Primary service language |
| Framework | stdlib + chi | HTTP routing and middleware |
| Database | PostgreSQL 15 | Primary data store |
| Cache | Redis 7 | Session and data caching |
| Message Queue | Kafka | Event streaming |
Frontend
| Component | Technology | Purpose |
|---|---|---|
| Framework | Next.js 14 | React framework |
| Language | TypeScript | Type-safe JavaScript |
| Styling | Tailwind CSS | Utility-first CSS |
| State | Zustand | State management |
Infrastructure
| Component | Technology | Purpose |
|---|---|---|
| Container Orchestration | Kubernetes | Service deployment |
| CI/CD | GitHub Actions | Continuous integration |
| Monitoring | Prometheus + Grafana | Metrics and dashboards |
| Logging | Loki | Log aggregation |
| Tracing | Jaeger | Distributed tracing |
| Secrets | Vault | Secret management |
Development
| Component | Technology | Purpose |
|---|---|---|
| Version Control | Git + GitHub | Source code management |
| Code Quality | golangci-lint, ESLint | Linting |
| Testing | Go test, Jest, Playwright | Unit, integration, E2E |
| Documentation | Markdown, Mermaid | Technical docs |
Key Components
API Gateway
The API Gateway handles all incoming requests and provides:- Authentication and authorization
- Rate limiting and throttling
- Request routing to backend services
- Response caching
- Request/response transformation
Core Service
The central business logic service responsible for:- Primary business operations
- Coordination between services
- Transaction management
User Service
Manages user-related functionality:- User registration and profiles
- Authentication tokens
- User preferences
Vault Service
Handles sensitive data:- Encryption and decryption
- Key management
- Secure data storage
Notification Service
Handles all notifications:- Email notifications
- Push notifications
- Webhook delivery
Data Flow
Request Flow
- Client sends request to API Gateway
- Gateway authenticates the request
- Gateway routes to appropriate service
- Service processes business logic
- Service interacts with data layer
- Response flows back through Gateway
- Client receives response
Event Flow
- Service generates event
- Event published to Kafka
- Consuming services process event
- Side effects executed (notifications, updates)
Related Documentation
- ADRs - Architecture Decision Records
- API Documentation - API specifications
- Runbooks - Operational procedures