diff --git a/README.md b/README.md index cbec56a..ba3c13a 100644 --- a/README.md +++ b/README.md @@ -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. +
+

Localbase

+ +
+ +
+ +
+ + [![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) +
+ + +
+ +![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. +
+ +
+ +## πŸ“ 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