How pjungjs/consultly works
Consultly is a two-sided consultant-booking product: clients discover consultants, choose local-time slots, check out, and manage bookings; consultants maintain profiles and availability and manage sessions. The NestJS API owns booking, payment, identity, brief, and support rules, backed by PostgreSQL and external services. The AI service extracts PDF text and generates prep sheets or help replies. The graph combines sampled calls and explicit README architecture; unsampled features are included at their supported directory paths, with only documented or indexed relationships shown.
Main entry points: api.ts API client · main.py AI HTTP service · orders.service.ts Orders and booking rules · prisma.service.ts PostgreSQL
Components 27
Client and consultant web
- Web experience
web/app/page.tsx - Consultant discovery
web/app/consultants/page.tsx - Slot selection
web/app/consultants/[id]/slot-picker.tsx - Bookings and checkout
web/app/my-bookings/my-bookings.tsx - Consultant dashboard
web/app/dashboard/consultant-dashboard.tsx - Brief and prep sheet UI
web/app/brief-view.tsx - Help assistant UI
web/app/support-chat.tsx - API client
web/lib/api.ts
Booking API
- Consultant catalog and availability
api/src/consultants/consultants.service.ts - Profiles and availability settings
api/src/auth/profile.controller.ts - Orders and booking rules
api/src/orders/orders.service.ts - Passwordless identity and demos
api/src/auth/auth.service.ts - Brief management
api/src/briefs/briefs.controller.ts - Help gateway and AI budget
api/src/support/support.controller.ts - Payment webhook
api/src/stripe/stripe-webhook.controller.ts
Persistence and integrations
- PostgreSQL
api/src/prisma/prisma.service.ts - Stripe Checkout and refunds
api/src/stripe/stripe.service.ts - Email delivery
api/src/email/email.service.ts - Brief file storage
api/src/briefs/brief-files.ts
AI services
- AI HTTP service
ai/src/ai/main.py - PDF text extraction
ai/src/ai/pdf.py - Prep sheet generation
ai/src/ai/prep_sheet.py - Help topics and replies
ai/src/ai/support.py - Help topic content
ai/src/ai/help_topics.py
Other components
- Client or consultant
- Claude API
- Email provider
Connections 35
- Client or consultant → Web experience: uses
README.md - Web experience → Consultant discovery: browses
web/app/page.tsx - Consultant discovery → API client: loads listings
web/app/consultants/page.tsx - Consultant discovery → Slot selection: opens consultant
- Slot selection → API client: requests slots
- Slot selection → Bookings and checkout: starts booking
- Bookings and checkout → API client: manages bookings
- Consultant dashboard → API client: manages sessions
- Brief and prep sheet UI → API client: loads brief
- Help assistant UI → API client: sends messages
- API client → Consultant catalog and availability: API requests
README.md - API client → Orders and booking rules: API requests
README.md - API client → Passwordless identity and demos: API requests
README.md - API client → Brief management: API requests
README.md - API client → Help gateway and AI budget: API requests
README.md - Profiles and availability settings → PostgreSQL: reads and writes
api/src/auth/profile.controller.ts - Passwordless identity and demos → PostgreSQL: stores identity
api/src/auth/auth.service.ts - Passwordless identity and demos → Email delivery: sends sign-in link
api/src/auth/auth.service.ts - Consultant catalog and availability → PostgreSQL: reads catalog
- Orders and booking rules → PostgreSQL: persists orders
api/src/orders/orders.service.ts - Orders and booking rules → Stripe Checkout and refunds: creates checkout and refunds
api/src/orders/orders.service.ts - Orders and booking rules → Email delivery: sends booking notices
api/src/orders/orders.service.ts - Payment webhook → Stripe Checkout and refunds: verifies event
api/src/stripe/stripe-webhook.controller.ts - Payment webhook → Orders and booking rules: confirms payment
api/src/stripe/stripe-webhook.controller.ts - Brief management → Brief file storage: manages PDF files
api/src/briefs/briefs.controller.ts - Brief management → AI HTTP service: requests prep sheet
README.md - Help gateway and AI budget → AI HTTP service: forwards chat
api/src/support/support.controller.ts - AI HTTP service → PDF text extraction: extracts PDF text
ai/src/ai/main.py - AI HTTP service → Prep sheet generation: writes summary
ai/src/ai/main.py - AI HTTP service → Help topics and replies: handles support chat
ai/src/ai/main.py - Help topics and replies → Help topic content: uses topics
ai/src/ai/support.py - Prep sheet generation → Claude API: generates with
README.md - Help topics and replies → Claude API: answers with
README.md - AI HTTP service → Orders and booking rules: looks up user bookings
README.md - Email delivery → Email provider: delivers mail
README.md