Installation
Clone the LinkDen repository and install dependencies to get your local development environment running.
Installation
This guide walks you through setting up LinkDen on your local machine for development or preview before deploying to Cloudflare.
Prerequisites
Before you begin, make sure you have the following installed:
- Node.js 20+ -- Download from nodejs.org or use a version manager like
nvmorfnm. - pnpm 9+ -- LinkDen uses pnpm workspaces. Enable it via Corepack:
corepack enable && corepack prepare pnpm@latest --activate- Cloudflare account -- A free account at cloudflare.com is sufficient for development.
- Clerk account -- A free account at clerk.com for authentication.
Clone the Repository
git clone https://github.com/mrdemonwolf/linkden.git
cd linkdenInstall Dependencies
Run pnpm install from the root of the monorepo. Turborepo and pnpm workspaces will handle installing dependencies for all apps and packages:
pnpm installThis installs dependencies for:
apps/web-- the Next.js frontendapps/server-- the Hono API serverapps/docs-- this documentation sitepackages/db-- Drizzle ORM schema and migrationspackages/ui-- shared shadcn/ui componentspackages/validators-- shared Zod schemaspackages/infra-- Alchemy deployment configuration
Set Up Environment Variables
Copy the example environment files:
cp .env.example .env
cp apps/web/.env.example apps/web/.env
cp apps/server/.env.example apps/server/.envSee the Configuration guide for details on every environment variable.
Push Database Migrations
LinkDen uses Cloudflare D1 (SQLite) with Drizzle ORM. Push the schema to your database:
pnpm db:pushStart the Development Servers
pnpm devThis starts all apps in development mode via Turborepo:
- Web app --
http://localhost:3001 - API server --
http://localhost:8787 - Docs --
http://localhost:3002
Open http://localhost:3001 in your browser. The admin panel is accessible at /admin.
Verify the Installation
- Navigate to
http://localhost:3001-- you should see the public link page (empty by default). - Navigate to
http://localhost:3001/admin-- you should be redirected to the Clerk sign-in page. - Sign in with the email address you configured in Clerk's allowlist.
- You should land on the admin dashboard.
Next Steps
- Configuration -- Configure Clerk, Cloudflare, and all environment variables.
- Deployment -- Deploy your instance to Cloudflare.