Open-Source API Gateway
A high-performance, minimalist API gateway built on Bun. It acts as a secure front door for your microservices — handling routing, authentication, and rate-limiting — configured entirely through a single .toml file.
Core principles
Bun's ultra-fast runtime and native Fetch API keep your gateway out of the critical path.
Built-in authentication, header masking, and configurable rate limiting at the edge.
Handles thousands of concurrent requests without session state or coordination overhead.
Your entire routing and auth infrastructure lives in a single .toml file.
Distribution
No Bun or Node.js installation required. Download the standalone executable for your OS.
| Platform | Architecture | Download |
|---|---|---|
| Windows | x64 | sentrygate.exe |
| Linux / macOS | x64 / arm64 | sentrygate |
Setup
Run SentryGate globally like nginx. Choose your platform:
# Move binary to your PATH
$ sudo mv ~/Downloads/sentrygate /usr/local/bin/sentry
# Make it executable
$ sudo chmod +x /usr/local/bin/sentry
# Start the gate
$ sentry start
PS> sentry start
Create sentrygate.toml in your project root:
# Maps to BaseConfig interface
[base]
logging = true
default_rate_limit = true
custom_rate_limit = false
# Maps to ServerConfig interface
[server]
port = 80
name = "SentryGate-Lagos-Instance"
ssl_enabled = false
# cert_path = "/path/to/cert"
# key_path = "/path/to/key"
# "root" → requests hit /users directly
[services.root]
target = "http://localhost:8000"
strip_prefix = false
auth_required = false # set true for SentryAuth shield
timeout_ms = 5000
rate_limit = 60
# Second service — demonstrates the Record structure
[services.api]
target = "http://localhost:8000"
strip_prefix = true
auth_required = true
Development
Prefer compiling the TypeScript source yourself? Bun required.
# Install dependencies
$ bun install
# Development mode
$ bun run src/index.ts
# Compile your own binary
$ bun build ./src/index.ts --compile --outfile sentrygate
Observability
SentryGate ships with a built-in health check and status reporter. Access it at:
Codebase