Introduction
Fluxbase is a lightweight, single-binary Backend-as-a-Service (BaaS) alternative to Supabase. It provides essential backend services including auto-generated REST APIs, authentication, realtime subscriptions, file storage, and edge functions - all in a single Go binary with PostgreSQL as the only dependency.
Why Fluxbase?
Section titled “Why Fluxbase?”Single Binary Deployment
Section titled “Single Binary Deployment”- Simple: Deploy one ~40MB binary or ~80MB container
- Fast: Starts in seconds, not minutes
- Portable: Runs anywhere Go runs
Minimal Dependencies
Section titled “Minimal Dependencies”- PostgreSQL Only: No Redis, no RabbitMQ, no additional services
- Self-Contained: Everything runs in one process
- Easy Operations: Less moving parts = less complexity
High Performance
Section titled “High Performance”- Efficient: Written in Go for maximum performance
- Scalable: Handle 1000+ concurrent connections
- Fast: Sub-millisecond response times
Developer Friendly
Section titled “Developer Friendly”- PostgREST Compatible: Use existing Supabase knowledge
- Auto-Generated APIs: Database tables become REST endpoints automatically
- TypeScript & Go SDKs: First-class support for modern development
Core Features
Section titled “Core Features”REST API
Section titled “REST API”Automatically generate CRUD endpoints from your PostgreSQL schema with PostgREST-compatible query syntax:
# Filter and selectGET /api/v1/tables/posts?published=eq.true&select=id,title,author(name)
# Order and paginateGET /api/v1/tables/posts?order=created_at.desc&limit=10&offset=20
# Complex queriesGET /api/v1/tables/posts?or=(status.eq.draft,status.eq.published)&author_id=eq.1Authentication
Section titled “Authentication”Built-in authentication with JWT tokens:
- Email/password authentication
- Magic link authentication
- Session management
- Protected endpoints
Realtime
Section titled “Realtime”WebSocket-based realtime subscriptions:
- PostgreSQL LISTEN/NOTIFY integration
- Channel-based subscriptions
- Presence tracking
- Broadcast capabilities
Storage
Section titled “Storage”File storage with access policies:
- Local filesystem or S3-compatible backends
- Bucket management
- Public/private access control
- Image transformations
Edge Functions
Section titled “Edge Functions”JavaScript/TypeScript function execution:
- HTTP-triggered functions
- Scheduled functions (cron)
- Database webhook triggers
- Deno runtime
Quick Comparison
Section titled “Quick Comparison”| Feature | Fluxbase | Supabase | Firebase |
|---|---|---|---|
| Deployment | Single binary (~40MB) | ~10 containers (~2GB) | Cloud only |
| Dependencies | PostgreSQL only | PostgreSQL + 5+ services | Proprietary |
| Self-hosting | ✅ Easy | ⚠️ Complex | ❌ No |
| REST API | ✅ Auto-generated | ✅ PostgREST | ✅ Auto-generated |
| Authentication | ✅ Built-in | ✅ GoTrue | ✅ Built-in |
| Realtime | ✅ WebSocket | ✅ WebSocket | ✅ WebSocket |
| Storage | ✅ Local/S3 | ✅ S3 | ✅ Cloud Storage |
| Functions | ✅ Deno | ✅ Deno | ✅ Cloud Functions |
| Background Jobs | ✅ Built-in | ✅ pg_cron (ext) | ❌ No |
| Open Source | ✅ MIT | ✅ Apache 2.0 | ❌ Proprietary |
Getting Started
Section titled “Getting Started”Prerequisites
Section titled “Prerequisites”- Go 1.22+ (for building from source)
- PostgreSQL 14+
Quick Install
Section titled “Quick Install”# Download the latest binarycurl -L https://github.com/fluxbase-eu/fluxbase/releases/latest/download/fluxbase-linux-amd64 -o fluxbasechmod +x fluxbase
# Or use Dockerdocker run -p 8080:8080 ghcr.io/fluxbase-eu/fluxbase:latest
# Or build from sourcegit clone https://github.com/fluxbase-eu/fluxbase.gitcd fluxbasemake build./fluxbaseYour First API
Section titled “Your First API”- Create a table in PostgreSQL:
CREATE TABLE posts ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), title TEXT NOT NULL, content TEXT, published BOOLEAN DEFAULT false, created_at TIMESTAMPTZ DEFAULT NOW());- Access your auto-generated API:
# Create a postcurl -X POST http://localhost:8080/api/v1/tables/posts \ -H "Content-Type: application/json" \ -d '{"title": "Hello World", "content": "My first post!"}'
# Query postscurl http://localhost:8080/api/v1/tables/posts?published=eq.trueThat’s it! Your API is ready.
Architecture
Section titled “Architecture”Fluxbase is built as a monolithic Go application with a modular architecture:
graph TB Client[Client Application]
subgraph Fluxbase ["Fluxbase (Single Binary)"] API[REST API Layer] RT[Realtime Engine]
Auth[Auth Service] Storage[Storage Service] Functions[Functions Runtime] DB[Database Layer]
API --> Auth API --> Storage API --> Functions API --> DB RT --> DB Auth --> DB Storage --> DB Functions --> DB end
PG[(PostgreSQL)] S3[S3/Local Storage]
Client --> API Client --> RT Fluxbase --> PG Storage --> S3Next Steps
Section titled “Next Steps”- Installation Guide - Set up Fluxbase in your environment
- Quick Start Tutorial - Build your first application
- Configuration Reference - Customize Fluxbase for your needs
- SDK Documentation - TypeScript SDK API reference
- SDK Guides - Learn how to use the TypeScript SDK
Community & Support
Section titled “Community & Support”- GitHub: github.com/fluxbase-eu/fluxbase
- Discord: discord.gg/fluxbase
- Twitter: @fluxbase
License
Section titled “License”Fluxbase is open source and released under the MIT License.