From f28ee5624d7b92a81d4e1ddfb185ea891ad1af1b Mon Sep 17 00:00:00 2001 From: Naser Mansour Date: Sat, 27 Dec 2025 00:09:03 +0200 Subject: [PATCH] update claude md with init --- CLAUDE.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 1a37d28..ca3b028 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -31,6 +31,12 @@ npm run build # Format PHP code vendor/bin/pint --dirty + +# Create new Volt component with test +php artisan make:volt pages/component-name --pest + +# Create model with migration and factory +php artisan make:model ModelName -mf ``` ## Architecture @@ -51,6 +57,10 @@ vendor/bin/pint --dirty - `docs/architecture.md` - Complete architecture document - `docs/stories/` - User story specifications +### Services +- `app/Services/AvailabilityService.php` - Calculates available time slots for bookings +- `app/Services/CalendarService.php` - Generates iCalendar files for consultations + ### Domain Model Core models in `app/Models/`: - **User** - Three types: `admin`, `individual` (client), `company` (client) @@ -134,6 +144,29 @@ test('profile can be updated', function () { }); ``` +### User Factory States +When testing, use these factory states: +- `->admin()` - Creates admin user +- `->individual()` - Creates individual client +- `->company()` - Creates company client +- `->client()` - Randomly creates individual or company +- `->deactivated()` - Creates deactivated user +- `->unverified()` - Creates user without email verification +- `->withTwoFactor()` / `->withoutTwoFactor()` - 2FA states + +### Notifications +Located in `app/Notifications/`: +- **Booking:** `BookingApproved`, `BookingRejected` +- **Consultation:** `ConsultationCancelled`, `ConsultationRescheduled`, `ConsultationReminder24h`, `ConsultationReminder2h` +- **Account:** `WelcomeAccountNotification`, `PasswordResetByAdminNotification`, `AccountReactivatedNotification`, `AccountTypeChangedNotification` + +### Business Rules +- **No self-registration:** Admin creates all client accounts +- **Single admin:** One lawyer manages the platform +- **No online payments:** All payments handled offline +- **Cascade deletes:** User deletion cascades to consultations, timelines, notifications +- **Bilingual required:** All user-facing text needs Arabic and English + ## Design Requirements (from PRD) - **Color scheme:** Dark Navy Blue (#0A1F44) + Gold (#D4AF37) - **Bilingual:** Arabic (primary, RTL) / English (LTR)