Admin Guide

The PubCrawl admin panel is the control center for your entire pub crawl & nightlife tour booking marketplace. It lives under /admin, with pages served from src/app/admin/(panel)/. Access requires signing in at /admin/login; the panel layout is wrapped by license and (on the desktop build) PIN gates before any section renders. The sidebar is grouped into Overview, Bookings, Experiences, Marketing, Leads, Content, Notifications, Settings, and Configuration — this guide walks through each area exactly as it ships.

Signing In & Access Control

Path: /admin/login

  • Email + password sign-in with a "Remember me" option.
  • Authentication issues a JWT stored in an HttpOnly cookie (admin_token); the panel layout reads it on every request.
  • Authorization is enforced server-side by requirePermission(action, resource) on each API route — never by hiding menu items alone. A super role (e.g. VENDOR_ADMIN, SUPERADMIN) bypasses checks; other admin users carry a role_id whose role's permissions array (entries like settings:read, listings:update) decides what they can reach.
  • A License Gate wraps the panel: on non-development domains the panel only opens once the license is valid, and a warning bar appears when a license is inside its grace period. See Configuration → License below.
  • The desktop build adds a 4-digit PIN gate (local, SHA-256 hashed) for an extra lock screen.

Dashboard

Path: /admin/dashboard

The first screen after sign-in — an at-a-glance health check of the marketplace.

  • KPI cards — Net Revenue (all-time shown beneath), Bookings (with guest count), Average Booking Value (with pending count), and Customers (new in last 30 days).
  • Catalogue strip — published classes & experiences and Reviews (with average rating).
  • Period selector — This month / 3M / 6M / 12M.
  • Revenue line chart plus a 30-day pulse box (new bookings, new customers, pending items).
  • Lists — top experiences by revenue and a recent-bookings table (guest, experience, type, status, amount, date).
  • Quick links — Bookings, Classes & Experiences, Customers, Coupons, Theme Options.
Sub-page Path Shows
Revenue /admin/dashboard/revenue Revenue / Paid / Outstanding / Avg Booking Value, revenue-by-day line chart, payment-status donut, tax/discount breakdown, custom date range
Analytics /admin/dashboard/analytics Bookings, avg party size, seats sold, top experiences; bookings-over-time bar, bookings-by-status donut, custom date range
Activity /admin/settings/activity Audit trail of admin actions

Bookings

The cross-experience operational hub: the calendar, reservations, customers, and the discount/upsell tools that drive checkout.

Bookings

Path: /admin/bookings

Tabs with live counts — Total / Pending / Approved / Trash — over a filterable table. Columns: reference, booking (class title + type + session date), guest (name/email), party (adults + children), total, status, and payment. Filters include product-type and a "hide past" toggle.

Opening a booking shows an in-page detail with tabs Booking / Email Customer / Contract / Invoice. The Booking tab shows status and payment pills, guest and contact details, party and country, coupon, source, dietary and special requests, the price breakdown, and recorded payments. Side actions: Confirm, Mark completed, Cancel, Resend confirmation, Move to trash, Move booking (change the session/dates), add Notes, Record a payment, and Refund.

Calendar

Path: /admin/calendar

A month grid (Monday-based, 6 weeks) of upcoming sittings and seat availability, with prev/next/Today navigation. Each day cell shows event chips — a class starting, a class ending, or a blocked/imported day — and the selected-day panel lists the detail. A colour legend explains the chips.

Customers

Path: /admin/customers

The customer directory — the guests who book classes. Columns: name (with a Blacklisted badge when flagged), phone, email, tags, and status. Summary cards show Total / Active / Inactive / Blocked. Add at /admin/customers/new, edit at /admin/customers/[id]/edit.

Coupons

Path: /admin/coupons

Discount codes for checkout. Columns: code, discount (percent or fixed, with any max cap), scope (all / class / tour / dining), used (times / max), expiry, and status. The editor sets code, applies-to (optionally limited to specific listings), description, discount type and value, minimum spend, max discount, max uses, valid-from/until, and active.

Extras

Path: /admin/extras

Optional paid add-ons offered at checkout (e.g. a wine pairing). Columns: extra (name + description), price (with pricing-type label), offered-on (all / class / tour / dining), and status. The editor sets name, offered-on, description, pricing type (flat / per person / per night / per person-night), price, max quantity, sort order, and active.

Refunds

Path: /admin/refunds

The refund approval queue. A filter selects Needs action / All / Refunded / Rejected / Manual payout. Columns: refund (amount + percentage + policy + reason), booking (listing + reference), guest, initiated-by, requested date, and status (pending / approved / refunded / rejected / failed / refund_pending). Actions: Approve or Reject a pending request, and Mark paid for manual payouts. Approving either issues the refund via the payment gateway or queues a manual payout; a confirmation dialog explains each path. Seats are released back to the session when a booking is cancelled.

