Skip to content

[GF-FE-23] Build public day-pass booking page /book (no login required) #1118

Description

@yusuftomilola

Problem

Every booking on ManageHub requires a registered account. There is no public-facing booking page that a hub can share on their website or social media for walk-in day passes. The backend public booking endpoint (GF-BE-19) handles this without authentication but has no frontend page.

Proposed Solution

Create frontend/app/book/page.tsx as a public, unauthenticated booking page.

This page must be excluded from the authentication middleware. Check frontend/middleware.ts to ensure /book is listed as a public route.

Page flow (3 steps):

  1. Select a workspace — shows available workspaces as cards (only day-pass eligible types); member selects one and picks a date
  2. Your details — form fields: Full Name, Email Address, Phone Number
  3. Payment — shows booking summary (workspace, date, price) and a "Pay Now" button that calls POST /bookings/public/day-pass and redirects to the returned Paystack authorizationUrl

After payment, Paystack redirects to a confirmation URL. Create frontend/app/book/success/page.tsx showing a "Booking confirmed!" message.

Acceptance Criteria

  • frontend/app/book/page.tsx is publicly accessible without authentication
  • /book and /book/success are excluded from auth middleware in frontend/middleware.ts
  • Three-step flow (workspace → details → payment) implemented
  • "Pay Now" calls POST /bookings/public/day-pass and redirects to Paystack
  • frontend/app/book/success/page.tsx shows a confirmation message after redirect
  • Page is mobile-responsive and can be linked from external websites

Depends on: [GF-BE-19] Add public unauthenticated day-pass booking endpoint for walk-ins

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions