Localbase is a Self-hosted Backend-as-a-Service (BaaS) that is similar to other BaaS like Firebase, Supabase, etc. The main focus is Self-host, developer can use this app to minimize work in creating and maintaining a database, storage bucket, AI, hosting, monitoring and private blockchain while keeping everything private in their own server, no third-party needed. There is also a private blockchain implemented to log every change in the app.
Target user: Developer, student, company owner
The current ready feature as of 21/01/2026
- 🔐 Secure Authentication: JWT-based auth with HttpOnly Cookies (XSS protected).
- 👑 Auto-Admin System: The first user to register automatically becomes the Super Admin. Subsequent users are standard Users.
- 🛡️ Middleware Protection: Role-based access control (RBAC) ready.
- 🏗️ Monorepo Architecture: Frontend and Backend live in harmony under one roof.
-
Frontend:
- Build tool: Vite
- Framework: React,
- Styling: tailwind, shadcn/ui
- Router: React Router
- Data Fetching: Axios, TanStack Query
-
Backend:
- Language: Golang
- Framework: Gin
- Main database: PostgresSQL
- Audit database: SQLite
- ORM/SQL: GORM + sqlx
-
Infrastructure:
- Deployment: Docker
- Demo and landing page host: self-host + Cloudflare
- SQL Injection Protection: Validate input field
- Project Isolation: Using table name prefix
- Tamper-proofing: ledger will be separated from postgres to avoid loosing data
- Go 1.22+
- Node.js 20+
- PostgreSQL (Local or Docker)
git clone https://github.com/Arjuna-Ragil/Localbase.git
cd localbasePlace in root folder
# Server Config
APP_ENV= -> local (default) / dev / production
APP_PORT=
API_PREFIX=
# Database Config
DB_HOST=
DB_PORT=
DB_USER=
DB_PASSWORD=
DB_NAME=
# Storage Path
STORAGE_PATH=
LEDGER_PATH=
# Middleware Config
AUTH_MODE= -> true / false
SECRET_KEY=
Recommended to install make for easier run command
-
For normal use case of the web, its recommended to run the whole docker:
docker compose up -d --build
-
For developing the web, its recommended to run only the database docker:
# database (Port 5432) docker compose up -d --build db # backend (Port 8080) make run_be # frontend (Port 5173) cd Lb-web npm ci npm run dev # make run_fe can also work
- Milestone 1: System Foundation (Auth, Repo Pattern, CI/CD).
- Milestone 2: Project Management (Create "Projects", API Keys).
- Milestone 3: Database Manager (Create Tables/Columns via UI).
- Milestone 4: Realtime Data & Storage.
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
This is my first ever "kinda" big project, so sorry if there is something wrong with the planning or my coding habit. I'm open for any type of critics :)