Getting Started
Installation
Clone the repository, install dependencies, and get LinkDen running locally.
๐ป Installation
Get LinkDen running on your machine in under 5 minutes.
๐ Prerequisites
- Bun 1.3+ -- Grab it from bun.sh.
- Cloudflare account -- A free account is enough for development.
1. ๐ Clone and Install
git clone https://github.com/mrdemonwolf/linkden.git
cd linkden
bun installTip:
bun installhandles all apps and packages in the monorepo automatically.
2. โ๏ธ Environment Setup
Copy the example file:
cp .env.example .envRequired Variables:
| Variable | Description | Example |
|---|---|---|
BETTER_AUTH_SECRET | Secret key for sessions | openssl rand -base64 32 |
BETTER_AUTH_URL | API server URL | http://localhost:3000 |
CORS_ORIGIN | Web frontend URL | http://localhost:3001 |
NEXT_PUBLIC_SERVER_URL | Public API URL | http://localhost:3000 |
3. ๐๏ธ Database Setup
bun run db:pushThis creates the tables needed to run.
4. ๐ Start Dev Servers
bun run dev- ๐ Web App:
http://localhost:3001 - โ๏ธ API Server:
http://localhost:3000 - ๐ Docs:
http://localhost:3002
5. โ Verify It Works
- Visit:
http://localhost:3001/admin/setup. - Create Account: Enter your name, email, and password.
- Registration: The first user becomes the admin and registration locks automatically.
- Dashboard: You'll be redirected to the admin panel. You're all set!
Next Steps
- ๐ Quick Start -- Add your first links.
- โ๏ธ Configuration -- Deep dive into env vars.
- โ๏ธ Self-Hosting -- Deploy to Cloudflare.