# Room Booking App — Spec
## Overview
A room booking system where users reserve time slots for meeting rooms, modify existing bookings, and cancel them. Multiple rooms exist, each with a defined max capacity. Double-booking is strictly prevented.
---
## Core Concepts
### Room
A bookable space with a name, location, maximum occupancy, and a set of amenities (projector, whiteboard, video conferencing, etc.). Rooms can be deactivated without losing their booking history.
### Booking
A reservation tying a user to a room for a specific time window. Every booking has a title, a start and end time, and a declared attendee count. Bookings are either confirmed or cancelled.
### User
A person who interacts with the system. Users are either members (can manage their own bookings) or admins (can manage all bookings and rooms).
---
## Rules & Constraints
### No Double-Booking
A room may only have one confirmed booking for any given moment in time. Overlapping reservations for the same room must be rejected. This is the system's most critical invariant.
### Time Slot Granularity
Bookings use 30-minute granularity. Start times must fall on the hour or half-hour. Minimum booking duration is 30 minutes. Maximum duration is configurable per room (default: 4 hours).
### Capacity Enforcement
Users must declare an attendee count when booking. The system rejects bookings where the declared count exceeds the room's capacity. The system does not track individual attendees — the count is self-reported.
### Timezone Handling
All times are stored and communicated in UTC. The user sees times converted to their local timezone. Each room has an associated timezone for display defaults.
---
## Booking Lifecycle
### Creation
A user selects a room, time window, and declares an attendee count. The system confirms the booking only if the room is available for that window and the capacity is not exceeded.
### Modification
A user can change the time, duration, room, or attendee count of an existing booking. The same availability and capacity rules apply. The booking retains its identity (same ID, references don't break). All changes are logged for audit.
### Cancellation
A user can cancel their own booking. The cancelled slot becomes immediately available. Cancelled bookings are retained for historical record — they are not deleted. No cancellation restrictions in v1.
### Permissions
- Members can create, modify, and cancel their own bookings.
- Admins can modify or cancel any booking, and manage rooms (create, edit, deactivate).
- Any member can book any active room. There is no per-room access control in v1.
---
## Availability & Discovery
Users should be able to:
- View all available slots for a specific room on a given date.
- Search across all rooms to find one that is free for a desired time window and meets a minimum capacity requirement.
- See availability update in near-real-time when other users book or cancel.
## Out of Scope (v1)
- Recurring / repeating bookings
- Calendar integrations (Google Calendar, Outlook)
- Approval workflows
- Waitlists
- Check-in / no-show detection
- Billing or cost allocation
- Native mobile app (responsive web only)
- Multi-tenant / multi-organization support
- Per-room access restrictions Room Booking App — Spec
Example SPEC.md for the "Build your first verified app" guide. Copy and drop into your project root.