Skip to content

Commit 33bbb24

Browse files
committed
Add license and readme
1 parent be4066b commit 33bbb24

2 files changed

Lines changed: 103 additions & 0 deletions

File tree

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Joel Sequeira
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# SQLite Admin
2+
3+
SQLite Admin provides a lightweight web server to interact with a SQLite database. It allows you to:
4+
5+
- Browse tables and their schemas.
6+
- View table data along with adding filters, limits and offsets.
7+
- Modify individual columns in existing rows.
8+
9+
It can either by installed as a binary or embedded into an existing Golang backend as a library.
10+
11+
The web server can be interacted with by going to https://sqliteadmin.dev.
12+
13+
The source code for the web UI can be found at https://github.com/joelseq/sqliteadmin-ui
14+
15+
16+
## Motivation
17+
18+
SQLite is very easy to add as an embedded database but it's difficult to manage the database once it's deployed in an application.
19+
20+
Existing tools primarily focus on local SQLite files, requiring manual interaction through CLI tools or desktop applications. If your SQLite database is running embedded within an application, there are few (if any) solutions that let you inspect, query, and modify it without complex workarounds.
21+
22+
The alternative is to use a cloud-hosted version like those provided by [Turso](https://turso.tech/) which enables interacting with the database using tools like [Drizzle Studio](https://orm.drizzle.team/drizzle-studio/overview). This adds complexity to the setup and deployment of your application and you lose out on the value of having an embedded database.
23+
24+
This project fills that gap by providing an easy way to view and manage an embedded SQLite database via a web UI—no need to migrate to a cloud provider or use ad-hoc solutions.
25+
26+
## Installing as a binary
27+
28+
1. Using `go install`:
29+
30+
```bash
31+
go install github.com/joelseq/sqliteadmin-go/cmd/sqliteadmin@latest
32+
```
33+
34+
2. Using `go build` (after cloning the repository):
35+
36+
```bash
37+
make build
38+
```
39+
This will add the `sqliteadmin` binary to `/tmp/bin`
40+
41+
### Usage
42+
43+
In order to add authentication, the following environment variables are required: `SQLITEADMIN_USERNAME`, `SQLITEADMIN_PASSWORD`.
44+
45+
e.g.:
46+
```bash
47+
export SQLITEADMIN_USERNAME=user
48+
export SQLITEADMIN_PASSWORD=password
49+
```
50+
51+
Start the server
52+
53+
```bash
54+
sqliteadmin serve <path to sqlite db> -p 8080
55+
```
56+
57+
Your SQLite database can now be accessed by visiting https://sqliteadmin.dev and providing the credentials and endpoint (including port).
58+
59+
## Using as a library
60+
61+
Check out the `examples/` directory to see how to integrate it into an existing Golang backend.
62+
63+
You can also run the examples to test out the admin UI:
64+
65+
```bash
66+
go run examples/chi/main.go
67+
```
68+
69+
This will spin up a server on `http://localhost:8080`. You can then interact with your local server by going to `https://sqliteadmin.dev` and passing in the following credentials:
70+
71+
```
72+
username: user
73+
password: password
74+
endpoint: http://localhost:8080/admin
75+
```
76+
77+
> [!NOTE]
78+
> If you are seeing "An unexpected error occurred" when trying to connect, try disabling your adblock.
79+
80+
## Inspiration
81+
82+
The UI is heavily inspired by [Drizzle Studio](https://orm.drizzle.team/drizzle-studio/overview).

0 commit comments

Comments
 (0)