Files
libra/docs/tasks/11-2.md
T
Naser Mansour 0f9d12c3cf Prepare project for pipeline takeover: task tracker, UX doc, CLAUDE.md pointers
Adds docs/tasks/ (16 epics + 102 stories converted to task/subtask files with
statuses.md as the new status source of truth) and docs/ux-design.md
(retrospective design-system reference), and points CLAUDE.md at them.
docs/prd.md and docs/architecture.md are kept as BMAD wrote them; the legacy
docs/stories/, docs/epics/, docs/qa/gates/ and .bmad-core/ stay in place as
historical/traceability records, superseded but not deleted.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-27 22:02:23 +03:00

46 lines
2.0 KiB
Markdown

---
id: 11-2
title: 11-2 Public Booking Form with Custom Captcha
status: QA Review
date: 2026-09-27
parent: 11
---
## Description
As a website visitor, I want to request a consultation without creating an account, So that I can easily reach out to the lawyer for legal assistance. Full implementation history: docs/stories/story-11.2-public-booking-form.md
## Acceptance Criteria
- [ ] `/booking` route displays guest booking form for unauthenticated visitors
- [ ] Logged-in users redirected to `/client/consultations/book`
- [ ] Page uses public layout (`x-layouts.public`)
- [ ] Bilingual support (Arabic/English)
- [ ] Mobile responsive design
- [ ] Reuses existing `availability-calendar` Livewire component
- [ ] Shows available time slots (same as client view)
- [ ] Blocked/booked times not selectable
- [ ] Full name field (required, min 3 chars, max 255)
- [ ] Email field (required, valid email format)
- [ ] Phone field (required, valid format)
- [ ] Problem summary field (required, min 20 chars, max 2000)
- [ ] All fields have clear labels and validation messages
- [ ] Form follows Flux UI patterns
- [ ] Math-based captcha (e.g., "What is 7 + 3?")
- [ ] Question generated server-side, answer stored in session
- [ ] User must enter correct answer to submit
- [ ] Refresh button to get new captcha question
- [ ] Captcha validates before form submission
- [ ] Bilingual captcha labels
- [ ] Check if email has pending/approved booking for selected date
- [ ] If limit reached, show error message and prevent submission
- [ ] Clear error message explaining the limit
- [ ] Limit applies per email address per calendar day
- [ ] Maximum 5 booking attempts per IP per 24 hours
- [ ] Rate limit error shown if exceeded
- [ ] Step 1: Select date/time from calendar
- [ ] Step 2: Fill contact info + problem summary + captcha
- [ ] Step 3: Confirmation screen showing all details
- [ ] Step 4: Submit creates guest consultation (status: pending)
- [ ] Success message with instructions to check email