LinkDen
Getting Started

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 nvm or fnm.
  • 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 linkden

Install Dependencies

Run pnpm install from the root of the monorepo. Turborepo and pnpm workspaces will handle installing dependencies for all apps and packages:

pnpm install

This installs dependencies for:

  • apps/web -- the Next.js frontend
  • apps/server -- the Hono API server
  • apps/docs -- this documentation site
  • packages/db -- Drizzle ORM schema and migrations
  • packages/ui -- shared shadcn/ui components
  • packages/validators -- shared Zod schemas
  • packages/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/.env

See 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:push

Start the Development Servers

pnpm dev

This 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

  1. Navigate to http://localhost:3001 -- you should see the public link page (empty by default).
  2. Navigate to http://localhost:3001/admin -- you should be redirected to the Clerk sign-in page.
  3. Sign in with the email address you configured in Clerk's allowlist.
  4. You should land on the admin dashboard.

Next Steps

  • Configuration -- Configure Clerk, Cloudflare, and all environment variables.
  • Deployment -- Deploy your instance to Cloudflare.

On this page