A very performant and light (2mb in memory) link shortener and tracker. Written in Rust and React and uses Postgres/SQLite.
Find a file
2025-01-29 19:34:22 -05:00
.github/workflows fix 2025-01-29 12:45:05 -05:00
.sqlx add admin setup token i love admin setup token 2025-01-27 22:32:49 -05:00
frontend fix session expiration 2025-01-29 15:43:34 -05:00
migrations add sqlite 2025-01-29 18:52:49 -05:00
readme_img readme 2025-01-29 01:29:27 -05:00
src add sqlite 2025-01-29 18:52:49 -05:00
test yolo commit 2025-01-27 16:14:55 -05:00
.env.example readme 2025-01-29 01:29:27 -05:00
.gitignore add sqlite 2025-01-29 18:52:49 -05:00
.preludeignore maybe this works now 2025-01-26 01:53:14 -05:00
API.md Add auth 2025-01-25 03:16:35 -05:00
build.sh readme 2025-01-29 01:29:27 -05:00
Cargo.lock add sqlite 2025-01-29 18:52:49 -05:00
Cargo.toml add sqlite 2025-01-29 18:52:49 -05:00
docker-compose.yml readme 2025-01-29 01:29:27 -05:00
Dockerfile bundle frontend too 2025-01-27 16:24:31 -05:00
README.md fix session expiration 2025-01-29 15:43:34 -05:00

SimpleLink

A very performant and light (6mb in memory) link shortener and tracker. Written in Rust and React and uses Postgres.

MainView

StatsView

Build

From Source

First configure .env.example and save it to .env

The project will not run withot DATABASE_URL set. (TODO add sqlite support)

#set api-domain to where you will be deploying the link shortener, eg: link.example.com, default is localhost:8080
git clone https://github.com/waveringana/simplelink && cd simplelink
./build.sh api-domain=localhost:8080
cargo run

On an empty database, an admin-setup-token.txt is created as well as pasted into the terminal output. This is needed to make the admin account.

Alternatively if you want a binary form

./build.sh --binary

then check /target/release for the binary named SimpleGit

From Docker

docker build --build-arg API_URL=http://localhost:8080 -t simplelink .
docker run -p 8080:8080 \
    -e JWT_SECRET=change-me-in-production \ 
    -e DATABASE_URL=postgres://user:password@host:port/database \ 
    simplelink

From Docker Compose

Adjust the included docker-compose.yml to your liking, it includes a postgres config as well.