kit·intermediate·updated 2026-07-13

LinkForge – Smart Link Management Kit

Shorten, organize, and share every link — self-hosted.

ReactGoTailwindCSS

A self-hosted link management platform — shorten URLs, organize them into collections, share publicly or with your team, and track click stats, all from a single React + Go app you run yourself.

Stack

  • React + TypeScript — Frontend UI built with Vite and styled with TailwindCSS.
  • Go — Single compiled backend binary — serves the API and, in production, the built frontend too.
  • SQLite / PostgreSQL — SQLite for zero-config single-file storage, or Postgres for a managed multi-user deployment.
  • Docker Compose — One-command deployment that wires the backend, frontend, and database together.

Features

  • Custom short links — Shorten URLs with your own custom slugs instead of random strings.
  • Collections & organization — Group related links into collections instead of one long flat list.
  • Public & team sharing — Share individual links or whole collections publicly, or keep them scoped to your team.
  • Click & usage stats — See how many times each link was opened, without wiring up a separate analytics tool.

Install

git clone https://github.com/yashthakur1/LinkForge.git linkforge
cd linkforge
docker-compose up -d

Environment

.env.example
LINKFORGE_MODE=prod
LINKFORGE_PORT=5231
LINKFORGE_DATA=./data
LINKFORGE_DRIVER=sqlite
LINKFORGE_DSN=./data/linkforge.db

Walkthrough

1. Run it with Docker (recommended)

Clone the repo and bring up the bundled docker-compose.yml — it builds the frontend and backend together and persists data to a local volume.

docker-compose up -d

2. Or run frontend and backend separately

No Docker? Install the frontend dependencies with pnpm and start the Vite dev server in one terminal, then run the Go backend in a second.

# Terminal 1 — frontend
cd frontend/web && pnpm install && pnpm dev

# Terminal 2 — backend
go run ./bin/slash/main.go --mode dev --port 8082

3. Build for production

Build the frontend, copy the static output into the backend's route directory, then compile a single Go binary that serves both.

cd frontend/web && pnpm build
cp -r dist ../../server/route/frontend/
go build -o ./build/linkforge ./bin/slash/main.go
./build/linkforge --mode prod

Gotchas

  • The dev frontend (Vite) and backend run on different ports — hitting the wrong one locally is the most common 'nothing loads' issue.
  • Production mode expects the frontend's built dist/ folder already copied into server/route/frontend/ — skip that step and the Go binary serves a 404 for the UI.
  • SQLite is the default driver; switch LINKFORGE_DRIVER to postgres and set LINKFORGE_DSN to a connection string for multi-user/production use.

Why not just build it yourself?

If you just need a single quick redirect link, this is overkill — collections, sharing, and stats add real setup (frontend build + Go binary + a database) for something a free URL shortener does in one click. This kit is for teams who want to own their link data.

Links

GitHub

License: Not specified — the source repo ships no LICENSE file. Confirm terms with the author before redistributing.

Got stuck, or want this shipped end-to-end for you? bitroot.club builds custom products for founders. →