Deployment

TixCore runs entirely on free tiers: Supabase for database, auth, storage, and realtime; Netlify for hosting. No custom domain needed.

1. Create a Supabase project

  1. Create a project at supabase.com and pick a region near your users.
  2. From Project Settings → API, copy the URL, the anon key, and the service role key.
  3. From Project Settings → Database, copy the connection string (both pooled and direct).

2. Configure environment variables

Fill these in .env.local (and later in Netlify):

bash
NEXT_PUBLIC_APP_URL=https://your-app.netlify.app
NEXT_PUBLIC_SUPABASE_URL=https://YOUR-REF.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=...
SUPABASE_SERVICE_ROLE_KEY=...
DATABASE_URL=postgresql://...:6543/postgres?pgbouncer=true
DIRECT_URL=postgresql://...:5432/postgres
JWT_SECRET=$(openssl rand -base64 48)
ENCRYPTION_KEY=$(openssl rand -base64 32)
ENCRYPTION_KEY must decode to exactly 32 bytes. Generate it with openssl rand -base64 32. Changing it later makes previously stored gateway secrets unreadable.

3. Push the schema and seed

bash
npm install
npx prisma generate
npx prisma db push       # creates all tables
npm run db:seed          # optional: demo org + sample events

4. Enable auth providers

In Supabase Authentication → Providers, enable Email and (optionally) Google. For Google, create OAuth credentials in Google Cloud and add the redirect URL Supabase shows you.

5. Deploy to Netlify

  1. Push the repo to GitHub.
  2. In Netlify, “Add new site → Import an existing project”.
  3. Netlify detects Next.js; the included netlify.toml sets the build command and plugin.
  4. Add every variable from step 2 in Site settings → Environment variables.
  5. Deploy. Update NEXT_PUBLIC_APP_URL to the assigned Netlify URL and redeploy.

6. Go live

  • Connect your Razorpay gateway in Settings → Payments.
  • Create and publish an event with ticket types.
  • Copy the embed snippet into your site.
  • Point your Razorpay webhook at /api/v1/webhooks/razorpay.