How titung77/ai-b2b-platform works
This is a customer-support product: an organization configures a support widget in the web dashboard, embeds it on a site, and visitors can start a contact session and use chat or voice support. The repository also contains conversation management, files, billing, integrations, and Vapi plugin areas. Source evidence is limited to the README and indexed excerpts, so several documented or listed subsystems are shown without speculative call paths.
Main entry points: screens Widget screens · schema.ts Convex data · page.tsx Dashboard app · embed.ts Embed launcher
Components 21
Web dashboard
- Dashboard app
apps/web/app/(dashboard)/page.tsx - Authentication
apps/web/modules/auth/ui - Conversation management
apps/web/modules/dashboard/ui - Widget customization
apps/web/modules/customization/ui - Knowledge files
apps/web/modules/files/ui - Billing
apps/web/modules/billing/ui - Integrations
apps/web/modules/integrations/ui - Vapi plugin
apps/web/modules/plugins/ui
Customer widget
- Embed launcher
apps/embed/embed.ts - Widget app
apps/widget/app/page.tsx - Widget screens
apps/widget/modules/widget/ui/screens - Widget state
apps/widget/modules/widget/atoms/widget-atoms.ts - Vapi voice client
apps/widget/modules/widget/hooks/use-vapi.ts
Backend services
- Public contact sessions
packages/backend/convex/public/contactSessions.ts - Session lifecycle
packages/backend/convex/system/contactSessions.ts - Convex data
packages/backend/convex/schema.ts
AI support
- Support agent
packages/backend/convex/system/ai/agents/supportAgent.ts - Retrieval setup
packages/backend/convex/system/ai/rag.ts - Knowledge search
packages/backend/convex/system/ai/tools/search.ts
Other components
- Organization operator
- Website visitor
Connections 12
- Organization operator → Dashboard app: manages support
- Website visitor → Embed launcher: opens widget
- Embed launcher → Widget app: loads iframe
apps/embed/embed.ts - Dashboard app → Convex data: adds user
apps/web/app/(dashboard)/page.tsx - Widget app → Widget screens: starts widget
- Widget screens → Widget state: updates state
apps/widget/modules/widget/ui/screens/widget-auth-screen.tsx - Widget screens → Public contact sessions: creates session
apps/widget/modules/widget/ui/screens/widget-auth-screen.tsx - Public contact sessions → Convex data: writes session
packages/backend/convex/public/contactSessions.ts - Session lifecycle → Convex data: reads and updates
packages/backend/convex/system/contactSessions.ts - Support agent → Knowledge search: invokes search
packages/backend/convex/system/ai/tools/search.ts - Knowledge search → Retrieval setup: uses retrieval
packages/backend/convex/system/ai/tools/search.ts - Widget screens → Vapi voice client: offers voice