Setting up BuzzTrip locally requires a handful of external services alongside the source code. BuzzTrip is a Turborepo monorepo, so a singleDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/jacobsamo/buzztrip/llms.txt
Use this file to discover all available pages before exploring further.
bun install at the root installs dependencies for all apps and packages at once — but you will need accounts for Convex (real-time backend), Clerk (authentication), Google Maps, and Mapbox before the app will run fully.
Prerequisites
Before cloning the repository, make sure you have the following installed and configured:- Node.js 18.x or higher — an
.nvmrcfile is included in the repo root for version pinning withnvm - Bun — the project’s package manager and runtime. Install from bun.sh
- Git
- Convex account — free tier available at convex.dev
- Clerk account — free tier available at clerk.com
- Google Maps API key — requires the Maps JavaScript API enabled in the Google Cloud Console
- Mapbox access token — from your Mapbox account dashboard
Setup Steps
Install all dependencies
Run a single install from the monorepo root. Bun workspaces will install dependencies for every app and package automatically:
Set up environment variables
Create a
.env.local file inside apps/web/. All variables are validated at startup via @t3-oss/env-nextjs — the app will fail to start if required values are missing.apps/web/.env.local
| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_CONVEX_URL | ✅ | Your Convex deployment URL |
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | ❌ | Clerk frontend API key |
CLERK_SECRET_KEY | ❌ | Clerk server-side secret key |
NEXT_PUBLIC_CLERK_SIGN_IN_URL | ✅ | Sign-in route (defaults to /sign-in) |
NEXT_PUBLIC_CLERK_SIGN_UP_URL | ✅ | Sign-up route (defaults to /sign-up) |
NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL | ✅ | Post-sign-in redirect (defaults to /app) |
NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL | ✅ | Post-sign-up redirect (defaults to /app) |
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY | ✅ | Google Maps JavaScript API key |
NEXT_PUBLIC_GOOGLE_MAPS_MAPID | ✅ | Google Maps map ID for styled maps |
NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN | ✅ | Mapbox public access token |
RESEND_API_KEY | ✅ | Resend API key for transactional email |
POLAR_ACCESS_TOKEN | ✅ | Polar access token for billing |
NEXT_PUBLIC_SENTRY_DSN | ❌ | Sentry DSN for error monitoring |
NEXT_PUBLIC_POSTHOG_KEY | ❌ | PostHog project API key |
NEXT_PUBLIC_POSTHOG_HOST | ❌ | PostHog ingest host |
Configure Convex
The Convex backend lives in Follow the interactive prompts to log in and select or create a Convex deployment. Once linked, the CLI will print your
packages/backend. Run the Convex dev CLI to link the package to your Convex project:NEXT_PUBLIC_CONVEX_URL — copy that into your apps/web/.env.local.You also need to set the Clerk webhook secret as a Convex environment variable so that user sync events work correctly:- In your Clerk dashboard, create a webhook pointing to
https://<your-convex-deployment>.convex.site/clerk-users-webhook - Copy the Signing Secret from Clerk
- In the Convex dashboard (or via
bunx convex env set), add:
Useful Commands
| Command | Description |
|---|---|
bun dev | Start all apps and the Convex backend in watch mode |
bun dev:web | Start @buzztrip/web and @buzztrip/backend only |
bun dev:admin | Start @buzztrip/admin and @buzztrip/backend only |
bun build | Build all apps and packages via Turborepo |
bun lint | Run ESLint across all packages + sherif for monorepo dependency checks |
bun format | Run Prettier on all .js, .ts, .md, and .mdx files |
bun clean:all | Remove all build artifacts and node_modules |
Monorepo Structure
BuzzTrip is organised as a Turborepo monorepo. Here is a high-level map of the repository:apps/web/
The primary Next.js 15 application. Contains both the public-facing landing
pages and the authenticated map editor at
/app.apps/admin/
A separate Next.js 15 admin dashboard. Read-only interface for managing
users and maps; access requires the
admin role in Clerk.packages/backend/
The Convex backend package. All database schema, server functions (queries,
mutations, actions), HTTP routes, and generated types live here.
packages/ui/
The shared component library built on shadcn/ui and Tailwind CSS v4. Import
components from
@buzztrip/ui in any app.