Booking Settings

Path: /admin/settings/booking

Booking-payment options. Deposits are chosen per listing (guests always pick the listing's deposit percentage or paying in full — there is no global toggle). The one setting here is the availability calendar's default view — Grid (month cards) or Timeline (rows of days). Cancellation/refund policies live under Experiences → Master Data → Cancellation Policies and per-listing.

Experiences

The classes themselves, their hosts, the "what's included" library, master data, and reviews.

Classes & Experiences

Path: /admin/listings

A filterable table of every listing (a class, tour, or dining experience). Columns: listing (thumbnail + city), owner (the host, or Admin for in-house listings), dates (session count), and status (published / draft / pending_approval / rejected). Summary stats show Total, Active, Pending review, and Draft. When a host submits a listing for review, admins get inline Approve / Reject actions.

Add Listing opens an in-page editor with tabs: Overview, Media, What's Included (amenities), Classification, Dates & Seats, Location (map + nearby places), and Reviews. The Dates & Seats tab manages the scheduled sessions (sittings) — each sitting carries its own price-per-seat, seat count, and optional private buyout. Money lives per-sitting, in minor units (cents).

Hosts

Path: /admin/hosts

The guide/host directory. Columns: host (avatar + business name + verified badge + email), owner, listings count, commission (override % or "default"), available balance, paid, open payouts, and status (active / pending / suspended). Summary cards show Total / Active / Pending / Suspended. Manage opens a host detail panel to review documents, adjust commission, and process payouts.

What's Included (Amenities)

Path: /admin/amenities

A two-level library of "what's included" items rendered on class pages. Level one is groups (title, subtitle, icon/image, order, active); drill into a group to manage its individual amenities. Both support bulk delete and an icon picker (with an optional image that overrides the icon).

Master Data

Path: /admin/master-data

Two tabs.

Master tables — the curated lookup lists that power the listing editor and the browse filters. Which tables exist depends on the active vertical pack: the pub crawl pack shows Crawl Themes, Crawl Formats and Pace; a cooking install shows Cuisines, Class Types and Skill Levels; a healthcare install shows Specialties, Conditions Treated and Appointment Types. Each table supports add / edit / reorder / activate, an icon picker and an optional 128×128 image.

Vertical packs — switch the whole business the install sells.

A pack bundles the master data, the vocabulary (Practitioner → Chef → Guide), the listing fields, the browse facets and the booking style for one kind of business. Pub Crawl & Nightlife Tours ships with the product as the active pack; add more packs beside it under src/product/verticals/.

Switching pack:

  1. Pick a pack and the panel shows a dry run first — how many master values will be deleted, how many listing links removed, how many listings lose their category, and how many new values arrive.
  2. If the install has bookings from real guests, that is called out explicitly. Setup-time switching is safe; switching a live marketplace is not something to do casually.
  3. Confirm by typing REPLACE.
  4. The taxonomy being replaced is snapshotted first. The last three snapshots are listed underneath with a one-click Restore.

What a switch never touches: customers, hosts, admin users, roles, settings and integration credentials. It changes what the site sells, not who is signed up to it.

From the command line:

Command What it does
npm run vertical:list List every pack and show which is active
npm run vertical:apply -- <pack> Dry-run a switch and print exactly what it would cost
npm run vertical:apply -- <pack> --yes Apply it
npm run vertical:demo -- <pack> Seed that pack's demo catalogue, with real Pexels imagery
npm run vertical:media Pre-fetch and cache demo imagery for every pack
npm run vertical:lint Audit all packs for internal consistency

Ratings & Reviews

Path: /admin/reviews

Cross-experience guest reviews. Columns: guest (avatar + location), on (class title + type), rating (stars), review comment, date, and status (Published / Hidden). Filters by type (class / tour / dining) and status. Actions: accept/deny to toggle publication, or delete. Reviews are published by default.

Marketing

Path: /admin/marketing/influencers

Manage affiliate / influencer partners: their accounts, referral performance, commissions, and payouts. Each influencer promotes classes through referral links; clicks, visits, bookings, and commissions are tracked and paid out from here.

Leads

Section Path Notes
Contacts /admin/leads/contacts Contact-form submissions; view marks as read; New/Read status
Enquiries /admin/leads/enquiries Class / general enquiries from the storefront
Newsletter /admin/leads/newsletter Newsletter subscribers; active/inactive; delete
Reported Issues /admin/issues Problems guests flag on a listing: type, comment, reporter, status (open / reviewing / resolved / dismissed)

Content (CMS)

The storefront is fully editable without touching code.

Section Path Editable content
Pages /admin/pages Custom/static pages: slug, title, subtitle, markdown content, image, banner, tags, SEO, per-language translations
Theme Builder /admin/theme-builder Header, footer, and menu templates for the active theme (schematic-preview cards; opens the block builder)
Hero Slider /admin/hero-slider Per-slide eyebrow, title + highlight, subtitle, desktop/tablet/mobile images, primary & secondary CTAs, sort order, active; drag-to-reorder
Menus /admin/menus Navigation menus (name, location, items); nestable menu items via parent_id
Blog /admin/blogs (+ /admin/blogs/categories) Posts: title, slug, category, author, excerpt, markdown content, featured image, tags, published; plus blog categories
Media Library /admin/media Uploaded media assets
FAQs /admin/faqs Category, question, answer, sort order, active
Gallery /admin/gallery Image/video items: title, type, category, tags, description, multi-image upload, SEO; drag-to-reorder
Testimonials /admin/testimonials Name, location, rating, message, photo, listing reference, sort order, active
Partners /admin/partners Name, logo, website URL, sort order, active; bulk logo import
About /admin/about About page: header, hero overlay, Our Story, values, team members, journey timeline, stats, SEO
Why Choose Us /admin/why-choose-us Section title/subtitle, main image, repeating icon/image + title + description items

Images uploaded anywhere in the CMS are optimized (typically to WebP) before being stored on Cloudflare R2 — see the Customization Guide for format/dimension settings.

Apps

Path: /admin/apps/branding

Branding and configuration for the optional desktop and mobile app builds: App Branding, Desktop App, and App Settings.

Notifications

Path: /admin/settings/notifications

The notification center plus transactional message templates per channel (Email, SMS, WhatsApp). Templates carry a name, category, channel, subject/preheader/from fields (email), and a body with {{token}} placeholders such as {{first_name}}, {{booking_reference}}, {{amount}}, {{otp}}, and {{dashboard_url}}. You can preview a template with sample data and send broadcasts to all users, a role, or specific recipients. A Delivery Log (/admin/settings/notification-log) records what was sent.

Configuration

/admin/settings/* (plus /admin/license) holds platform configuration. The most important screens:

Add-ons & Integrations

Path: /admin/settings/integrations

The add-ons and integrations hub. It lists every integration channel (payments, email, storage, analytics, video, plus premium channels) and every feature add-on. For each:

  • Connect a channel provider by entering its credentials — secrets are encrypted at rest on the server (integration_connections).
  • Toggle a connection active and mark one as primary per channel.
  • Activate/deactivate feature add-ons with a single toggle.

Add-ons ship built into the product. A premium add-on becomes usable only when it is entitled (covered by your license) and toggled on. If an add-on is not covered by your main license, you can unlock it by entering its purchase code on this screen — the code is validated and the entitlement is stored. See the Integrations Guide for the full model.

Theme Options

Path: /admin/settings/theme

A multi-tab panel controlling site identity (business name, legal name, description, logo, app icon, favicon), appearance (colors, fonts, gradients, header/footer/menu), homepage layout, image processing (format, quality, per-type dimensions), SEO, analytics IDs, localization defaults, authentication toggles, PWA, and custom code. Full details are in the Customization Guide.

Monetization & Subscription Plans

Section Path Notes
Monetization /admin/settings/monetization Revenue model (commission / subscription / hybrid) + default commission %, minimum payout, payout schedule, host-approval toggle
Subscription Plans /admin/settings/plans Host membership tiers: name, billing interval, price, max listings, featured slots, commission override, features, active

Languages & Localization

Path: /admin/settings/languages

Add languages (code, name, native name, flag, locale, script, LTR/RTL direction), set a default, and open the per-language translation editor for UI strings. Related localization screens: /admin/settings/countries, /admin/settings/locations, /admin/settings/currencies.

License

Path: /admin/license

The license is enforced by the License Gate wrapping the panel (component src/components/admin/LicenseGate.tsx), backed by POST/PATCH /api/v1/admin/license. On non-development domains the panel is locked until the domain license is activated; states include active, grace, unactivated, invalid, and expired. A grace-period bar warns before expiry, and the license can be re-verified from within Theme Options. On development/localhost hosts the license is bypassed.

Other settings

Group Paths
Notifications /admin/settings/notifications (send + templates for Email / SMS / WhatsApp), /notification-log
Access /admin/settings/users, /roles, /permissions
Developer /admin/settings/api-tokens, /webhooks, /api/docs/v1 (Scalar API reference)
Operations /admin/settings/backup (backup & restore), /activity (audit log)

© CreativeCape Solutions · creative-cape.com · support@creative-cape.com