Trovo

Discover. Plan. Go. — an AI-powered travel planning & booking SaaS: AI itinerary generator, multi-vendor tour marketplace, subscription billing, and a full admin panel in one Next.js app.

Next.js 16 TypeScript Prisma + PostgreSQL Stripe + PayPal OpenAI + Gemini

01Overview

Trovo is a production-ready travel platform. It combines an AI itinerary generator, a multi-vendor tour marketplace, subscription billing (Stripe + PayPal), and a full admin panel — all in a single Next.js 16 app.

Buyers deploy it three ways (or all at once):

Consumer trip planner

  • AI day-by-day itineraries
  • Maps, weather, packing lists, PDF export

Tour marketplace

  • Multi-vendor listings + bookings
  • Provider portal, reviews, payouts

White-label travel SaaS

  • Subscription plans + branding
  • Embed widget, admin control

What you get: full TypeScript source, this documentation + a quick-start guide, an admin panel, a provider portal, a marketing landing page, realistic demo content, and a Vercel deployment guide.

Live demo: trovo.devsnack.dev

02Features

AI Trip Planning

  • Streaming day-by-day itineraries
  • From destination, dates, budget, interests
  • Per-day refinement + packing lists
  • Weather (Open-Meteo) + Google Maps stops
  • PDF export

Tour Marketplace

  • Multi-vendor listings w/ photos & availability
  • Reviews, search, wishlist
  • Per-destination AI guide pages

Provider Portal

  • Listings, bookings, payouts
  • Profile & review management

Booking & Payments

  • Stripe + PayPal checkout
  • Platform commission split

Subscriptions & Billing

  • Free / Pro / Business plans
  • Plan feature gates
  • Per-user AI rate limiting

Trip Collaboration

  • Real-time presence (SSE)
  • Activity comments + edit-notify emails
  • Viewer / Editor roles

Admin Panel

  • Users, listings, bookings, billing
  • Settings, content, encrypted AI keys
  • Role-based access

Branding / White-label

  • Runtime brand override from admin
  • Logo, name, colors

SEO & Content

  • Blog + destination guides
  • Affiliate links (Booking.com / Skyscanner / GetYourGuide)
  • Embeddable trip widget
  • Newsletter w/ open & click tracking

03Architecture

LayerTechnology
FrameworkNext.js 16 (App Router, SSR)
UIReact 19, TypeScript (strict), Tailwind CSS v4, shadcn/ui
ORM / DBPrisma ORM + Neon PostgreSQL
AuthNextAuth v5 (credentials + Google OAuth)
AIVercel AI SDK → OpenAI GPT-4o + Google Gemini 1.5 Pro
Maps / WeatherGoogle Maps (@vis.gl/react-google-maps) + Open-Meteo
PaymentsStripe + PayPal
EmailResend + React Email
ImagesCloudflare R2 + sharp (WebP variants)
PDF / Rich textPuppeteer + Tiptap
Realtime / ChartsSSE (trip collaboration) + Recharts
DeployVercel · package manager pnpm

Project structure

