https://github.com/eja/tabulita
A lightweight, zero-dependency, web-based SQLite manager and JSON API server embedded in a single Go binary.
https://github.com/eja/tabulita
admin api gui json sqlite web
Last synced: 19 days ago
JSON representation
A lightweight, zero-dependency, web-based SQLite manager and JSON API server embedded in a single Go binary.
- Host: GitHub
- URL: https://github.com/eja/tabulita
- Owner: eja
- License: gpl-3.0
- Created: 2026-01-10T09:51:40.000Z (24 days ago)
- Default Branch: main
- Last Pushed: 2026-01-11T10:43:48.000Z (23 days ago)
- Last Synced: 2026-01-11T15:31:53.652Z (23 days ago)
- Topics: admin, api, gui, json, sqlite, web
- Language: Go
- Homepage: https://eja.it
- Size: 392 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tabulita
A lightweight, self-hosted web interface for managing SQLite databases. Written in Go, it provides a robust, CGO-free solution for inspecting and modifying SQLite files through a modern, responsive web browser interface.
Designed for simplicity and portability, Tabulita serves as both a graphical user interface and a JSON API endpoint, making it an ideal tool for embedded systems, rapid prototyping, or lightweight database administration.
## Features
* **Database Management:** Create and drop tables; add columns dynamically.
* **Data Manipulation:** Full CRUD (Create, Read, Update, Delete) support for table rows.
* **Search:** Integrated search functionality across all columns in a table.
* **Security:** Optional HTTP Basic Authentication.
* **Responsive UI:** A clean interface built with Beer CSS and Material Design icons.
* **Zero Dependencies:** Built with `modernc.org/sqlite`, requiring no CGO or external C libraries. It compiles to a single static binary.
## Installation
### Building from Source
To build the application, clone the repository and run the provided Makefile:
```bash
git clone https://github.com/eja/tabulita.git
cd tabulita
make tabulita
```
This will generate the binary in the `build/` directory. For a statically linked binary suitable for minimal environments, run:
```bash
make static
```
## Usage
Start the server by pointing it to the directory containing your SQLite files:
```bash
./build/tabulita -file-path /path/to/your/databases
```
### Command Line Arguments
| Flag | Default | Description |
| :--- | :--- | :--- |
| `-file-path` | `.` | Path to the SQLite database or a directory of db files |
| `-web-host` | `localhost` | The interface to bind the web server to. |
| `-web-port` | `35248` | The port to serve the application on. |
| `-web-path` | `/tabulita/` | The HTTP path prefix for the interface. |
| `-web-auth` | *None* | Basic Auth credentials in `user:password` or Base64 format. |
| `-log` | `false` | Enable verbose logging. |
| `-log-file` | *None* | Path to a file for log output. |
Once running, access the interface at `http://localhost:35248/tabulita/`.
## API Documentation
Tabulita exposes a single endpoint (defaulting to `/tabulita/`) that accepts `POST` requests containing a JSON payload. The server determines the operation based on the `action` field.
### General Response Structure
All API responses follow this format:
```json
{
"success": true,
"data": { ... },
"error": "Error message if success is false"
}
```
#### Action: `list-rows`
Retrieves rows from a specific table.
**Request:**
```json
{
"action": "list-rows",
"table": "users",
"start": 0,
"stop": 19,
"query": "search_term_optional"
}
```
* **start**: The zero-based index of the first row to retrieve.
* **stop**: The zero-based index of the last row to retrieve.
**Response Data:**
```json
{
"tableName": "users",
"columns": [{"name": "id", "type": "INTEGER"}, ...],
"rows": [
{ "id": "1", "values": ["1", "John Doe", "admin"] }
],
"start": 0,
"stop": 19,
"totalRows": 154,
"totalPages": 8
}
```
### Table Operations
#### Action: `list-tables`
Lists all non-system tables in the database.
```json
{ "action": "list-tables" }
```
#### Action: `create-table`
Creates a new table with a primary key column.
```json
{
"action": "create-table",
"table": "new_table_name",
"col_name": "id",
"col_type": "INTEGER PRIMARY KEY AUTOINCREMENT"
}
```
#### Action: `add-column`
Adds a new column to an existing table.
```json
{
"action": "add-column",
"table": "users",
"col_name": "email",
"col_type": "TEXT",
"is_not_null": false
}
```
### Row Operations
#### Action: `add-row`
```json
{
"action": "add-row",
"table": "users",
"data": {
"username": "jdoe",
"email": "jdoe@example.com"
}
}
```
#### Action: `edit-row`
```json
{
"action": "edit-row",
"table": "users",
"rowid": "1",
"data": {
"email": "new_email@example.com"
}
}
```
#### Action: `delete-row`
```json
{
"action": "delete-row",
"table": "users",
"rowid": "1"
}
```