# Self-hosting notes

This archive contains the complete source for **do they pacers?**.

## Recommended target

The project is already configured for a Cloudflare Workers-compatible runtime and a D1 SQLite database. Install dependencies with `pnpm install`, create a production build with `pnpm build`, and follow your provider's Worker deployment flow.

## Database

Bind a D1-compatible database as `DB`. The schema and generated SQL migrations are in `db/schema.ts` and `drizzle/`. The venue API also initializes the required table and fictional sample records on first use.

## Admin authentication

The included hosted version protects `/admin` using OpenAI Sites' forwarded ChatGPT identity headers. Before exposing the dashboard on another hosting service, replace `app/chatgpt-auth.ts` and the authorization check in `app/api/venues/route.ts` with your provider's server-side authentication.

Do not expose the write API without server-side authentication. Hiding the admin link is not sufficient protection.

## Maps

The built-in map-style view needs no API key. Direction buttons open Google Maps. If you prefer Mapbox or Google Maps embeds, add the provider's public token to your environment and replace `MapFallback` in `app/venue-finder.tsx`.

## Before launch

Remove or replace every venue marked `SAMPLE`; all included venues and contact details are fictional demonstration data.
