Next.js + Supabase ~8 Hours Intermediate

What You Are Building

Build a workspace-based meeting room booking system where teams reserve shared rooms without double-booking conflicts.

This project teaches

  • Next.js dashboard pages
  • Supabase relational schema
  • Conflict validation
  • Calendar or schedule views
  • Role-based actions
  • Server-side permission enforcement
Flow Design

Booking Workflow

flowchart TD
    Login[User logs in]
    Workspace[Selects workspace]
    Booking[Opens Meeting Room Booking]

    Login --> Workspace --> Booking

    Booking --> Owner[Owner Flow]
    Booking --> Admin[Admin Flow]
    Booking --> Member[Member Flow]

    Owner --> OwnerRooms[Configure rooms across owned workspaces]
    OwnerRooms --> OwnerUsage[Review booking usage]
    OwnerUsage --> OwnerAudit[Audit conflicts and overrides]

    Admin --> AdminRooms[Manage assigned workspace rooms]
    AdminRooms --> AdminQueue[Review booking queue]
    AdminQueue --> AdminAction[Confirm, update, or cancel booking]
    AdminAction -. cannot access another workspace .-> AdminBlocked[Blocked by workspace permission rules]

    Member --> MemberBrowse[Browse available rooms]
    MemberBrowse --> MemberSelect[Choose date and time]
    MemberSelect --> MemberSubmit[Submit booking request]
    MemberSubmit --> MemberTrack[Track confirmed or cancelled status]
    MemberSubmit -. overlapping booking denied by backend validation .-> MemberConflict[Conflict message shown]
Status Workflow

Booking States

stateDiagram-v2
    [*] --> Requested
    Requested --> Confirmed: approved or auto-confirmed
    Requested --> Cancelled: rejected or cancelled
    Confirmed --> Completed: meeting finished
    Confirmed --> Cancelled: booking cancelled

Required Screens

Room Booking Dashboard

Should show:

  • Room list with capacity, amenities, and current status.
  • Booking calendar or agenda list.
  • Filters by room, date, and status.
  • Counts for requested, confirmed, cancelled, and completed bookings.
  • Permission-aware actions by role.
  • Loading, empty, no-result, and error states.

Create Booking Form

Fields:

  • Room selection.
  • Meeting title.
  • Date.
  • Start time and end time.
  • Attendee count.
  • Optional notes.
  • Conflict validation before submission completes.

Booking Detail Page

Should include:

  • Full booking information.
  • Room information and workspace details.
  • Status history.
  • Edit or cancel actions for allowed roles only.
  • Unauthorized or missing booking handling.

Room Management

Should include:

  • Create or edit room name, capacity, location, and amenities.
  • Disable room temporarily for maintenance.
  • Prevent deletion when active future bookings exist.

Data Model

Recommended tables:

TablePurpose
meeting_roomsRoom records by workspace.
room_bookingsBooking records.
workspace_membersRole and access checks.
workspacesWorkspace records.

Recommended room_bookings fields:

FieldPurpose
workspace_idWorkspace relation.
room_idSelected meeting room.
titleMeeting title.
booking_dateReservation date.
start_timeMeeting start.
end_timeMeeting end.
statusRequested, confirmed, cancelled, completed.
created_byUser who created booking.

Validation Rules

  • Booking date, start time, and end time are required.
  • End time must be after start time.
  • The same room cannot have overlapping confirmed bookings.
  • Members must not be able to bypass room conflict validation by changing request payload manually.
  • Past-date booking should be blocked in the base project unless explicitly allowed.

Permission Rules

ActorAllowed
OwnerManage rooms and bookings in owned workspaces.
AdminManage rooms and bookings in assigned workspace.
MemberCreate and view bookings in the shared workspace.
Non-memberNo access.

Acceptance Checklist

  • Rooms are scoped by workspace.
  • Booking conflict validation prevents overlapping confirmed bookings for the same room.
  • Member can create booking only in assigned workspace.
  • Admin cannot manage another workspace's rooms or bookings.
  • Availability filters work correctly.
  • Cancelled bookings are clearly shown and do not block future valid reservations.