https://github.com/cloudkoonly/litesupabase
A lightweight, open source Supabase alternative.
https://github.com/cloudkoonly/litesupabase
authentication database restfulapi storage supabase
Last synced: about 2 months ago
JSON representation
A lightweight, open source Supabase alternative.
- Host: GitHub
- URL: https://github.com/cloudkoonly/litesupabase
- Owner: cloudkoonly
- License: mit
- Created: 2025-03-07T10:25:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-15T08:14:53.000Z (about 1 year ago)
- Last Synced: 2025-05-31T19:02:23.769Z (about 1 year ago)
- Topics: authentication, database, restfulapi, storage, supabase
- Language: PHP
- Homepage: https://www.litesupabase.com
- Size: 260 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LiteSupabase
`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.
[](https://php.net)
[](https://www.mysql.com)
[](https://opensource.org/licenses/MIT)
## ✨ Preview

## ✨ Features
- **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).
## 🚀 Quick Start
### Requirements
- PHP >= 8.2
- MySQL >= 5.7
- Composer
### Installation Steps
1. **Clone the Repository**
```bash
git clone https://github.com/cloudkoonly/litesupabase.git
cd litesupabase
```
2. **Install Dependencies**
```bash
composer install
```
3. **Configure Environment Variables**
Copy the example environment file and modify it for your setup.
```bash
cp .env.example .env
```
You will need to edit the following settings in your `.env` file:
- `DB_HOST`, `DB_PORT`, `DB_DATABASE`, `DB_USERNAME`, `DB_PASSWORD`
- `JWT_SECRET` (a secure, random string)
- `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET` (for Google login)
- `GITHUB_CLIENT_ID`, `GITHUB_CLIENT_SECRET` (for GitHub login)
4. **Initialize the Database**
Log in to your MySQL server, create a database, and import the `db.sql` schema.
```bash
# 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
```
5. **Configure Your Web Server**
Point your web server's (e.g., Nginx or Apache) document root to the project's `public` directory. Here is an example Nginx configuration:
```nginx
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;
}
}
```
## 🔑 Admin Panel
- **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!
## 📖 API Endpoints
All API endpoints are prefixed with `/api`.
### Auth Endpoints (`/api/auth`)
- `POST /signup`: Register a new user
- `POST /login`: Log in a user
- `POST /logout`: Log out a user (requires authentication)
- `POST /refresh`: Refresh an access token
- `POST /forgot`: Request a password reset
- `GET /user`: Get the current user's information (requires authentication)
- `GET /config`: Get public authentication configuration
### Third-Party Login Callbacks
- `POST /google/callback`: Google login callback
- `POST /github/callback`: GitHub login callback
## 🤝 Contributing
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.
## 📄 License
This project is licensed under the [MIT](LICENSE) License.