Skip to main content

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

ASCII Diagram (Alternative)

┌─────────────────────────────────────────────────────────────────┐
│                         CLIENTS                                  │
│    ┌─────────┐    ┌─────────┐    ┌─────────┐                    │
│    │ Web App │    │ Mobile  │    │   CLI   │                    │
│    └────┬────┘    └────┬────┘    └────┬────┘                    │
└─────────┼──────────────┼──────────────┼─────────────────────────┘
          │              │              │
          └──────────────┼──────────────┘

┌─────────────────────────────────────────────────────────────────┐
│                      API GATEWAY                                 │
│    ┌──────────────────────────────────────────────────────┐     │
│    │  Rate Limiting │ Auth │ Routing │ Load Balancing    │     │
│    └──────────────────────────────────────────────────────┘     │
└─────────────────────────────────────────────────────────────────┘

          ┌──────────────┼──────────────┐
          ▼              ▼              ▼
┌─────────────────────────────────────────────────────────────────┐
│                       SERVICES                                   │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────┐        │
│  │   Core   │  │   User   │  │  Vault   │  │  Notify  │        │
│  │ Service  │  │ Service  │  │ Service  │  │ Service  │        │
│  └────┬─────┘  └────┬─────┘  └────┬─────┘  └────┬─────┘        │
└───────┼─────────────┼─────────────┼─────────────┼───────────────┘
        │             │             │             │
        └─────────────┼─────────────┼─────────────┘
                      ▼             ▼
┌─────────────────────────────────────────────────────────────────┐
│                      DATA LAYER                                  │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐                       │
│  │PostgreSQL│  │  Redis   │  │  Kafka   │                       │
│  └──────────┘  └──────────┘  └──────────┘                       │
└─────────────────────────────────────────────────────────────────┘

Technology Stack

Backend

ComponentTechnologyPurpose
RuntimeGo 1.22+Primary service language
Frameworkstdlib + chiHTTP routing and middleware
DatabasePostgreSQL 15Primary data store
CacheRedis 7Session and data caching
Message QueueKafkaEvent streaming

Frontend

ComponentTechnologyPurpose
FrameworkNext.js 14React framework
LanguageTypeScriptType-safe JavaScript
StylingTailwind CSSUtility-first CSS
StateZustandState management

Infrastructure

ComponentTechnologyPurpose
Container OrchestrationKubernetesService deployment
CI/CDGitHub ActionsContinuous integration
MonitoringPrometheus + GrafanaMetrics and dashboards
LoggingLokiLog aggregation
TracingJaegerDistributed tracing
SecretsVaultSecret management

Development

ComponentTechnologyPurpose
Version ControlGit + GitHubSource code management
Code Qualitygolangci-lint, ESLintLinting
TestingGo test, Jest, PlaywrightUnit, integration, E2E
DocumentationMarkdown, MermaidTechnical 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

  1. Client sends request to API Gateway
  2. Gateway authenticates the request
  3. Gateway routes to appropriate service
  4. Service processes business logic
  5. Service interacts with data layer
  6. Response flows back through Gateway
  7. Client receives response

Event Flow

  1. Service generates event
  2. Event published to Kafka
  3. Consuming services process event
  4. Side effects executed (notifications, updates)