How hafashproduction3/hafash works
The tree suggests Hafash is a photographer-focused business platform: photographers manage bookings, galleries, files, payments, portfolios, and professional connections, while clients view galleries and submit selections or reviews. The README only identifies a Next.js/Firebase starter, so product capabilities are inferred from route and module names. The graph highlights those domain areas; edges are limited to relationships visible in the supplied source index or excerpts, leaving unsampled page connections out.
Main entry points: firebase-admin.ts Firebase Admin · storage.ts Storage actions · webhook/route.ts Payment webhook · checkout/route.ts Safepay checkout
Components 27
Client experience
- Client galleries
src/app/gallery/[id]/page.tsx - Photo selections
src/app/album-selections/[id]/details/page.tsx - Review submission
src/app/actions/reviews.ts - Review form
src/components/gallery/ReviewFormSection.tsx
Studio operations
- Bookings
src/app/dashboard/bookings/[id]/page.tsx - Event management
src/app/events/[id]/manage/page.tsx - Studio portfolio
src/app/studio/[subdomain]/portfolio/page.tsx - Quotes
src/app/actions/quotes.ts
Plans and payments
- Plan definitions
src/lib/plans.ts - Subscription status
src/lib/subscription/status.ts - Safepay checkout
src/app/api/safepay/checkout/route.ts - Payment webhook
src/app/api/safepay/webhook/route.ts - Payment receipts
src/lib/email/sendPaymentReceipt.ts - Expiry reminders
src/app/api/cron/check-expiry/route.ts - Reminder email
src/lib/email/sendExpiryReminder.ts - Safepay service
src/lib/safepay.ts
Data and files
- Photographer drive
src/app/drive/page.tsx - Storage actions
src/app/actions/storage.ts - Storage provider
src/lib/storage/storage.ts - Cloudflare R2
src/lib/storage/r2.ts - Storage usage stats
src/lib/storage/stats.ts - Firebase client setup
src/firebase/init.ts - Firebase Admin
src/lib/firebase-admin.ts
Network and AI
- Photographer network
src/app/network/page.tsx - AI gallery highlights
src/ai/flows/photographer-ai-gallery-highlights.ts - Genkit runtime
src/ai/genkit.ts
Other components
- Client or visitor
Connections 25
- Client or visitor → Client galleries: views
- Client or visitor → Review form: submits
- Review form → Review submission: submits review
src/components/gallery/ReviewFormSection.tsx - Client or visitor → Photo selections: selects photos
- Storage actions → Subscription status: checks plan
src/app/actions/storage.ts - Storage actions → Storage usage stats: checks quota
src/app/actions/storage.ts - Storage actions → Storage provider: signs uploads
src/app/actions/storage.ts - Storage provider → Cloudflare R2: uses provider
src/lib/storage/storage.ts - Safepay checkout → Safepay service: creates payment
src/app/api/safepay/checkout/route.ts - Safepay checkout → Firebase Admin: verifies identity
src/app/api/safepay/checkout/route.ts - Safepay checkout → Plan definitions: reads plan
src/app/api/safepay/checkout/route.ts - Payment webhook → Safepay service: checks payment
src/app/api/safepay/webhook/route.ts - Payment webhook → Firebase Admin: activates plan
src/app/api/safepay/webhook/route.ts - Payment webhook → Plan definitions: reads plan
src/app/api/safepay/webhook/route.ts - Payment webhook → Payment receipts: sends receipt
src/app/api/safepay/webhook/route.ts - Subscription status → Plan definitions: reads definitions
src/lib/subscription/status.ts - Expiry reminders → Firebase Admin: reads accounts
src/app/api/cron/check-expiry/route.ts - Expiry reminders → Reminder email: sends reminder
src/app/api/cron/check-expiry/route.ts - AI gallery highlights → Genkit runtime: uses runtime
src/ai/flows/photographer-ai-gallery-highlights.ts - Bookings → Firebase Admin: persists bookings
- Event management → Storage actions: uploads media
- Photographer drive → Storage actions: manages files
- Studio portfolio → Client or visitor: presents studio
- Photographer network → Firebase Admin: stores network data
- Quotes → Firebase Admin: stores quotes