Skip to content

Routes & APIs

Complete route and API endpoint mapping for the tripplan.ing application.

Public routes

Routes accessible without authentication (some may redirect to auth):

RouteMethodPurposeAuth
/GETEvent homepage — hero, content sections, event detailsNo
/scheduleGETDay-by-day agenda listNo
/schedule/[id]GETSchedule item detail — location, notes, galleryNo
/rsvpGET, POSTRSVP form — create new registrationNo
/rsvp/[id]GET, POSTEdit existing RSVPNo
/rsvp/[id]/payGETPayment step after RSVPNo
/payGETPayment page — expense cards and checkoutNo
/pay/successGETPost-checkout success landingNo
/pay/cancelGETPost-checkout cancellation landingNo
/authGET, POSTEmail OTP sign-inNo
/request-accessGET, POSTAccess request for non-allowed usersNo

Protected routes

Routes requiring a valid session (redirect to /auth if unauthenticated):

RouteMethodPurpose
/photosGETPhoto gallery — browse event photos
/photos/uploadGET, POSTUpload photos to the gallery
/documentsGETDocument list — download shared files
/pollsGETPoll list — view and vote
/polls/[id]GET, POSTIndividual poll — vote and see results
/profileGETUser profile — email, RSVP link, actions
/rsvpGET, POSTRSVP form (also in protected list)

Admin routes

Routes requiring session + email in adminEmails:

RouteMethodPurpose
/adminGETDashboard overview
/admin/settingsGET, POSTEvent settings management
/admin/rsvpsGETRSVP list with status breakdown
/admin/rsvps/[id]GET, POSTEdit individual RSVP
/admin/scheduleGET, POSTSchedule management
/admin/schedule/new-dayGET, POSTCreate schedule day
/admin/schedule/[dayId]/new-itemGET, POSTCreate schedule item
/admin/schedule/[id]GET, POSTEdit schedule item
/admin/announcementsGETAnnouncement list
/admin/announcements/newGET, POSTCreate announcement
/admin/announcements/[id]GET, POSTEdit/send announcement
/admin/paymentsGETPayment dashboard
/admin/pricing-tiersGET, POSTManage pricing tiers
/admin/pricing-tiers/newGET, POSTCreate pricing tier
/admin/add-onsGET, POSTManage add-ons
/admin/add-ons/newGET, POSTCreate add-on
/admin/contentGET, POSTContent section management
/admin/content/newGET, POSTCreate content section
/admin/content/[id]GET, POSTEdit content section
/admin/documentsGET, POSTDocument management
/admin/documents/newGET, POSTUpload document
/admin/photosGETPhoto moderation
/admin/pollsGET, POSTPoll management
/admin/polls/newGET, POSTCreate poll
/admin/polls/[id]GET, POSTEdit poll
/admin/peopleGET, POSTPeople and group management
/admin/people/new-personGET, POSTAdd person to allowed list
/admin/people/new-groupGET, POSTCreate group
/admin/custom-fieldsGET, POSTCustom field management
/admin/custom-fields/newGET, POSTCreate custom field

Platform routes

Routes requiring session + platform operator role:

RouteMethodPurpose
/platformGETPlatform dashboard
/platform/eventsGETEvent list
/platform/events/createGET, POSTCreate new event
/platform/events/[id]GET, POSTEvent detail and management
/platform/organizationsGETOrganization list
/platform/organizations/createGET, POSTCreate organization
/platform/usersGETUser management
/platform/auditGETAudit log

API endpoints

EndpointMethodAuthPurpose
/api/stripe/checkoutPOSTNoCreate Stripe checkout session
/api/stripe/webhookPOSTSignatureStripe webhook handler (payment reconciliation)
/api/photos/uploadPOSTSessionUpload photo to R2/filesystem
/api/photos/[...key]GETSessionServe photo through authenticated proxy
/api/documents/[...key]GETSession + permissionServe document with access check
/api/admin/refundPOSTAdminProcess payment refund
/api/paypal/checkoutPOSTNoCreate PayPal checkout order
/api/paypal/rsvp-checkoutPOSTSessionCreate PayPal checkout for RSVP payment
/api/paypal/webhookPOSTSignaturePayPal webhook handler (order capture + reconciliation)
/api/admin/refundPOSTAdminProcess payment refund
/api/admin/export/rsvpsGETAdminExport RSVP data
/api/admin/export/paymentsGETAdminExport payment data
/api/platform/*VariousOperatorPlatform management APIs

Stripe webhook flow

Stripe → POST /api/stripe/webhook
  → Verify signature (SubtleCryptoProvider)
  → Match checkout session to payment record
  → Update payment status: pending → completed
  → Store payment intent and session IDs

PayPal webhook flow

PayPal → POST /api/paypal/webhook
  → Verify webhook signature (global PayPal credentials)
  → CHECKOUT.ORDER.APPROVED → capture order via PayPal API
  → PAYMENT.CAPTURE.COMPLETED → update payment status: pending → completed
  → Store capture ID on payment record

Photo proxy flow

GET /api/photos/events/{eventId}/{filename}
  → Verify session exists
  → Fetch from R2/filesystem
  → Stream response with correct content-type

Document proxy flow

GET /api/documents/events/{eventId}/{filename}
  → Verify session exists
  → Check document_permissions (email or group match)
  → Fetch from R2/filesystem
  → Stream response with correct content-type

Auth flow routes

GET  /auth              → Show sign-in form
POST /auth              → Send OTP email
POST /auth/verify       → Verify OTP, create session
GET  /request-access    → Show access request form
POST /request-access    → Submit access request

Released under the MIT License.