Commit Graph

2 Commits

Author SHA1 Message Date
c48464ac97 feat: Event Creation & Management — Organizer Dashboard (42327b58)
Backend:
- POST /api/events — create event, validates title/date/venue required,
  rejects past dates (Asia/Jerusalem aware), returns compliance_checklist flag
  when max_guests >= 100
- GET /api/events — list organizer events (scoped by JWT), paginated (limit 20),
  enriched with rsvp_confirmed/pending/total + vendors_confirmed counts,
  sorted by event_date ASC
- GET /api/events/:id — single event with RSVP + vendor counts
- PUT /api/events/:id — COALESCE update, validated status transitions
  (draft→published/cancelled, published→cancelled/completed),
  ownership enforced; returns compliance_checklist flag when crossing 100 guests
- DELETE /api/events/:id — soft delete (deleted_at + status=cancelled), 204

Frontend:
- DashboardPage — real event list, EventCard grid, pagination, prominent
  empty state with "צור אירוע ראשון" CTA
- EventCard — title, date, venue, RSVP confirmed/total/vendors stats,
  progress bar (orange at 90%), days-until countdown, publish/edit/cancel actions
- CreateEventPage — full form: title, date+time picker (min=today),
  venue, kashrut, budget, guest count; compliance checklist appears when
  max_guests >= 100, dismissible; Hebrew validation errors
- EventDetailPage — full event detail with stat cards, days-until,
  read-only compliance checklist for 100+ events, quick-action links
- ComplianceChecklist — reusable: interactive (create/edit) or read-only
  (detail page); 4 Israeli compliance items, dismissible banner
- Button component: added asChild support via @radix-ui/react-slot
- App.tsx: routes for /events/new, /events/:id, /events/:id/edit

Build: 0 TS errors, 68 modules

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21 18:41:42 +00:00
c8909befb1 feat: Foundation — auth system, 9 migrations, React frontend
Backend:
- Express server with JWT httpOnly cookie auth
- POST /api/auth/register, /api/auth/login, /api/auth/logout, GET /api/auth/me
- bcrypt 12 rounds, generic 401 errors (no email/password field disclosure)
- Auth middleware protects all /api/* routes except register/login
- pg Pool database connection

Frontend (React + Vite + TailwindCSS + shadcn/ui):
- AuthContext with session restore on page load via /api/auth/me
- ProtectedRoute redirects unauthenticated users to /login
- LoginPage, RegisterPage — Hebrew RTL layout (dir=rtl), inline validation
- DashboardPage placeholder
- shadcn/ui components: Button, Input, Label, Card

Database:
- 9 migrations (001-009): extensions, users, events, vendors, guests,
  bookings, invitations, vendor_ratings, organizer_preferences
- pg_trgm for fuzzy Hebrew search, GIN indexes on style_tags
- Phase 2+3 fields included: source, payment_status, contract_value,
  vendor ratings 6-dimension, organizer preferences
- Idempotent migration runner with schema_migrations tracking table

Infrastructure:
- Dockerfile (multi-stage: build React → production node:20-alpine)
- docker-compose.yml with PostgreSQL healthcheck, expose not ports
- Migrations run automatically on container start

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21 18:22:42 +00:00