mantisbase
Lightweight BaaS with auto REST APIs, real-time DB, auth, and an admin dashboard in one binary.
1.1K
A lightweight, pluggable Backend-as-a-Service (BaaS) built in C++. Get instant REST APIs, authentication, and an admin dashboard in a single container.
docker run -d \
--name mantisbase \
-p 7070:80 \
mantisbase:latest
docker run -d \
--name mantisbase \
-p 7070:80 \
-v $(pwd)/data:/mb/data \
-v $(pwd)/public:/mb/public \
-v $(pwd)/scripts:/mb/scripts \
mantisbase:latest
services:
mantisbase:
image: mantisbase:latest
ports:
- "7070:80"
volumes:
- ./data:/mb/data
- ./public:/mb/public
- ./scripts:/mb/scripts
restart: unless-stopped
environment:
- MANTIS_JWT_SECRET=your-secret-key-here
Run with:
docker compose up -d
docker exec -it mantisbase mantisbase admins add [email protected] your_secure_password
Open http://localhost:7070/mb in your browser and log in with your admin credentials.
Use the admin dashboard to create tables and configure access rules, or use the API:
curl -X POST http://localhost:7070/api/v1/schemas \
-H "Authorization: Bearer <admin_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "posts",
"type": "base",
"fields": [
{"name": "title", "type": "string", "required": true},
{"name": "content", "type": "string"}
],
"rules": {
"list": {"mode": "public", "expr": ""},
"get": {"mode": "public", "expr": ""},
"add": {"mode": "auth", "expr": ""}
}
}'
MANTIS_JWT_SECRET - JWT secret key for token signing (required for production)/mb/data - Database files, logs, and uploaded files/mb/public - Static files to serve/mb/scripts - JavaScript extension scriptsThe container exposes port 80 internally. Map it to any host port:
docker run -d -p 8080:80 mantisbase:latest
docker run -d \
-p 7070:80 \
-e MANTIS_JWT_SECRET=your-secret \
mantisbase:latest \
mantisbase --database PSQL \
--connection "dbname=mantis host=postgres port=5432 user=postgres password=postgres" \
serve
latest - Latest stable release0.3.1 - Specific version tag0.3 - Version seriescurl http://localhost:7070/api/v1/entities/posts
curl -X POST http://localhost:7070/api/v1/entities/posts \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"title": "My Post", "content": "Hello World!"}'
curl -X POST http://localhost:7070/api/v1/entities/posts \
-H "Authorization: Bearer <token>" \
-F "title=My Post" \
-F "[email protected]"
MIT License © 2025 Allan K. Koech
Content type
Image
Digest
sha256:3d0cc7682…
Size
37.5 MB
Last updated
about 1 month ago
Requires Docker Desktop 4.37.1 or later.