5. Feature Specification
Below is the full feature set, broken down into sub-features and acceptance criteria where useful.
5.1 User Registration & Authentication
| ID | Feature | Description | Priority |
|---|---|---|---|
| F1.1 | Email + password sign-up | Register with email and password; validation and duplicate check. | P0 |
| F1.2 | Email verification (optional for MVP) | Optional: send verification link; block full access until verified. | P1 |
| F1.3 | Login | Login with email and password; return JWT (access + optional refresh). | P0 |
| F1.4 | Logout | Invalidate session / token on client; optional token blacklist on server. | P0 |
| F1.5 | Password reset | “Forgot password” flow: email link or token to set new password. | P0 |
| F1.6 | Role selection at sign-up | On registration, user chooses “Customer” or “Service provider”; stored and used for permissions. | P0 |
| F1.7 | Protected routes | Frontend and API enforce auth; redirect unauthenticated users or return 401. | P0 |
5.2 Service Provider Profile & Onboarding
| ID | Feature | Description | Priority |
|---|---|---|---|
| F2.1 | Business profile creation | After sign-up, provider completes: business name, type (barber/salon/other), short description, address (optional). | P0 |
| F2.2 | Profile image | Upload one profile/logo image; crop/resize to a standard size; store via chosen storage (see §9). | P0 |
| F2.3 | Edit profile | Update name, description, address, profile image anytime. | P0 |
| F2.4 | Public profile page | SEO-friendly page showing name, image, description, services, and reviews (when implemented). | P0 |
| F2.5 | Service list | Add/edit/delete services: name, duration (minutes), price (optional for “price on request”). | P0 |
| F2.6 | Business hours (weekly template) | Set default weekly hours (e.g. Mon–Fri 9–6, Sat 9–2); used to generate available slots. | P0 |
| F2.7 | Special dates (time off) | Mark specific dates as unavailable (holidays, leave); exclude from availability. | P1 |
5.3 Bank Account Connection (Payouts)
| ID | Feature | Description | Priority |
|---|---|---|---|
| F3.1 | Connect account (Stripe Connect) | Provider goes through Stripe Connect onboarding (Express or Standard); link business bank account. | P0 |
| F3.2 | Connection status | Show “Connected” / “Not connected” / “Pending” in dashboard; block card payments until connected. | P0 |
| F3.3 | Reconnect / refresh | If link expires or fails, allow provider to reconnect from dashboard. | P0 |
| F3.4 | Payout dashboard (basic) | Show balance and recent payouts (from Stripe); detailed history can link to Stripe Dashboard. | P1 |
5.4 Availability & Slots
| ID | Feature | Description | Priority |
|---|---|---|---|
| F4.1 | Slot generation rules | Slots derived from: business hours, service duration, existing bookings, and special-date exclusions. | P0 |
| F4.2 | Configurable slot length | Provider can set default slot length (e.g. 15 or 30 min); slots align to that grid. | P0 |
| F4.3 | Buffer between appointments (optional) | Optional gap (e.g. 5 min) between back-to-back appointments. | P1 |
| F4.4 | Availability API | API that, given provider + date (+ optional service), returns available time slots. | P0 |
| F4.5 | Override availability | Provider can ad-hoc block or open specific times (e.g. “open 2–4pm this Saturday”). | P1 |
5.5 Booking Flow (Customer)
| ID | Feature | Description | Priority |
|---|---|---|---|
| F5.1 | Discover providers | List/browse providers (search by name/location later); click through to provider profile. | P0 |
| F5.2 | Select service | On provider page, choose one service (name, duration, price). | P0 |
| F5.3 | Select date | Date picker; only allow dates that have at least one slot (based on F4). | P0 |
| F5.4 | Select time slot | Show available slots for chosen date; user picks one. | P0 |
| F5.5 | Booking summary | Show provider, service, date, time, price; option to add short note (e.g. “skin fade”). | P0 |
| F5.6 | Payment choice | Customer chooses Pay by cash (at appointment) or Pay by card (now). | P0 |
| F5.7 | Pay by cash | Confirm booking; no charge; booking marked “cash”; optional reminder close to appointment. | P0 |
| F5.8 | Pay by card | Redirect (or embed) Stripe Checkout/Payment Element; charge to platform or connected account; on success, confirm booking and send confirmation. | P0 |
| F5.9 | Booking confirmation | After booking: confirmation page and (optional) email with details; show in “My appointments”. | P0 |
| F5.10 | Require sign-in to book | Only logged-in customers can complete a booking (encourage sign-up or quick guest check-out later). | P0 |
5.6 Appointments Management
| ID | Feature | Description | Priority |
|---|---|---|---|
| F6.1 | Provider: list appointments | Dashboard list of upcoming and past appointments; filter by date/status. | P0 |
| F6.2 | Provider: mark as completed | Mark appointment as done (for cash bookings, no payment flow). | P0 |
| F6.3 | Provider: cancel appointment | Cancel with optional reason; free the slot; optional notification to customer. | P0 |
| F6.4 | Customer: list my appointments | “My appointments” with upcoming and past; show provider, service, date, time, status. | P0 |
| F6.5 | Customer: cancel appointment | Cancel within policy (e.g. up to 24h before); slot freed; refund policy if paid by card. | P0 |
| F6.6 | Customer: reschedule | Cancel current and create new booking for same provider/service (or “change date/time” flow). | P1 |
| F6.7 | Status lifecycle | States: pending, confirmed, completed, cancelled, no-show (no-show can be P1). | P0 |
5.7 Payments & Payouts (Technical)
| ID | Feature | Description | Priority |
|---|---|---|---|
| F7.1 | Stripe Connect integration | Use Connect so card payments can go to provider’s connected account (or platform then transfer). | P0 |
| F7.2 | Payment intent for booking | On “pay by card”, create PaymentIntent (or Checkout Session) linked to booking and connected account. | P0 |
| F7.3 | Webhooks | Handle payment_intent.succeeded, charge.refunded, etc.; update booking and send confirmation. | P0 |
| F7.4 | Refunds | Support full refund from dashboard or API when customer cancels within policy. | P0 |
| F7.5 | Payout schedule | Rely on Stripe’s default payouts to connected bank (e.g. rolling daily); document for providers. | P0 |
| F7.6 | Platform fee (optional) | Optional: retain a small percentage or fixed fee per transaction; configurable. | P1 |
5.8 Reviews & Ratings
| ID | Feature | Description | Priority |
|---|---|---|---|
| F8.1 | Leave a review | After appointment is completed, customer can submit a rating (e.g. 1–5) and optional text. | P0 |
| F8.2 | One review per completed appointment | Each completed appointment allows at most one review from the customer. | P0 |
| F8.3 | Display reviews on provider page | Show average rating and list of reviews (paginated) on public provider profile. | P0 |
| F8.4 | Provider sees reviews | Provider dashboard shows recent reviews and average rating. | P0 |
| F8.5 | Moderation (basic) | Optional: flag/hide inappropriate content; simple admin action (can be manual at first). | P1 |
5.9 Notifications (Minimal for March)
| ID | Feature | Description | Priority |
|---|---|---|---|
| F9.1 | Email: booking confirmation | Send email to customer after booking (and to provider if desired). | P1 |
| F9.2 | Email: cancellation | Notify when an appointment is cancelled. | P1 |
| F9.3 | In-app notifications | Optional: “You have a new booking” in provider dashboard. | P1 |
5.10 Platform & UX
| ID | Feature | Description | Priority |
|---|---|---|---|
| F10.1 | Responsive design | Usable on mobile and desktop (Next.js responsive layout). | P0 |
| F10.2 | Branding | Light blue and white colour scheme; consistent header/footer; logo/name SlotBook. | P0 |
| F10.3 | Error handling | Friendly error messages; API errors mapped to user-facing copy. | P0 |
| F10.4 | Loading states | Skeletons or spinners for lists and booking flow. | P0 |
| F10.5 | SEO (basic) | Public provider pages have meta title/description. | P1 |