npm i -g pnpm)cd into it.pnpm install
cp .env.example .env.local
pnpm db:migrate
pnpm dev
| Role | Password | |
|---|---|---|
| Admin | admin@trovo.app | admin123 |
| Provider | provider@trovo.app | provider123 |
| User | user@trovo.app | user123 |
DATABASE_URL, AUTH_SECRET (≥16 chars), ENCRYPTION_KEY (64 hex chars), plus one of OPENAI_API_KEY / GOOGLE_AI_API_KEY.| Variable | Purpose |
|---|---|
DATABASE_URL | Neon PostgreSQL connection string |
AUTH_SECRET / AUTH_URL | NextAuth secret + base URL |
ENCRYPTION_KEY | 64 hex chars — node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" |
OPENAI_API_KEY / GOOGLE_AI_API_KEY | AI provider (at least one) |
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY / GOOGLE_MAPS_API_KEY | Maps JS + Geocoding |
STRIPE_* | Payments + subscriptions |
PAYPAL_* | Optional second payment method |
R2_* | Listing photo uploads |
RESEND_API_KEY | Email (stub-logs without it) |
Full descriptions: .env.example and the Environment Variables section in index.html.
NEXT_PUBLIC_* before the build).prisma migrate deploy.AUTH_URL + NEXT_PUBLIC_APP_URL to your domain and deploy.docs/DEPLOY.md.STRIPE_PRICE_* ids./api/webhooks/stripe with 6 events: checkout.session.completed, charge.refunded, customer.subscription.created/updated/deleted, invoice.payment_failed. Copy the secret to STRIPE_WEBHOOK_SECRET.stripe listen --forward-to localhost:3000/api/webhooks/stripe.PAYPAL_CLIENT_ID / PAYPAL_CLIENT_SECRET (+ public id).pnpm paypal:setup to create the catalog product + 4 Plan IDs (no dashboard UI for this)./api/webhooks/paypal and set PAYPAL_WEBHOOK_ID.app/globals.css (or white-label from the admin panel)NEXT_PUBLIC_APP_NAMElib/plans.ts; pricing → lib/subscription-plans.ts| Issue | Fix |
|---|---|
| App won't start / env error | DATABASE_URL, AUTH_SECRET, or ENCRYPTION_KEY missing/invalid. ENCRYPTION_KEY must be exactly 64 hex chars. |
Map shows RefererNotAllowedMapError | Add your domain (and localhost) to the public Maps key's HTTP-referrer restriction, and enable the Maps JavaScript API. |
| AI not responding | No valid OPENAI_API_KEY / GOOGLE_AI_API_KEY, or the per-user rate limit (10/hr) was hit. |
| Stripe webhook signature failure | STRIPE_WEBHOOK_SECRET doesn't match the endpoint. Re-copy it (CLI prints a different secret than the dashboard). |
| First build: "Can't reach database server" | Neon auto-suspended and cold-started. Retry / redeploy — it succeeds once the DB is awake. |
| Emails not sending | No RESEND_API_KEY set → email is stub-logged to the console. Add a key to send for real. |
| PayPal subscription button missing | The PAYPAL_PLAN_* ids are unset. Run pnpm paypal:setup and paste them in. |
Stuck on setup? Reach out — we're glad to help.
devsnack26@gmail.com