app/          Next.js App Router — public, dashboard, admin, provider, API
components/   shadcn/ui-based UI components
lib/          Shared utilities & service clients (ai, plans, auth, paypal, …)
prisma/       schema.prisma + migrations
emails/       React Email templates
docs/         PRD, launch, Stripe & deploy playbooks
proxy.ts      Route protection (Next 16's renamed middleware)

Route protection (proxy.ts): /dashboard/* requires auth, /provider/* requires a verified provider, /admin/* requires admin/moderator (and /admin/settings|billing|languages require admin only).

04Database Setup

Trovo uses Neon PostgreSQL (serverless) with Prisma ORM — no extensions or pgvector required. The schema has ~30 models grouped by domain:

Auth

  • User, UserRole, Account, Session, VerificationToken

Marketplace

  • Provider, Listing, Booking, Payout, Review

Trips

  • Trip, TripCollaborator, ActivityComment, PackingList, Wishlist

Billing

  • Subscription, UsageRecord, PromoCode

Content

  • BlogPost, BlogCategory, Subscriber, EmailCampaign, Announcement

Settings

  • AdminSetting, Currency, Language, Translation, PageSEO, Notification
cp .env.example .env.local   # then fill DATABASE_URL etc.
pnpm db:migrate              # create + apply schema (or db:push for prototyping)
pnpm db:studio               # browse the database
The hosted demo database is fully populated — providers, listings, bookings, reviews, subscriptions, and promo codes — with no Lorem Ipsum or empty states.

05AI Provider Setup

Trovo ships with two AI providers, admin-switchable at runtime via AdminSetting.ai_provider (factory in lib/ai.ts):

At least one of OPENAI_API_KEY / GOOGLE_AI_API_KEY is required. Free-plan users get gpt-4o-mini; Pro/Business get gpt-4o.

Security: AI keys stored in AdminSetting are encrypted at rest with AES-256 (lib/encryption.ts). Every AI route is rate-limited to 10 requests/hour per user.

06Google Maps Setup

In the Google Cloud Console, enable both APIs:

Create two restricted keys (or reuse one):

Optional: create a custom Map Style and set NEXT_PUBLIC_GOOGLE_MAPS_MAP_ID for a branded dark map (required for Advanced Markers; falls back to legacy markers when empty).

07Authentication Setup

Auth is NextAuth v5 with email/password credentials and optional Google OAuth.

08Payments Setup

Stripe

checkout.session.completed     customer.subscription.created
charge.refunded                customer.subscription.updated
invoice.payment_failed         customer.subscription.deleted

Copy the signing secret into STRIPE_WEBHOOK_SECRET. Signatures are verified before any DB write. Local testing:

stripe listen --forward-to localhost:3000/api/webhooks/stripe

PayPal

PayPal supports bookings (Orders API) and recurring subscriptions (Billing Subscriptions API); Lifetime stays Stripe-only. There is no dashboard UI for subscription plans — run the bundled script:

pnpm paypal:setup     # creates the catalog product + 4 Plan IDs

Create a webhook at /api/webhooks/paypal (event list in .env.example) and set PAYPAL_WEBHOOK_ID. Set PAYPAL_ENV=live and re-run paypal:setup for production (sandbox Plan IDs don't work live).

09Image Uploads (Cloudflare R2)

Listing photos upload to Cloudflare R2; the server generates WebP variants with sharp.

R2's free tier includes 10 GB storage, 1M writes, 10M reads, and zero egress fees.

10Email Setup

Transactional + campaign email is sent via Resend (React Email templates). Used for booking confirmations, verify-email, password reset, newsletter campaigns, and trip-edit notifications.

11Environment Variables

All env vars are declared and validated with Zod in lib/env.ts; .env.example mirrors it with inline setup notes.

Required — the app won't boot without these: DATABASE_URL, AUTH_SECRET (≥16 chars), ENCRYPTION_KEY (exactly 64 hex chars), plus at least one of OPENAI_API_KEY / GOOGLE_AI_API_KEY.
VariableDescription
NEXT_PUBLIC_APP_URLPublic base URL (baked at build time)
NEXT_PUBLIC_APP_NAMEApp name shown in UI (default Trovo)
DATABASE_URLNeon PostgreSQL connection string — required
AUTH_SECRETNextAuth session secret — required
AUTH_URLNextAuth base URL (match the deploy domain)
ENCRYPTION_KEYAES-256 key, 64 hex chars — required
OPENAI_API_KEYOpenAI key (one AI key required)
GOOGLE_AI_API_KEYGoogle Gemini key (alternative)
GOOGLE_MAPS_API_KEYServer key — Geocoding API
NEXT_PUBLIC_GOOGLE_MAPS_API_KEYPublic key — Maps JavaScript API
NEXT_PUBLIC_GOOGLE_MAPS_MAP_IDOptional branded map style id
STRIPE_SECRET_KEY / NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYStripe API keys
STRIPE_WEBHOOK_SECRETStripe webhook signing secret
STRIPE_PRICE_PRO_MONTHLY|PRO_YEARLY|BUSINESS_MONTHLY|BUSINESS_YEARLY|LIFETIMEThe 5 Stripe price ids
PAYPAL_ENVsandbox (default) or live
PAYPAL_CLIENT_ID / PAYPAL_CLIENT_SECRETPayPal app credentials
NEXT_PUBLIC_PAYPAL_CLIENT_IDPayPal client id (browser SDK)
PAYPAL_WEBHOOK_IDPayPal webhook id (signature verification)
PAYPAL_PLAN_PRO_MONTHLY|PRO_YEARLY|BUSINESS_MONTHLY|BUSINESS_YEARLYThe 4 PayPal Plan ids (pnpm paypal:setup)
R2_ACCOUNT_ID / R2_ACCESS_KEY_ID / R2_SECRET_ACCESS_KEYCloudflare R2 credentials
R2_BUCKET_NAME / R2_PUBLIC_URLR2 bucket + public URL
RESEND_API_KEY / EMAIL_FROMResend key + from-address
RESEND_WEBHOOK_SECRETOptional — newsletter open/click tracking
GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRETGoogle OAuth (optional)
PUPPETEER_EXECUTABLE_PATHOptional — serverless Chromium for PDF export
Build-time note: all NEXT_PUBLIC_* vars are baked into the bundle at build time — set them in your host before building.

12Costs & Third-Party Services

Your purchase covers the Trovo source code only. Trovo is self-hosted software that connects to your own third-party accounts. Any usage, subscription, or per-transaction fees those services charge are billed to you and are not included in the purchase price. Most have a free tier to start; cost scales with usage.

At minimum Trovo needs three services — a PostgreSQL database, one AI provider key, and a Google Maps key. Everything else is optional and can be left disabled.

ServicePowersRequired?Cost model
OpenAI or Google GeminiAI itineraries, refinement, packing listsOne ofPay-as-you-go per request (your API key)
Google MapsMaps + geocodingYesFree monthly tier, then usage-based
PostgreSQL (Neon)Application databaseYesFree tier, paid for scale
Hosting (Vercel)Running the appYesFree tier, paid for production scale
Stripe & PayPalPayments & subscriptionsOptionalPer-transaction processing fees
Cloudflare R2Image storage / uploadsOptionalFree tier, usage-based beyond
ResendTransactional & campaign emailOptionalFree tier, usage-based beyond
Open-MeteoWeather forecastsOptionalFree — no key required
AI, payments, image uploads, and email can each be disabled independently — Trovo degrades gracefully when an optional integration isn't configured. See the FAQ.

13Customization Guide

Most of Trovo can be rebranded and managed without touching code, from the admin panel. Sign in with an admin account and open Admin → Settings or Admin → Branding. Changes apply at runtime — no redeploy needed.

1 · Site name, tagline & support email

2 · Logos & favicon

3 · Brand colors

Defaults are Trovo teal #17cfb6 and amber #faa52e. The same design tokens also live in app/globals.css as --primary / --accent if you prefer to bake brand colors in at build time.

4 · Social links & footer

5 · Content — all editable in the admin panel

Needs code: only fonts and structural page layout are set in code (app/globals.css and the app/ routes). Everything above — name, logos, colors, socials, and content — is admin-configurable at runtime.

14Managing Your Platform

The admin panel at /admin is where you run the business day to day. Sign in with an Admin account. Here's each area and what it's for:

Admin areaWhat you do there
DashboardAt-a-glance revenue, users, bookings, and growth charts.
UsersView, search, change roles, and suspend accounts.
ProvidersReview and approve / verify vendors who apply to sell tours.
ListingsModerate marketplace tour listings (approve, hide, remove).
BookingsSee every booking and its status; handle cancellations / refunds.
ReviewsModerate customer reviews and provider replies.
RevenueAnalytics dashboard with CSV export.
PayoutsTrack what each provider is owed after your platform commission.
Promo codesCreate and manage discount codes.
BlogPublish SEO content with a rich-text editor.
NewsletterCompose and send email campaigns to subscribers.
AnnouncementsSite-wide banners for promos or notices.
LegalEdit the Terms of Service and Privacy Policy pages.
CurrenciesEnable currencies and set exchange rates / the default.
SEOPer-page meta overrides; clear cached AI destination guides.
BrandingLogos, social links, footer (see the Customization guide).
SettingsAI provider + encrypted API keys, marketplace commission %, maintenance mode, site identity & colors.

Common tasks

Roles at a glance

RoleCan do
AdminEverything, including the restricted Settings area (API keys, commission, maintenance).
ModeratorDay-to-day moderation — users, listings, bookings, reviews, content — but not platform Settings.
ProviderTheir own listings, bookings, payouts, and profile, in a separate /provider portal.
UserPlan trips, book tours, and manage their own account.

15Deployment

Trovo is built for Vercel.

PDF export on serverless: Puppeteer needs @sparticuz/chromium installed and PUPPETEER_EXECUTABLE_PATH pointed at its binary. See the full playbook in docs/DEPLOY.md.

16Production Checklist

#Action
1Set all environment variables in the host
2Apply migrations (prisma migrate deploy)
3Configure the Stripe webhook (6 events) + STRIPE_WEBHOOK_SECRET
4Set PAYPAL_ENV=live, run pnpm paypal:setup, set the PayPal webhook + PAYPAL_WEBHOOK_ID
5Set AUTH_URL + NEXT_PUBLIC_APP_URL to the real domain
6Add the production Google OAuth redirect URI
7Add the production domain to the Google Maps referrer restriction
8Verify the Resend sending domain

17Subscription Plans

PlanPriceHighlights
Free $0 3 AI itineraries/mo, GPT-4o-mini, weather + Google Maps, wishlist up to 10, browse & book marketplace tours
Pro $9/mo · $89/yr · $199 lifetime Unlimited AI itineraries, GPT-4o, PDF + packing-list export, up to 5 trip collaborators, embed widget, unlimited wishlist
Business $29/mo · $290/yr Everything in Pro + 20 collaborators + white-label branding + priority support

18Frequently Asked Questions

Does the purchase price include API and service costs?

No. You're buying the Trovo source code. AI (OpenAI / Gemini), Google Maps, payment processing, hosting, storage, and email run on your own accounts and are billed to you — see Costs & Third-Party Services. Most offer a free tier to start.

Can I turn off the AI features?

Yes. AI itineraries are optional. Without an AI key the planner is hidden and the rest of the platform — marketplace, bookings, content — works normally.

Can I run Trovo without Stripe / PayPal?

Yes. Leave the payment keys blank and checkout and subscriptions stay disabled. You can run Trovo as a pure trip planner or a free tour directory.

How do providers (vendors) get paid?

In v1.0 payouts are handled manually by the admin. Trovo tracks each provider's earnings minus your commission in Admin → Payouts; you pay them out via your own method. Automated instant payouts (Stripe Connect) are not part of v1.0.

What's the difference between Admin and Moderator?

Admins have full access including the restricted Settings area (API keys, commission, maintenance mode). Moderators handle day-to-day moderation — users, listings, bookings, reviews, content — but can't change platform settings.

How many users, listings, or providers can it handle?

There's no built-in cap — it scales with your database and hosting plan. The Free / Pro / Business plans only gate end-user features (AI usage, collaborators, and so on), not platform totals.

Is white-label / rebranding included?

Yes. Change the name, logos, colors, social links, and footer from the admin panel with no code — see the Customization guide.

Can I change subscription prices and plan limits?

Yes. Plan pricing and feature gates live in lib/subscription-plans.ts and lib/plans.ts; the payment products themselves are configured in your Stripe / PayPal dashboards.

Does it run on Windows?

You can develop on Windows, macOS, or Linux (Node 20+ and pnpm). Production runs on any Node host; Vercel is the documented target.

What support is included?

Setup help and bug fixes by email — devsnack26@gmail.com. Custom feature development isn't included.

19Changelog

VersionNotes
v1.1PayPal recurring subscriptions (Pro/Business monthly + yearly), trip collaboration (SSE presence + comments), embed widget, destination guides, affiliate links
v1.0Initial release — AI itinerary generator, tour marketplace, Stripe checkout + subscriptions, admin + provider portals, landing page, demo content

20Support

Questions, setup help, or bug reports? We're happy to help.

devsnack26@gmail.com