AI powered next gen CRM for small business.
See the code
AI that replies to inquiries, generates quotes, follows up, and closes deals — automatically.
Inboundr is a quotation-first B2B operations platform. The headline act is the quoting pipeline: an inbound RFQ hits a connected Gmail inbox, an AI agent decides whether it's actually a request for quote, pulls out the customer and the line items, matches those items against your product catalog, drafts a priced reply, and sends it back on the original email thread. No copy-pasting line items into a spreadsheet at 11pm.
Everything else in the platform exists because quoting doesn't happen in a vacuum. You also need invoices, receivables, a customer and product database, a place to talk to your team's AI, a support channel for your buyers, file storage, forms, links, and somewhere to run HR and projects. Inboundr ships all of that as one multi-tenant app.
Inbound, handled automatically.
Most "AI CRMs" are a contact list with a chatbot bolted on. You still read every inbound email yourself, you still look up every part number, you still type every quote, and you still chase every unpaid invoice. The software watches you do the work and calls itself intelligent.
Inboundr does the typing. The RFQ pipeline turns raw inbound email into a sent quote with humans only in the loop where it matters: confirming the matched products and the price. Around it sits the operational stack you'd otherwise stitch together from six different SaaS subscriptions, all sharing one org, one auth layer, and one set of permissions.
The reason this thing exists.
backend/src/agents/check_rfq.ts) decides RFQ or not-RFQ, and tells you why when it's unsure.generate_rfq.ts pulls the customer (auto-creating the CRM record) and the requested line items, then matches them against the PostgreSQL product catalog. Matches come back labelled: matched, ambiguous, or no match.generate_quote.ts writes the quotation email, INR pricing rules included./emails) — Synced Gmail view with per-message processing status (received, processing, processed, failed), RFQ classification badges, inline attachment preview (including spreadsheet rendering), and a reprocess action when the agent trips./orders) — Saved quote drafts waiting on an external quote number and a "mark processed" once they're out the door./chat — A threaded internal assistant built on assistant-ui and the Vercel AI SDK. It carries real tools: search and create products and customers, and create, update, and send invoices, straight from the conversation.| Technology | Role |
|---|---|
| Bun | Runtime and package manager |
| Express 5 | HTTP framework |
| LangChain / LangGraph | RFQ classification, extraction, and quote-drafting agents |
| Vercel AI SDK | Streaming assistant chat and the public support bot |
| OpenRouter | LLM gateway (kimi-k2, gpt-oss-120b, gpt-5.x-mini, gpt-4o-mini for vision) |
| Google Vertex AI | Product embeddings (seed/offline tooling, not the live request path) |
| MongoDB + Mongoose | Primary document store and Better Auth adapter |
| PostgreSQL | Org-scoped product catalog |
| Better Auth | Authentication, with the organization plugin |
| Gmail API | Inbox sync, quote replies, invoice and reminder sends |
| Google Pub/Sub | Inbound Gmail push notifications |
| AWS SES | Transactional email |
| AWS S3 | File storage for Drive, uploads, forms, attendance, and support |
| React Email | Email templates |
| ws | Real-time support chat |
| pdfkit / pdf-parse / xlsx / qrcode | PDF generation, attachment parsing, imports, and QR codes |
Inboundr requires Bun version v1.3.11 or higher — this is needed for Bun's built-in cron support that drives the digest and payment-reminder jobs.
| Technology | Role |
|---|---|
| React 19 | UI framework |
| Vite 7 | Build tool and dev server |
| TanStack Router | Type-safe file-based routing |
| assistant-ui + AI SDK | The AI chat workspace and tool UIs |
| shadcn/ui + Radix UI | Component library |
| Tailwind CSS 4 | Styling |
| Recharts | Stats and analytics charts |
| PostHog | Product analytics |
| xlsx / qrcode / date-fns / zustand | Imports, QR codes, dates, and state |
inboundr/
├── backend/ # API, auth, AI agents, jobs, email, storage, data models
├── frontend/ # Authenticated dashboard, CRM, and operations workspace
├── embed/ # Public embeddable forms and short-link experiences
├── landing/ # Public marketing website
└── package.json # Bun workspace root and shared scripts
This repository is a Bun workspace. Install dependencies once at the root, then run each app through the root scripts or from the individual package directories.
| Workspace | What it does | Common commands |
|---|---|---|
backend | Express API behind everything: the RFQ-to-quote agents, auth and orgs, customers, products, invoices and receivables, forms, short links, Drive, projects, employees and attendance, support chat (WebSocket included), the internal AI assistant, Gmail integration, scheduled jobs, and React Email templates. It owns the data models and every external integration. | bun run dev:backend, bun run typecheck:backend, bun run email:dev |
frontend | The authenticated Inboundr app: home, RFQ workspace, inbox, orders, AI chat, support, products, customers, invoices, receivables, stats, employees, attendance, projects, forms, links, drive, settings, search, and the super-admin console. Built with React, Vite, TanStack Router, shadcn/ui, and Tailwind. | bun run dev:frontend, bun run build:frontend, bun run lint:frontend, bun run typecheck:frontend |
embed | Lightweight public-facing React app for embeddable lead-capture forms and public short-link pages. Kept separate from the dashboard so customer-facing surfaces stay small and isolated. | bun run dev:embed, bun run build:embed, bun run lint:embed, bun run typecheck:embed |
landing | Marketing website with public pages such as home, features, product pages, contact, careers, legal, and security. Built with React, Vite, Tailwind, and motion. | bun run dev:landing, bun run build:landing, bun run lint:landing, bun run typecheck:landing |
The frontend predates some of its routes, so a couple of names lie. / (the home dashboard) lives in frontend/src/pages/home-page.tsx, while the RFQ workspace at /rfq lives in frontend/src/pages/dashboard-page.tsx. Don't let the filename fool you.
backend is the system of record and the integration layer. Start here when changing API behavior, data models, authentication, agents, email templates, jobs, or third-party services.frontend is the internal product UI. Start here when changing authenticated workflows: quoting, CRM, invoicing, support, settings, or anything org-facing.embed is for external surfaces that leads and customers touch outside the dashboard, such as hosted forms and short-link pages.landing is for public marketing content and brand pages. Keep product app logic out of this workspace unless it's purely presentation for the public site.The backend is the integration boundary for product data, auth, AI workflows, email, storage, and external services. The React apps stay focused on their surfaces: public marketing, authenticated operations, and embeddable public experiences.
flowchart TD
Gmail[Gmail inbox] -->|"Pub/Sub push"| Webhook["POST /api/v1/email/webhook"]
Webhook --> Classify["check_rfq agent (LangGraph)"]
Classify -->|"is an RFQ"| Extract["generate_rfq agent"]
Extract --> Catalog[(PostgreSQL product catalog)]
Extract --> Draft["Human confirms products and price"]
Draft --> Quote["generate_quote agent"]
Quote -->|"reply on thread"| Gmail
Users[Internal users] --> Chat["/api/v1/chat: assistant + tools"]
Visitors[Public visitors] --> Support["/api/v1/public/support + WebSocket"]
Support --> Tickets[(Tickets)]
Cron["Bun cron (hourly)"] --> Digest["Digest emails via SES"]
Cron --> Reminders["Invoice reminders via Gmail"]
Auth["Better Auth + org plugin"] --> Mongo[(MongoDB)]
Files[Drive / uploads] --> S3[(AWS S3)]
# Install all workspace dependencies
bun install
# Start the API
bun run dev:backend
# Start the dashboard in another terminal
bun run dev:frontend
Optional local apps:
# Embeddable forms and public links
bun run dev:embed
# Marketing website
bun run dev:landing
# Email template preview
bun run email:dev
Create local .env files from the production examples, then replace placeholder values with local or development credentials.
| Workspace | Env file | Notes |
|---|---|---|
backend | backend/.env from backend/.env.production.example | Requires database, auth, origin, Google OAuth/Gmail, Pub/Sub, OpenRouter, and AWS SES/S3 values. Keep production secrets only on the production host or in GitHub secrets. |
frontend | frontend/.env from frontend/.env.production.example | Requires VITE_API_URL so the dashboard can reach the API and VITE_EMBED_URL for public form links. |
embed | embed/.env from embed/.env.production.example | Requires VITE_API_URL so public forms can reach the API. |
landing | Optional landing/.env | Add only public VITE_* variables for marketing-site configuration. |
Never commit real .env files or private keys. Use GitHub repository secrets and environment variables for CI/CD values.
# API server
bun run dev:backend
# Dashboard
bun run dev:frontend
# Embeddable forms and public links
bun run dev:embed
# Landing page
bun run dev:landing
# Email template preview
bun run email:dev
# Typecheck backend and frontend
bun run typecheck
# Typecheck individual workspaces
bun run typecheck:backend
bun run typecheck:frontend
bun run typecheck:embed
bun run typecheck:landing
# Lint frontend apps
bun run lint
bun run lint:frontend
bun run lint:embed
bun run lint:landing
# Format configured frontend apps
bun run format:frontend
bun run format:landing
CI enforces workspace-specific checks on pull requests. Backend changes typecheck the API package; frontend app changes typecheck and build the affected Vite app before deployment.
# Default production build
bun run build
# Build individual frontend apps
bun run build:frontend
bun run build:embed
bun run build:landing
Use short-lived branches off main for feature work and fixes. Open pull requests back into main; the relevant GitHub Actions workflow runs based on the files changed.
Before opening a PR, run the checks for the workspace you touched:
# Backend
bun run typecheck:backend
# Dashboard
bun run typecheck:frontend
bun run lint:frontend
# Embed
bun run typecheck:embed
bun run lint:embed
# Landing
bun run typecheck:landing
bun run lint:landing
Merging to main is the production release path. The same checks run again in CI, and deployment starts only after the workflow's check or build job succeeds.
Production deployments are handled by GitHub Actions workflows in .github/workflows. Each app has its own workflow so changes only rebuild and deploy the workspace they affect.
| Workflow | App | Runs on | Deploy target |
|---|---|---|---|
backend-deploy.yml | backend | Backend, deployment script, deployment docs, root package, or lockfile changes | EC2 via SSH and systemd |
frontend-deploy.yml | frontend | Frontend, root package, lockfile, or frontend deployment docs changes | S3 + CloudFront |
embed-deploy.yml | embed | Embed, root package, lockfile, or embed workflow changes | S3 + CloudFront |
landing-deploy.yml | landing | Landing, root package, lockfile, or landing workflow changes | S3 + CloudFront |
main run the relevant workspace checks before review. Backend runs bun run typecheck:backend; frontend apps run typecheck and production builds.main run the same checks, then deploy only after the check/build job succeeds.frontend, embed, and landing) build a dist artifact, upload hashed assets to S3 with long-lived cache headers, upload index.html with no-cache headers, then invalidate the matching CloudFront distribution.scripts/deploy/ec2-deploy.sh, installs dependencies with the frozen lockfile, restarts the inboundr-backend service, and checks the API health URL.production GitHub environment and read infrastructure details from GitHub repository secrets and variables.Common GitHub configuration:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_REGION
FRONTEND_S3_BUCKET
EMBED_S3_BUCKET
LANDING_S3_BUCKET
CLOUDFRONT_DISTRIBUTION_ID
EMBED_CLOUDFRONT_DISTRIBUTION_ID
LANDING_CLOUDFRONT_DISTRIBUTION_ID
VITE_API_URL
VITE_EMBED_URL
EC2_HOST
EC2_USER
EC2_SSH_KEY
API_HEALTH_URL
For the detailed backend EC2 runbook, see docs/deployment/ec2-backend.md.
.env files, private keys, OAuth secrets, database URLs, and AWS credentials out of git.BETTER_AUTH_SECRET, trusted FRONTEND_ORIGIN/API_ORIGIN values, and environment-specific callback URLs for auth and OAuth flows.VITE_* values.Proprietary. All rights reserved.
TypeScript
99.4%
AI powered next gen CRM for small business.
See the code
AI that replies to inquiries, generates quotes, follows up, and closes deals — automatically.
Inboundr is a quotation-first B2B operations platform. The headline act is the quoting pipeline: an inbound RFQ hits a connected Gmail inbox, an AI agent decides whether it's actually a request for quote, pulls out the customer and the line items, matches those items against your product catalog, drafts a priced reply, and sends it back on the original email thread. No copy-pasting line items into a spreadsheet at 11pm.
Everything else in the platform exists because quoting doesn't happen in a vacuum. You also need invoices, receivables, a customer and product database, a place to talk to your team's AI, a support channel for your buyers, file storage, forms, links, and somewhere to run HR and projects. Inboundr ships all of that as one multi-tenant app.
Inbound, handled automatically.
Most "AI CRMs" are a contact list with a chatbot bolted on. You still read every inbound email yourself, you still look up every part number, you still type every quote, and you still chase every unpaid invoice. The software watches you do the work and calls itself intelligent.
Inboundr does the typing. The RFQ pipeline turns raw inbound email into a sent quote with humans only in the loop where it matters: confirming the matched products and the price. Around it sits the operational stack you'd otherwise stitch together from six different SaaS subscriptions, all sharing one org, one auth layer, and one set of permissions.
The reason this thing exists.
backend/src/agents/check_rfq.ts) decides RFQ or not-RFQ, and tells you why when it's unsure.generate_rfq.ts pulls the customer (auto-creating the CRM record) and the requested line items, then matches them against the PostgreSQL product catalog. Matches come back labelled: matched, ambiguous, or no match.generate_quote.ts writes the quotation email, INR pricing rules included./emails) — Synced Gmail view with per-message processing status (received, processing, processed, failed), RFQ classification badges, inline attachment preview (including spreadsheet rendering), and a reprocess action when the agent trips./orders) — Saved quote drafts waiting on an external quote number and a "mark processed" once they're out the door./chat — A threaded internal assistant built on assistant-ui and the Vercel AI SDK. It carries real tools: search and create products and customers, and create, update, and send invoices, straight from the conversation.| Technology | Role |
|---|---|
| Bun | Runtime and package manager |
| Express 5 | HTTP framework |
| LangChain / LangGraph | RFQ classification, extraction, and quote-drafting agents |
| Vercel AI SDK | Streaming assistant chat and the public support bot |
| OpenRouter | LLM gateway (kimi-k2, gpt-oss-120b, gpt-5.x-mini, gpt-4o-mini for vision) |
| Google Vertex AI | Product embeddings (seed/offline tooling, not the live request path) |
| MongoDB + Mongoose | Primary document store and Better Auth adapter |
| PostgreSQL | Org-scoped product catalog |
| Better Auth | Authentication, with the organization plugin |
| Gmail API | Inbox sync, quote replies, invoice and reminder sends |
| Google Pub/Sub | Inbound Gmail push notifications |
| AWS SES | Transactional email |
| AWS S3 | File storage for Drive, uploads, forms, attendance, and support |
| React Email | Email templates |
| ws | Real-time support chat |
| pdfkit / pdf-parse / xlsx / qrcode | PDF generation, attachment parsing, imports, and QR codes |
Inboundr requires Bun version v1.3.11 or higher — this is needed for Bun's built-in cron support that drives the digest and payment-reminder jobs.
| Technology | Role |
|---|---|
| React 19 | UI framework |
| Vite 7 | Build tool and dev server |
| TanStack Router | Type-safe file-based routing |
| assistant-ui + AI SDK | The AI chat workspace and tool UIs |
| shadcn/ui + Radix UI | Component library |
| Tailwind CSS 4 | Styling |
| Recharts | Stats and analytics charts |
| PostHog | Product analytics |
| xlsx / qrcode / date-fns / zustand | Imports, QR codes, dates, and state |
inboundr/
├── backend/ # API, auth, AI agents, jobs, email, storage, data models
├── frontend/ # Authenticated dashboard, CRM, and operations workspace
├── embed/ # Public embeddable forms and short-link experiences
├── landing/ # Public marketing website
└── package.json # Bun workspace root and shared scripts
This repository is a Bun workspace. Install dependencies once at the root, then run each app through the root scripts or from the individual package directories.
| Workspace | What it does | Common commands |
|---|---|---|
backend | Express API behind everything: the RFQ-to-quote agents, auth and orgs, customers, products, invoices and receivables, forms, short links, Drive, projects, employees and attendance, support chat (WebSocket included), the internal AI assistant, Gmail integration, scheduled jobs, and React Email templates. It owns the data models and every external integration. | bun run dev:backend, bun run typecheck:backend, bun run email:dev |
frontend | The authenticated Inboundr app: home, RFQ workspace, inbox, orders, AI chat, support, products, customers, invoices, receivables, stats, employees, attendance, projects, forms, links, drive, settings, search, and the super-admin console. Built with React, Vite, TanStack Router, shadcn/ui, and Tailwind. | bun run dev:frontend, bun run build:frontend, bun run lint:frontend, bun run typecheck:frontend |
embed | Lightweight public-facing React app for embeddable lead-capture forms and public short-link pages. Kept separate from the dashboard so customer-facing surfaces stay small and isolated. | bun run dev:embed, bun run build:embed, bun run lint:embed, bun run typecheck:embed |
landing | Marketing website with public pages such as home, features, product pages, contact, careers, legal, and security. Built with React, Vite, Tailwind, and motion. | bun run dev:landing, bun run build:landing, bun run lint:landing, bun run typecheck:landing |
The frontend predates some of its routes, so a couple of names lie. / (the home dashboard) lives in frontend/src/pages/home-page.tsx, while the RFQ workspace at /rfq lives in frontend/src/pages/dashboard-page.tsx. Don't let the filename fool you.
backend is the system of record and the integration layer. Start here when changing API behavior, data models, authentication, agents, email templates, jobs, or third-party services.frontend is the internal product UI. Start here when changing authenticated workflows: quoting, CRM, invoicing, support, settings, or anything org-facing.embed is for external surfaces that leads and customers touch outside the dashboard, such as hosted forms and short-link pages.landing is for public marketing content and brand pages. Keep product app logic out of this workspace unless it's purely presentation for the public site.The backend is the integration boundary for product data, auth, AI workflows, email, storage, and external services. The React apps stay focused on their surfaces: public marketing, authenticated operations, and embeddable public experiences.
flowchart TD
Gmail[Gmail inbox] -->|"Pub/Sub push"| Webhook["POST /api/v1/email/webhook"]
Webhook --> Classify["check_rfq agent (LangGraph)"]
Classify -->|"is an RFQ"| Extract["generate_rfq agent"]
Extract --> Catalog[(PostgreSQL product catalog)]
Extract --> Draft["Human confirms products and price"]
Draft --> Quote["generate_quote agent"]
Quote -->|"reply on thread"| Gmail
Users[Internal users] --> Chat["/api/v1/chat: assistant + tools"]
Visitors[Public visitors] --> Support["/api/v1/public/support + WebSocket"]
Support --> Tickets[(Tickets)]
Cron["Bun cron (hourly)"] --> Digest["Digest emails via SES"]
Cron --> Reminders["Invoice reminders via Gmail"]
Auth["Better Auth + org plugin"] --> Mongo[(MongoDB)]
Files[Drive / uploads] --> S3[(AWS S3)]
# Install all workspace dependencies
bun install
# Start the API
bun run dev:backend
# Start the dashboard in another terminal
bun run dev:frontend
Optional local apps:
# Embeddable forms and public links
bun run dev:embed
# Marketing website
bun run dev:landing
# Email template preview
bun run email:dev
Create local .env files from the production examples, then replace placeholder values with local or development credentials.
| Workspace | Env file | Notes |
|---|---|---|
backend | backend/.env from backend/.env.production.example | Requires database, auth, origin, Google OAuth/Gmail, Pub/Sub, OpenRouter, and AWS SES/S3 values. Keep production secrets only on the production host or in GitHub secrets. |
frontend | frontend/.env from frontend/.env.production.example | Requires VITE_API_URL so the dashboard can reach the API and VITE_EMBED_URL for public form links. |
embed | embed/.env from embed/.env.production.example | Requires VITE_API_URL so public forms can reach the API. |
landing | Optional landing/.env | Add only public VITE_* variables for marketing-site configuration. |
Never commit real .env files or private keys. Use GitHub repository secrets and environment variables for CI/CD values.
# API server
bun run dev:backend
# Dashboard
bun run dev:frontend
# Embeddable forms and public links
bun run dev:embed
# Landing page
bun run dev:landing
# Email template preview
bun run email:dev
# Typecheck backend and frontend
bun run typecheck
# Typecheck individual workspaces
bun run typecheck:backend
bun run typecheck:frontend
bun run typecheck:embed
bun run typecheck:landing
# Lint frontend apps
bun run lint
bun run lint:frontend
bun run lint:embed
bun run lint:landing
# Format configured frontend apps
bun run format:frontend
bun run format:landing
CI enforces workspace-specific checks on pull requests. Backend changes typecheck the API package; frontend app changes typecheck and build the affected Vite app before deployment.
# Default production build
bun run build
# Build individual frontend apps
bun run build:frontend
bun run build:embed
bun run build:landing
Use short-lived branches off main for feature work and fixes. Open pull requests back into main; the relevant GitHub Actions workflow runs based on the files changed.
Before opening a PR, run the checks for the workspace you touched:
# Backend
bun run typecheck:backend
# Dashboard
bun run typecheck:frontend
bun run lint:frontend
# Embed
bun run typecheck:embed
bun run lint:embed
# Landing
bun run typecheck:landing
bun run lint:landing
Merging to main is the production release path. The same checks run again in CI, and deployment starts only after the workflow's check or build job succeeds.
Production deployments are handled by GitHub Actions workflows in .github/workflows. Each app has its own workflow so changes only rebuild and deploy the workspace they affect.
| Workflow | App | Runs on | Deploy target |
|---|---|---|---|
backend-deploy.yml | backend | Backend, deployment script, deployment docs, root package, or lockfile changes | EC2 via SSH and systemd |
frontend-deploy.yml | frontend | Frontend, root package, lockfile, or frontend deployment docs changes | S3 + CloudFront |
embed-deploy.yml | embed | Embed, root package, lockfile, or embed workflow changes | S3 + CloudFront |
landing-deploy.yml | landing | Landing, root package, lockfile, or landing workflow changes | S3 + CloudFront |
main run the relevant workspace checks before review. Backend runs bun run typecheck:backend; frontend apps run typecheck and production builds.main run the same checks, then deploy only after the check/build job succeeds.frontend, embed, and landing) build a dist artifact, upload hashed assets to S3 with long-lived cache headers, upload index.html with no-cache headers, then invalidate the matching CloudFront distribution.scripts/deploy/ec2-deploy.sh, installs dependencies with the frozen lockfile, restarts the inboundr-backend service, and checks the API health URL.production GitHub environment and read infrastructure details from GitHub repository secrets and variables.Common GitHub configuration:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_REGION
FRONTEND_S3_BUCKET
EMBED_S3_BUCKET
LANDING_S3_BUCKET
CLOUDFRONT_DISTRIBUTION_ID
EMBED_CLOUDFRONT_DISTRIBUTION_ID
LANDING_CLOUDFRONT_DISTRIBUTION_ID
VITE_API_URL
VITE_EMBED_URL
EC2_HOST
EC2_USER
EC2_SSH_KEY
API_HEALTH_URL
For the detailed backend EC2 runbook, see docs/deployment/ec2-backend.md.
.env files, private keys, OAuth secrets, database URLs, and AWS credentials out of git.BETTER_AUTH_SECRET, trusted FRONTEND_ORIGIN/API_ORIGIN values, and environment-specific callback URLs for auth and OAuth flows.VITE_* values.Proprietary. All rights reserved.
TypeScript
99.4%