How triswijaya/dealflow works
DealFlow is a multi-tenant B2B sales-to-cash application. A user manages a customer and deal through pipeline stages, creates and revises quotations, follows up, records a deal outcome, and carries won business into orders, invoices, and payments. The graph preserves the documented dashboard, search, reporting, settings, and team capabilities. Evidence is limited to the README and supplied source excerpts/index; unverified implementation links are omitted.
Main entry points: deal-views.ts Deals and pipeline · search.ts Global search · invoice-views.ts Invoices · customers.ts Customer records
Components 19
Access and workspace
- Authentication and roles
src/server/auth/auth.ts - App workspace
src/app/(app)/workspace.ts - Role dashboards
src/server/dashboard - Global search
src/server/search/search.ts - Company and members
src/server/settings
Sales journey
- Customer records
src/server/customers/customers.ts - Deals and pipeline
src/server/deals/deal-views.ts - Quotations and revisions
src/server/quotations/quotations.ts - Follow-ups
src/server/follow-ups - WhatsApp links
src/server/whatsapp - Orders
src/server/orders
Billing and reporting
- Invoices
src/server/invoices/invoice-views.ts - Payments
src/server/invoices/payments.ts - Reports and exports
src/server/reports
Shared services
- Document PDFs
src/server/pdf/quotation-document.tsx - Outbox delivery
src/server/outbox/handlers.ts - Email delivery
src/server/email/send-email.ts - PostgreSQL data
src/server/db/schema.ts
Other components
- Business user
Connections 26
- Business user → Authentication and roles: signs in
- Authentication and roles → App workspace: grants access
- Business user → Customer records: manages customers
- Customer records → Deals and pipeline: starts sales journey
- Deals and pipeline → Quotations and revisions: creates quotation
- Deals and pipeline → Follow-ups: schedules follow-up
- Follow-ups → WhatsApp links: offers WhatsApp links
- Deals and pipeline → Orders: hands off won deal
- Orders → Invoices: supports invoicing
src/server/invoices/invoice-views.ts - Invoices → Payments: records payments
- Business user → Role dashboards: views metrics
- Business user → Global search: searches records
- Business user → Reports and exports: exports reports
- Business user → Company and members: configures workspace
- Quotations and revisions → Document PDFs: renders quotation
src/app/api/quotations/[quotationId]/pdf/route.ts - Invoices → Document PDFs: renders invoice
src/app/api/invoices/[invoiceId]/pdf/route.ts - Outbox delivery → Document PDFs: renders attachments
src/server/outbox/handlers.ts - Outbox delivery → Email delivery: sends messages
src/server/outbox/handlers.ts - Global search → Customer records: queries customers
src/server/search/search.ts - Global search → Deals and pipeline: queries deals
src/server/search/search.ts - Global search → Invoices: queries invoices
src/server/search/search.ts - Global search → Quotations and revisions: queries quotations
src/server/search/search.ts - Deals and pipeline → PostgreSQL data: reads deal data
src/server/deals/deal-views.ts - Customer records → PostgreSQL data: reads and writes
src/server/customers/customers.ts - Quotations and revisions → PostgreSQL data: reads and writes
src/server/quotations/quotations.ts - Invoices → PostgreSQL data: reads invoice data
src/server/invoices/invoice-views.ts