Skip to content

geek-fun/serverlessinsight

Repository files navigation

ServerlessInsight

Full life cycle cross-provider serverless management — describe your app, we handle the rest.

Open source. Multi-cloud. Infrastructure as Code.

Release npm version License Stars CI

npm i -g @geek-fun/serverlessinsight · Docs · Website · GitHub

English · 简体中文


ServerlessInsight is a cross-provider serverless framework — it replaces cloud-specific CLI tools, web consoles, and DIY scripts with a single unified tool. Define your serverless infrastructure in YAML once, deploy to Alibaba Cloud, Tencent Cloud, Huawei Cloud, and more. Think of it as Terraform for serverless, purpose-built for functions, API gateways, storage, and databases.

Installation

npm install   Releases   Docs
npm install -g @geek-fun/serverlessinsight
si --version

Key Features

Multi-Cloud, One Config

Define your infrastructure once in YAML and deploy across Alibaba Cloud, Tencent Cloud, Huawei Cloud, and Volcengine — with AWS, Azure, and GCP on the roadmap. No more juggling cloud-specific CLIs or Terraform modules for every provider.

  • Unified configuration — single serverless.yml format for all providers
  • Provider-specific template generation — generate native IaC templates from your config
  • Cross-provider awareness — the same abstractions work across different clouds
Provider Functions API Gateway Storage Databases Status
Alibaba Cloud ✅ FC3 ✅ API Gateway ✅ OSS ✅ RDS, OTS, ESS Stable
Tencent Cloud ✅ SCF 🚧 Coming Soon ✅ COS ✅ TDSQL-C Stable
Volcengine ✅ veFaaS ✅ API Gateway ✅ TOS Stable
Huawei Cloud ✅ FunctionGraph 🚧 Coming Soon 🚧 Coming Soon 🚧 Coming Soon Beta
AWS 🔜 Planned 🔜 Planned 🔜 Planned 🔜 Planned Planned
Azure 🔜 Planned 🔜 Planned 🔜 Planned 🔜 Planned Planned
Google Cloud 🔜 Planned 🔜 Planned 🔜 Planned 🔜 Planned Planned

Infrastructure as Code

Declarative YAML configuration with validation, planning, and state management — following proven IaC patterns.

  • Plan before deploysi plan shows exactly what will change before anything happens
  • State tracking — incremental deployments with drift detection via local state files
  • Validation — type-safe template validation catches config errors before they reach the cloud
  • Partial failure recovery — successfully deployed resources are saved even when others fail; retry to continue

Quick Deployment

# Validate your config
si validate -f serverless.yml

# Preview changes
si plan -f serverless.yml

# Deploy to production
si deploy -f serverless.yml -s prod

# Destroy when done
si destroy -f serverless.yml

Local Development

Run and debug your serverless functions locally without deploying to the cloud.

  • LocalStack server — test functions, buckets, and API endpoints locally
  • Bucket file serving — access local storage files via HTTP for rapid iteration
  • Same config, different targetsi local -f serverless.yml -s local uses your existing config

API Gateway & Custom Domain

Configure HTTP endpoints and bind custom domains with automatic DNS verification.

  • API Gateway integration — define triggers with HTTP methods and paths
  • Custom domain binding — automatic CNAME + DNS TXT ownership verification for OSS and API Gateway
  • CDN acceleration — edge caching and global content delivery for static sites
  • OSS Transfer Acceleration — cross-region data transfers through Alibaba backbone

Resource Management

Beyond functions — manage the full serverless stack including storage, databases, and more.

  • Object storage — OSS (Alibaba), COS (Tencent), TOS (Volcengine)
  • Databases — RDS, OTS, ESS, TDSQL-C with more on the way
  • Elasticsearch Serverless — deploy and manage ES clusters
  • GPU functions — deploy GPU-enabled serverless functions

Architecture

ServerlessInsight follows a functional client architecture that cleanly separates cloud provider SDKs from business logic:

┌─────────────────────────────────────────┐
│   Resource / Planner / Executor Layer   │  ← Provider-agnostic business logic
│   (Pure functions, no SDK imports)       │
└─────────────────────────────────────────┘
                    ↓
┌─────────────────────────────────────────┐
│         Functional Client Layer          │  ← Encapsulated SDK operations
│   (aliyunClient.ts, tencentClient.ts)   │
└─────────────────────────────────────────┘
                    ↓
┌─────────────────────────────────────────┐
│      Cloud Provider SDKs                 │  ← @alicloud/*, tencentcloud-*
└─────────────────────────────────────────┘
  • Functional & pure — business logic uses pure functions with immutable data
  • SDK encapsulation — provider SDKs accessed ONLY through client modules
  • No classes — prefer type over interface, functional patterns over classes

Development

ServerlessInsight is built with Node.js + TypeScript, Commander.js CLI, and pure functional architecture.

Prerequisites

  • Node.js >= 16

Quick Start

git clone https://github.com/geek-fun/serverlessinsight.git
cd serverlessinsight
npm install
npm run build
npm link

Scripts

Command Description
npm run build TypeScript compilation
npm test Run all tests with coverage
npm run test:unit Unit tests only
npm run test:service Service tests only
npm run lint:check ESLint check
npm run lint:fix Auto-fix lint issues

Sample Config

version: 0.0.1
provider:
  name: aliyun
  region: cn-hongkong

service: my-api-service

functions:
  hello_function:
    name: hello-world-fn
    code:
      runtime: nodejs18
      handler: index.handler
      path: ./src
    memory: 512
    timeout: 10

events:
  api_gateway:
    type: API_GATEWAY
    name: my-api-gateway
    triggers:
      - method: GET
        path: /api/hello
        backend: ${functions.hello_function}

More in the samples directory.

Community

GitHub Discussions     GitHub Issues     GitHub

Contributing

Contributions welcome! Open an issue or pull request. See the AGENTS.md for coding conventions.

Sponsor

GitHub Sponsors

Star History

Star History Chart

License

Apache 2.0 © GEEKFUN

About

Full life cycle cross providers serverless application management for your fast-growing business.

Topics

Resources

License

Stars

87 stars

Watchers

5 watching

Forks

Packages

 
 
 

Contributors

Languages