LiteSupabase is a lightweight, open-source alternative to Supabase, built with PHP and the Slim Framework. It aims to provide developers with a self-hostable, high-performance Backend-as-a-Service (BaaS) platform, including core features like authentication, database management, and file storage.
-
User Authentication
- Email and password registration/login.
- Stateless authentication using JWT (JSON Web Tokens).
- OAuth support for Google and GitHub.
- Access token refresh and password reset functionality.
-
Admin Dashboard
- An intuitive dashboard to manage users, databases, and storage.
- View and manage all registered users.
- Configure third-party authentication credentials.
- Provides API documentation and debugging tools.
-
Database Management
- Manage database tables directly from the admin panel.
-
File Storage
- Functionality for file uploads, downloads, and management.
- (Note: Storage-related API endpoints are currently under development).
- PHP >= 8.2
- MySQL >= 5.7
- Composer
-
Clone the Repository
git clone https://github.com/cloudkoonly/litesupabase.git cd litesupabase -
Install Dependencies
composer install
-
Configure Environment Variables Copy the example environment file and modify it for your setup.
cp .env.example .env
You will need to edit the following settings in your
.envfile:DB_HOST,DB_PORT,DB_DATABASE,DB_USERNAME,DB_PASSWORDJWT_SECRET(a secure, random string)GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET(for Google login)GITHUB_CLIENT_ID,GITHUB_CLIENT_SECRET(for GitHub login)
-
Initialize the Database Log in to your MySQL server, create a database, and import the
db.sqlschema.# Log in to MySQL mysql -u your_username -p # Create the database CREATE DATABASE litesupabase CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; # Import the table schema mysql -u your_username -p litesupabase < db.sql
-
Configure Your Web Server Point your web server's (e.g., Nginx or Apache) document root to the project's
publicdirectory. Here is an example Nginx configuration:server { listen 80; server_name your_domain.com; root /path/to/your/litesupabase/public; index index.php index.html; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000; # Or your PHP-FPM socket fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } location ~ /\.ht { deny all; } }
- URL:
http://your_domain.com/admin - Default Email:
admin@litesupabase.com - Default Password:
123456
Important: Please change the default admin password immediately after your first login!
All API endpoints are prefixed with /api.
POST /signup: Register a new userPOST /login: Log in a userPOST /logout: Log out a user (requires authentication)POST /refresh: Refresh an access tokenPOST /forgot: Request a password resetGET /user: Get the current user's information (requires authentication)GET /config: Get public authentication configuration
POST /google/callback: Google login callbackPOST /github/callback: GitHub login callback
Contributions of all kinds are welcome! Please feel free to open a GitHub Issue or Pull Request to report bugs, suggest features, or contribute code.
This project is licensed under the MIT License.
