Backendify
š Open-source Backend as a Service (BaaS) ā Dynamic schema builder, instant REST APIs, authentication, row-level security, webhooks, workflows, and more. Self-hosted alternative to Firebase/Supabase. Built with FastAPI + React + PostgreSQL.
Install / Use
/learn @Auckfmine/BackendifyREADME
š Backendify
A self-hosted Backend-as-a-Service (BaaS) platform ā Build backends without writing backend code.
Backendify is an open-source alternative to Firebase/Supabase that you can run on your own infrastructure. Define your data schema through a visual UI, and get instant REST APIs with authentication, authorization, and real-time capabilities.
<p align="center"> <img src="screenshots/03-login.png" alt="Backendify Login" width="800" /> </p>šø Screenshots
Control Center Dashboard
<p align="center"> <img src="screenshots/04-control-center.png" alt="Control Center" width="800" /> </p>Project Overview
<p align="center"> <img src="screenshots/01-dashboard.png" alt="Project Dashboard" width="800" /> </p>Schema Builder
<p align="center"> <img src="screenshots/02-schema-builder.png" alt="Schema Builder" width="800" /> </p>Validation Rules
<p align="center"> <img src="screenshots/05-validations.png" alt="Validation Rules" width="800" /> </p>User Management
<p align="center"> <img src="screenshots/07-users.png" alt="User Management" width="800" /> </p>Authentication Providers
<p align="center"> <img src="screenshots/08-authentication.png" alt="Authentication" width="800" /> </p>Role-Based Access Control
<p align="center"> <img src="screenshots/09-rbac.png" alt="RBAC" width="800" /> </p>File Storage
<p align="center"> <img src="screenshots/06-file-storage.png" alt="File Storage" width="800" /> </p>Audit Logs
<p align="center"> <img src="screenshots/10-audit-logs.png" alt="Audit Logs" width="800" /> </p>Webhooks
<p align="center"> <img src="screenshots/11-webhooks.png" alt="Webhooks" width="800" /> </p>Workflows
<p align="center"> <img src="screenshots/12-workflows.png" alt="Workflows" width="800" /> </p>Schema Evolution
<p align="center"> <img src="screenshots/13-schema-evolution.png" alt="Schema Evolution" width="800" /> </p>Relationship Builder
<p align="center"> <img src="screenshots/14-relations.png" alt="Relations" width="800" /> </p>⨠Features
šļø Dynamic Schema Builder
- Create collections (tables) with a visual UI
- Support for multiple field types:
string,int,float,boolean,datetime,text,json - Define relationships:
belongs_to,has_many - Automatic migrations ā no SQL required
š Authentication & Authorization
- Admin Users: Console access for project management
- App Users: End-user authentication for your applications
- JWT access tokens + refresh token rotation
- API key authentication for server-to-server communication
- Row-level security policies
š”ļø Fine-grained Policies
- Per-collection, per-action access control (
create,read,update,delete,list) - Principal-based permissions:
admin_user,app_user,api_key,anonymous - Condition-based rules (e.g., "users can only edit their own records")
- Email verification requirements
š Advanced Querying
- Filtering:
?field=value,?field__gt=100,?field__contains=text - Operators:
eq,neq,gt,gte,lt,lte,contains,startswith,endswith,in,notin,isnull - Sorting:
?sort=-created_at,name(prefix with-for descending) - Pagination:
?limit=50&offset=0
š Data Explorer
- Browse, create, edit, and delete records
- Visual data management interface
- Export and import data
š Audit Logs
- Track all data changes automatically
- Filter by user, action, collection, date
- Compliance and debugging support
š Webhooks
- HTTP callbacks on data events
- Configurable per collection
- Retry with exponential backoff
ā” Workflows
- Automate actions on events
- Chain multiple operations
- Template variables for dynamic data
š Schema Evolution
- Track pending schema changes
- Apply migrations safely
- Version control for your schema
š Relations
belongs_to(many-to-one)has_many(one-to-many)- Query related data easily
šļø Views
- Virtual collections with joins
- Pre-filtered data
- Aggregations and computed fields
ā Validations
- Field-level validation rules
- Email, URL, regex, min/max, enum
- Custom error messages
š File Storage
- Upload and manage files
- Organize in folders
- Secure access control
š¤ App Auth
- End-user authentication
- Separate from admin auth
- JWT tokens with refresh
šļø Architecture
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Your Application ā
ā (React, Vue, Mobile, etc.) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Backendify API ā
ā āāāāāāāāāāāā āāāāāāāāāāāā āāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāā ā
ā ā Auth ā ā Data ā ā Schema ā ā Policies ā ā
ā ā /auth ā ā /data ā ā /schema ā ā /policies ā ā
ā āāāāāāāāāāāā āāāāāāāāāāāā āāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā PostgreSQL ā
ā (Dynamic tables per project/collection) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
š Quick Start
Prerequisites
- Docker & Docker Compose
1. Clone and Setup
git clone https://github.com/yourusername/backendify.git
cd backendify
cp .env.example .env
2. Start Services
docker compose up --build
3. Access
| Service | URL | |---------|-----| | Admin Console | http://localhost:5173 | | API Docs (Swagger) | http://localhost:8000/docs | | API (ReDoc) | http://localhost:8000/redoc |
4. Create Your First Project
- Register an admin account at http://localhost:5173/register
- Create a new project
- Use the Schema Builder to define collections
- Configure policies for access control
- Start using the REST API!
š API Reference
Authentication
Admin Authentication
# Register
POST /api/auth/register
{ "email": "admin@example.com", "password": "securepass" }
# Login
POST /api/auth/login
{ "email": "admin@example.com", "password": "securepass" }
# Returns: { "access_token": "...", "refresh_token": "..." }
App User Authentication (for your end users)
# Register app user
POST /api/projects/{project_id}/auth/register
{ "email": "user@example.com", "password": "userpass" }
# Login app user
POST /api/projects/{project_id}/auth/login
{ "email": "user@example.com", "password": "userpass" }
Data Operations
# List records (with filtering & sorting)
GET /api/projects/{project_id}/data/{collection}?published=true&sort=-created_at
# Get single record
GET /api/projects/{project_id}/data/{collection}/{id}
# Create record
POST /api/projects/{project_id}/data/{collection}
{ "title": "Hello World", "content": "..." }
# Update record
PATCH /api/projects/{project_id}/data/{collection}/{id}
{ "title": "Updated Title" }
# Delete record
DELETE /api/projects/{project_id}/data/{collection}/{id}
Advanced Filtering
| Operator | Example | Description |
|----------|---------|-------------|
| eq (default) | ?status=active | Equals |
| neq | ?status__neq=deleted | Not equals |
| gt / gte | ?price__gte=100 | Greater than (or equal) |
| lt / lte | ?price__lt=500 | Less than (or equal) |
| contains | ?name__contains=john | Contains substring |
| startswith | ?name__startswith=A | Starts with |
| endswith | ?email__endswith=@gmail.com | Ends with |
| in | ?status__in=active,pending | Value in list |
| notin | ?status__notin=deleted | Value not in list |
| isnull | ?deleted_at__isnull=true | Is null |
š§ Configuration
Environment Variables
| Variable | Description | Default |
|----------|-------------|---------|
| DATABASE_URL | PostgreSQL connection string | postgresql://... |
| JWT_SECRET | Secret key for JWT tokens | (required) |
| JWT_ALGORITHM | JWT algorithm | HS256 |
| ACCESS_TOKEN_EXPIRE_MINUTES | Access token TTL | 30 |
| REFRESH_TOKEN_EXPIRE_DAYS | Refresh token TTL | 7 |
| CORS_ORIGINS | Allowed CORS origins | * |
š ļø Development
Backend (FastAPI)
cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
alembic upgrade head
uvicorn app.main:app --reload
Frontend (React + Vite)
cd frontend
npm install
npm run dev
Run Tests
cd backend
pytest
š Project Structure
backendify/
āāā backend/
ā āāā alembic/ # Database migrations
ā āāā app/
ā ā āāā api/
ā ā ā āāā routes/ # API endpoints
ā ā ā āāā deps.py # Dependencies (auth, db)
ā ā āāā core/ # Config, security
ā ā āāā models/ # SQLAlchemy models
ā ā āāā schemas/
