Amble Walking Tours
Internal Documentation

Amble Walking Tours — Training Manual

Role-based guides for administering the platform, creating tours, and managing vendor partnerships. Includes step-by-step procedures, troubleshooting, and a live view of system automations.

1

Active Tours

0

Active Vendors

0

Pending Inquiries

0

Open Review Flags

System Automations

These workflows run automatically. The list below reflects all workflows currently registered in the app — it updates when new workflows are added to trainingManualContent.js.

Verify Tour Coordinates on Create

Tour created (with stops)

Automatically verifies stop coordinates against Google Places API, researches and assigns documented historical sources via LLM web search, lints content for stop-name leaks and proximity-order violations, applies standard pricing by theme/duration, and syncs the tour to the Square catalog.

Verify stop coordinates (Google Places)Research & assign historical sources (LLM web search)Lint content (leaks, proximity order, source citations)Apply pricing rule (theme + duration)Sync to Square catalog

Verify Tour Coordinates on Update

Tour updated (stops with addresses)

When a tour is edited and any stop has an exact address, automatically geocodes the address against Google Places to pin the stop on the map. The address is authoritative and overwrites existing coordinates.

Geocode address-bearing stops via Google Places

Auto-Provision Tour IAP

Tour created (with stops)

Waits 3 minutes for coordinate verification and linting to complete, then automatically creates the App Store in-app purchase and generates the en-US localization.

Wait 3 min for verification & lintingCreate App Store IAP (publishTourIap)Generate en-US localization (generateTourIapLocalization)

Publish Tour IAP

Tour set to active (published)

When a tour becomes active, creates its App Store IAP and auto-generates the English (U.S.) localization, then validates it has a title and price. Tours missing required fields are flagged instead of failing silently.

Publish tour IAP (validate + create or flag)Generate en-US localization (≤35 char name, ≤55 char description)

Nightly Coordinate Verification

Scheduled — every night at 2:00 AM ET

Re-verifies all tours' stop coordinates against Google Places API and lints all tour content for stop-name leaks and proximity-order violations — a safety net ensuring precise map locations and sensible stop ordering.

Verify all tour coordinates (verifyTourCoordinates)Lint all tour content (lintTourContent)

Admin Access

Full system access. Admins manage users, billing, tour publishing, App Store IAPs, vendor subscriptions, and system-wide configuration. Admin role is required for all admin routes.

Tasks & Procedures

Troubleshooting

Non-admin user cannot access /admin

Admin routes require user.role === 'admin'. Verify the user's role in the User entity. Only admins can invite or promote other admins. Use base44.users.inviteUser(email, 'admin') to invite a new admin.

Nightly coordinate verification didn't fix a stop

The nightly workflow runs at 2 AM ET. If a stop still has wrong coordinates after the run, check /admin/review-flags — the stop was likely flagged for manual review (no Google Places match or low confidence). Resolve the flag manually with correct coordinates.

IAP not appearing in App Store Connect after tour creation

The Auto-Provision Tour IAP workflow waits 3 minutes then creates the IAP. Check the tour's iap_status field: 'created' = success, 'skipped_missing_data' = the tour is missing required fields (title, price), 'error' = check the function logs. Use the Tour Publish Status tool on the admin dashboard to retry.

Square payment succeeded but user has no tour access

Run the verifySquarePayment function with the payment ID to re-verify and grant access. Check the Purchase entity for the user's email to confirm the purchase record exists.

Automations

Nightly Coordinate Verification

Trigger: Scheduled — every night at 2:00 AM ET

Backend Functions (18)

backfillTourIapIds
cleanupOrphanIaps
createSquareCheckout
deleteAccount
deleteSquareCatalogItem
exportIapMetadata
getAdminDashboardData
grantFreeTourAccess
importIapLocalizationsFromCsv
importTourIapsFromCsv
listAppIaps
rebuildTrueCrimeTour
resetEmailLink
sendEmailLinkCode
unpublishTourIap
validateIapReceipt
verifyEmailLinkCode
verifySquarePayment

This manual is auto-generated from src/lib/trainingManualContent.js. When new workflows or backend functions are added to the app, update that file and the manual reflects the changes — no page edits needed. Live system stats (active tours, vendors, pending inquiries, open flags) update in real time from the database.