UptimeKitUptimeKit Docs

Development

Development guide and local setup for Uptimekit

Monorepo layout

apps/
	├─ web        # Next.js dashboard + public status pages
	├─ docs       # Documentation site
	└─ worker     # Background job runner / executors
packages/
	├─ server     # Better Auth config, TRPC routers, host-access helpers
	├─ db         # Drizzle schema + migrations
	└─ config     # Shared runtime types & constants

Getting started (development)

  1. Install dependencies:
npm install
pnpm install
yarn install
bun install
  1. Copy example env and edit values used by the Next.js app and packages:
cp apps/web/.env.example apps/web/.env.local # edit apps/web/.env.local and set DB connection, ADMIN_HOSTNAME, BETTER_AUTH_SECRET, etc.
  1. (Optional) Prepare the database and apply migrations:
npm run db:push
pnpm run db:push
yarn run db:push
bun run db:push
  1. Start the development server:
npm run dev
pnpm run dev
yarn dev
bun run dev

Visit your configured dashboard host (for local development we suggest you map dashboard.local to 127.0.0.1) rather than raw localhost.

Environment notes

The Next.js app (apps/web) centralizes environment configuration for shared packages. Duplicate apps/web/.env.example to apps/web/.env.local and set the following at minimum:

  • ADMIN_HOSTNAME — local admin host (e.g. dashboard.local:3000)
  • BETTER_AUTH_SECRET — secret for Better Auth cookies
  • DATABASE_URL — PostgreSQL connection string
  • CORS_ORIGIN — allowed origin for cross-origin requests

Other cookie-related flags such as BETTER_AUTH_COOKIE_SECURE and BETTER_AUTH_COOKIE_SAMESITE may be configured for different environments.

Development & validation

-- Use Biome for formatting and linting on changed files:

npx biome check --write
pnpm biome check --write
yarn dlx biome check --write
bunx biome check --write

Useful scripts

  • pnpm run dev — start the Next.js dev server
  • pnpm run db:push — sync Drizzle schema to configured DB
  • pnpm run db:studio — open Drizzle studio UI
  • pnpm biome check — lint/format changes

Contributing

Contributions are welcome. When contributing:

  • Open an issue describing the change or bug.
  • Follow the repo style: TypeScript strict mode, Zod for input validation, and Biome formatting.
  • Run pnpm biome check --write on changed files.

License

See the LICENSE file at the repository root for current license terms and usage restrictions. Review the license before using, redistributing, or operating the software.

On this page