Dashboard

← Back to Guides

Platform Overview

How BestPhuketGuide.com is structured, what each part does, and how bookings flow from customer to confirmation.

Three Apps, One Monorepo

The platform lives in a single pnpm monorepo with three apps deployed on Cloudflare:

🌐Public Siteapps/web

Customer-facing site at bestphuketguide.com. Tour listings, booking flow, Stripe checkout, booking confirmation page, and review submission. Built with TanStack Start on Cloudflare Pages.

⚙️Admin Dashboardapps/admin

This dashboard at admin.bestphuketguide.com. Manage tours, bookings, availability, reviews, coupons, marketing attribution, and platform settings.

🔌API Workerapps/api

Cloudflare Worker at api.bestphuketguide.com. All data access: tours, bookings, availability, payments, images, settings. Both the public site and admin talk to this API.

Infrastructure

🗄️Cloudflare D1

SQLite database — all bookings, tours, reviews, settings

🖼️Cloudflare R2

Object storage for tour images

💳Stripe

Online card payments with multi-currency support

💬WhatsApp Cloud API

Booking confirmations and tour reminders

📧Resend

Transactional email — confirmations and recovery

📊GTM + GA4

Analytics and conversion tracking

Booking Flow

Here's what happens from the moment a customer lands on your site to when they leave a review:

1

Customer discovers tour

Via Google Ads, Meta Ads, organic search. UTM parameters are captured automatically.

2

Selects date & guests

Availability calendar shows open slots. Add-ons (transfers, equipment) shown at checkout.

3

Payment

Stripe card (online), bank transfer (manual verify), or cash (pay on day). Deposit-only option available.

4

Booking confirmed

Status set to "confirmed". WhatsApp + email confirmation sent automatically.

5

Tour reminder

Sent the evening before (6 PM Phuket time) with what to bring and meeting point.

6

Tour day

Guide checks booking ref. You can mark attendance in admin if needed.

7

Review request

Sent 24 hours after the tour date. Customer submits review on your public site.

8

Review published

Appears on tour page after you approve it in admin → Reviews.

Key Admin Capabilities

Create and manage tours with images, itinerary stops, and add-ons
Set availability by date with per-date pricing
View all bookings — filter by status, tour, date
Process refunds and manually update booking status
Attribution dashboard — see which campaigns drive revenue
Ad spend tracker — log Google & Meta budgets
Coupon / promo code management
Review moderation — approve, reject, reply
WhatsApp notification configuration
Email template previews and test sending
Site settings — logo, contact info, analytics IDs
R2 image upload for tour photos

Environment Variables Reference

Set these in wrangler.toml (non-secret) and Cloudflare Worker Secrets (sensitive):

# Non-secret (wrangler.toml vars) ENVIRONMENT=production SITE_URL=https://bestphuketguide.com ADMIN_URL=https://admin.bestphuketguide.com # Secrets (wrangler secret put KEY) STRIPE_SECRET_KEY=sk_live_... STRIPE_WEBHOOK_SECRET=whsec_... RESEND_API_KEY=re_... WHATSAPP_ACCESS_TOKEN=EAAxxxxx... JWT_SECRET=your-random-secret
Tip: Run wrangler secret put STRIPE_SECRET_KEY to add secrets securely — never put live keys in wrangler.toml.

Related Guides