Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 129 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,129 @@
# Localbase
A self-host BaaS that help to shorten development time by creating backend feature in a GUI, similar to Firebase, Supabase, etc.
<div align="center">
<h1>Localbase</h1>

<div align="center">
<img height="200" src="./Lb-web/public/Localbase%20Logo.svg" />
</div>

<br>

[![CI checks](https://github.com/Arjuna-Ragil/Localbase/actions/workflows/CI-checks.yml/badge.svg)](https://github.com/Arjuna-Ragil/Localbase/actions/workflows/CI-checks.yml)
![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)
</div>


<div align="center">

![React Version](https://img.shields.io/badge/React-19-blue?style=for-the-badge&logo=react)
![Go Version](https://img.shields.io/badge/Go-1.25-blue?style=for-the-badge&logo=go&logoColor=white)
![Postgres](https://img.shields.io/badge/PostgreSQL-16-336791?style=for-the-badge&logo=postgresql)

>An open-source, self-hosted Backend-as-a-Service (BaaS) that flows in your local environment.
</div>

<br>

## 📝 About Project
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

## 💡 Features
> 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.

## 🛠️ TechStack
- 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

## 🛡️ Security & Isolation strategy
- SQL Injection Protection: Validate input field
- Project Isolation: Using table name prefix
- Tamper-proofing: ledger will be separated from postgres to avoid loosing data

## 🌱 Getting Started (Local Development / Use)

### Prerequisites
* Go 1.22+
* Node.js 20+
* PostgreSQL (Local or Docker)

### 1. Clone the Repository
```bash
git clone https://github.com/Arjuna-Ragil/Localbase.git
cd localbase
```

### 2. Create env
Place 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=
```

### 3. Run the system
Recommended to install make for easier run command
* For normal use case of the web, its recommended to run the whole docker:
```bash
docker compose up -d --build
```

* For developing the web, its recommended to run only the database docker:
```bash
# 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
```

## 🗺️ Roadmap
* [x] 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.

## 🤝 Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
### Made with 💙 and ☕ by Juna
Loading