How chauhanjaved/ask-my-docs works
FTChat turns business knowledge into an embeddable support assistant. The main workflow is to upload documents or crawl a URL, process and embed its content, then answer widget questions through chat; the dashboard also exposes conversation analytics, team management, and billing. The graph includes these documented capabilities, but unsampled implementations are represented only at supported directory paths. Relationships are limited to excerpted calls, indexed imports, or README statements; the internal retrieval and answer-generation steps were not inspected.
Main entry points: document-processing.ts Text processing · documents/route.ts File ingestion · crawl/route.ts URL ingestion · server.ts Server client
Components 28
Knowledge ingestion
- Document manager
src/app/(dashboard)/dashboard/documents/page.tsx - File ingestion
src/app/api/documents/route.ts - URL ingestion
src/app/api/crawl/route.ts - Text processing
src/lib/document-processing.ts - Embedding API
Support assistant
- Embed loader
src/app/widget/loader.ts - Chat widget
src/app/widget/embed/route.ts - Chat endpoint
src/app/api/chat/route.ts - Knowledge search
src/app/api/search/route.ts
Business workspace
- Dashboard
src/app/(dashboard)/dashboard - Chat analytics
src/app/(dashboard)/dashboard/chats/page.tsx - Team management
src/app/(dashboard)/dashboard/settings/team/page.tsx - Role permissions
src/lib/permissions.ts - Subscription billing
src/app/(dashboard)/dashboard/settings/billing/page.tsx - Profile settings
src/components/profile-settings-view.tsx - Marketing site
src/app/(marketing)/LandingPageClient.tsx - Site configuration
src/config/site.ts - Dashboard navigation
src/components/dashboard-nav.tsx - Plan limits
src/lib/plans.ts
Platform services
- Stripe billing
- Subscription functions
supabase/functions/fastspring-subscription/index.ts - Billing webhook
supabase/functions/fastspring-webhook/index.ts - Supabase
- Server client
src/utils/supabase/server.ts - Admin client
src/utils/supabase/admin.ts - Browser client
src/utils/supabase/client.ts
Other components
- Business owner
- Website visitor
Connections 29
- Business owner → Document manager: manages knowledge
- Business owner → Dashboard: reviews workspace
- Website visitor → Embed loader: loads widget
- Embed loader → Chat widget: loads embed
- Chat widget → Chat endpoint: posts questions
src/app/widget/embed/route.ts - Document manager → File ingestion: uploads files
- Document manager → URL ingestion: submits URLs
- File ingestion → Text processing: extracts and chunks
src/app/api/documents/route.ts - URL ingestion → Text processing: chunks text
src/app/api/crawl/route.ts - Text processing → Embedding API: requests embeddings
src/lib/document-processing.ts - File ingestion → Server client: creates client
src/app/api/documents/route.ts - URL ingestion → Server client: creates client
src/app/api/crawl/route.ts - Chat endpoint → Server client: creates client
src/app/api/chat/route.ts - Chat endpoint → Text processing: uses processing
src/app/api/chat/route.ts - File ingestion → Supabase: stores documents
src/app/api/documents/route.ts - URL ingestion → Supabase: stores chunks
src/app/api/crawl/route.ts - Server client → Supabase: connects to
src/utils/supabase/server.ts - Admin client → Supabase: connects to
src/utils/supabase/admin.ts - Knowledge search → Text processing: uses processing
src/app/api/search/route.ts - Team management → Role permissions: uses access rules
- Dashboard navigation → Role permissions: checks roles
src/components/dashboard-nav.tsx - Role permissions → Plan limits: checks plan limits
src/lib/permissions.ts - Profile settings → Browser client: creates client
src/components/profile-settings-view.tsx - Dashboard navigation → Browser client: creates client
src/components/dashboard-nav.tsx - Subscription billing → Stripe billing: manages subscriptions
- Stripe billing → Billing webhook: sends events
- Subscription functions → Supabase: uses platform
- Billing webhook → Supabase: uses platform
- Marketing site → Site configuration: uses site details