Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ sail Public

An API Gateway for building modern cloud-based applications. Built on YARP with dynamic configuration and real-time updates.

License

Notifications You must be signed in to change notification settings

lqlive/sail

Repository files navigation

Sail

GitHub MIT License .NET

Sail is a modern, high-performance API Gateway built on top of YARP (Yet Another Reverse Proxy). It provides dynamic configuration management with a web-based admin interface, enabling real-time updates to routes, clusters, and policies without restart.

Get started

Follow the Quick Start instructions below.

Also check out the documentation for more information on configuration and deployment.

Features

  • Dynamic Configuration: Update routes, clusters, and policies in real-time without restarting
  • Web-Based Management: Modern React UI for visual configuration management
  • Flexible Routing: Path, header, host, and query parameter-based routing
  • Authentication: JWT Bearer and OpenID Connect support with dynamic policies
  • Traffic Control: CORS, rate limiting, timeouts, and load balancing
  • TLS/HTTPS: Certificate management with SNI support
  • MongoDB Storage: Persistent configuration with Change Streams for real-time updates
  • gRPC API: High-performance configuration distribution across gateway instances

Quick Start

Running with Docker Compose (Recommended)

git clone https://github.com/lqlive/sail.git
cd sail
docker-compose up -d

Access the Web UI at http://localhost:5173

Running Locally

Prerequisites:

  • .NET 9.0 SDK or later
  • MongoDB 4.4 or later
  • Node.js 18+ (for Web UI)

1. Start MongoDB

docker run -d -p 27017:27017 --name mongodb mongo:latest

2. Run the Management API

cd src/Sail
dotnet run

3. Run the Proxy Gateway

cd src/Sail.Proxy
dotnet run

4. Run the Web UI

cd web
npm install
npm run dev

Architecture

Web UI (React) → REST API → Sail Management API
                              ↓
                           MongoDB ← Change Streams → Sail Compass
                                                          ↓
                                                    Sail Proxy (YARP)

Project Structure

sail/
├── src/
│   ├── Sail/                 # Management API & gRPC services
│   ├── Sail.Core/            # Core domain models & interfaces
│   ├── Sail.Compass/         # Configuration subscriber & updater
│   ├── Sail.Proxy/           # Gateway runtime (YARP host)
│   └── Sail.Storage.MongoDB/ # MongoDB persistence layer
├── web/                      # React admin UI
└── shared/protos/            # gRPC service definitions

Technology Stack

  • Backend: .NET 9, ASP.NET Core, YARP
  • Storage: MongoDB with Change Streams
  • Communication: gRPC, REST API
  • Frontend: React 18, TypeScript, Vite, Tailwind CSS

How to engage, contribute, and give feedback

Some of the best ways to contribute are to try things out, file issues, and make pull-requests.

Reporting security issues and bugs

Security issues and bugs should be reported privately via GitHub Security Advisories.

Related projects

  • YARP - The reverse proxy foundation
  • MongoDB - Configuration storage with change streams
  • ASP.NET Core - Web framework

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

An API Gateway for building modern cloud-based applications. Built on YARP with dynamic configuration and real-time updates.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages