How drubixcage/kritya works
This is a travel-booking CRM for sales, charging, customer service, and administrators. Its central workflow is booking/lead intake, assignment and sales follow-up, transition to charging or support, and operational oversight; internal chat and user administration are parallel capabilities. The graph reflects the visible API-to-store and page-to-view relationships. Many client-to-API interactions are dynamic or absent from the available references, so those links are omitted rather than inferred.
Main entry points: store.ts CRM state and operations · page.tsx CRM workspace · LeadWorkspaceModal.tsx Lead workspace · SalesView.tsx Sales view
Components 27
CRM experience
- CRM workspace
src/app/page.tsx - Sales view
src/components/dashboard/SalesView.tsx - Charging view
src/components/dashboard/ChargingView.tsx - Customer service view
src/components/dashboard/CSView.tsx - Admin dashboard
src/components/dashboard/SuperAdminView.tsx - Internal chat
src/components/chat/InternalChatDrawer.tsx - Chat API
src/app/api/chat/route.ts - Email editor
src/components/common/RichTextEmailEditor.tsx - Agent performance
src/components/dashboard/AgentMonthlyPerformanceCard.tsx - Lead status display
src/components/common/StatusChip.tsx
Lead operations
- Lead workspace
src/components/leads/LeadWorkspaceModal.tsx - Booking intake
src/components/leads/LeadIngestionModal.tsx - Reservation details
src/components/leads/SimpleReservationView.tsx - Lead API
src/app/api/leads - Travelocase webhook
src/app/api/webhooks/travelocase/route.ts - Ticket API
src/app/api/tickets/route.ts - Charging API
src/app/api/charging/route.ts
CRM services
- CRM state and operations
src/lib/store.ts - Role permissions
src/lib/rbac.ts - Domain event bus
src/lib/event-bus.ts - Lead verification
src/lib/verification.ts - Email templates
src/lib/templates.ts - SMTP delivery
src/lib/smtp.ts - Seed and fallback data
src/lib/mock-data.ts
Administration
- User API
src/app/api/users/route.ts - User onboarding
src/components/users/CreateUserModal.tsx
Other components
- CRM staff
Connections 31
- CRM staff → CRM workspace: uses
- CRM workspace → Sales view: renders
src/app/page.tsx - CRM workspace → Charging view: renders
src/app/page.tsx - CRM workspace → Customer service view: renders
src/app/page.tsx - CRM workspace → Admin dashboard: renders
src/app/page.tsx - CRM workspace → Booking intake: renders
src/app/page.tsx - CRM workspace → Lead workspace: renders
src/app/page.tsx - CRM workspace → Internal chat: renders
src/app/page.tsx - Sales view → Lead status display: renders
src/components/dashboard/SalesView.tsx - Sales view → Agent performance: renders
src/components/dashboard/SalesView.tsx - Lead workspace → Lead status display: renders
src/components/leads/LeadWorkspaceModal.tsx - Lead workspace → Reservation details: renders
src/components/leads/LeadWorkspaceModal.tsx - Lead workspace → Email templates: renders
src/components/leads/LeadWorkspaceModal.tsx - Lead workspace → Email editor: uses
src/components/leads/LeadWorkspaceModal.tsx - Booking intake → Lead verification: checks sender
src/components/leads/LeadIngestionModal.tsx - Internal chat → Chat API: exchanges messages
- Booking intake → Lead API: submits booking
- CRM staff → Lead API: requests lead actions
- Travelocase webhook → CRM state and operations: updates CRM
src/app/api/webhooks/travelocase/route.ts - Lead API → CRM state and operations: reads and writes
src/app/api/leads/route.ts - Chat API → CRM state and operations: reads and writes
src/app/api/chat/route.ts - User API → CRM state and operations: reads and writes
src/app/api/users/route.ts - Ticket API → CRM state and operations: reads and writes
src/app/api/tickets/route.ts - Charging API → CRM state and operations: reads and writes
src/app/api/charging/route.ts - CRM state and operations → Role permissions: checks authorization
src/lib/store.ts - CRM state and operations → Domain event bus: broadcasts events
src/lib/store.ts - CRM state and operations → Email templates: renders email
src/lib/store.ts - CRM state and operations → Lead verification: uses verification
src/lib/store.ts - CRM state and operations → Seed and fallback data: loads fallback data
src/lib/store.ts - User API → User onboarding: serves onboarding
- CRM state and operations → SMTP delivery: sends email