Modern Customer Support Made Simple
A powerful, multi-tenant customer support ticketing system that helps businesses deliver exceptional customer service while keeping teams productive and customers happy.
InsightDesk is a complete customer support platform designed for growing businesses. Whether you're a startup handling your first support requests or an established company managing thousands of tickets, InsightDesk scales with your needs.
One platform. Multiple teams. Unlimited possibilities.
- Create & Track Tickets β Customers submit issues, your team resolves them
- Assign to Agents β Route tickets to the right team members
- Priority Levels β Urgent, High, Medium, Low
- Status Workflow β Open β In Progress β Resolved β Closed
- Bulk Actions β Update, assign, or close multiple tickets at once
- Merge Duplicates β Combine related tickets
- Activity History β Complete audit trail of every action
- Customer Replies β Direct conversation threads
- Internal Notes β Private team discussions (invisible to customers)
- Live Updates β See changes instantly via WebSocket
- File Attachments β Share screenshots, documents, and more
- Typing Indicators β Know when someone is responding
| Role | Capabilities |
|---|---|
| Customer | Create tickets, view own tickets, reply to conversations |
| Agent | Handle tickets, use templates, collaborate with team |
| Admin | Manage members, configure settings, access reports |
| Owner | Full control including billing and organization settings |
- Priority-based response and resolution targets
- Automatic breach alerts and warnings
- Performance tracking and compliance reports
| Priority | First Response | Resolution |
|---|---|---|
| Urgent | 1 hour | 4 hours |
| High | 4 hours | 8 hours |
| Medium | 8 hours | 24 hours |
| Low | 24 hours | 72 hours |
- Automatic satisfaction surveys after resolution
- 1-5 star ratings with feedback collection
- Agent performance tracking
- Trend analysis over time
- Ticket volume and trends
- Response and resolution times
- Agent performance metrics
- SLA compliance tracking
- Priority distribution
- Separate organizations with complete data isolation
- Custom branding per organization
- Independent team management
- Categories β Hierarchical folder structure
- Tags β Flexible labeling system
- Saved Filters β Quick access to common views
- Export β Download as CSV or Excel
- Canned Responses β Pre-written templates with shortcuts
- Auto-Close β Automatically close stale tickets
- Daily Digests β Email summaries for agents
- Email Notifications β Keep everyone informed
| Layer | Technology |
|---|---|
| Runtime | Bun |
| Framework | Express 5.1 + TypeScript |
| Database | PostgreSQL + Drizzle ORM |
| Auth | Better Auth |
| Real-time | Socket.IO |
| Job Queue | BullMQ + Valkey |
| File Storage | S3-compatible (MinIO/AWS/R2) |
| Nodemailer + Templates |
Note: This project uses Bun as the primary runtime. See Package Manager Guide for alternatives.
bun run setup# 1. Clone and install
git clone https://github.com/ehsan18t/insight-desk.git
cd insight-desk
bun install
# 2. Configure environment
copy .env.development .env
# 3. Start services (PostgreSQL, Valkey, MinIO, Mailpit)
bun run docker:up
# 4. Setup database
bun run db:push
# 5. (Optional) Seed demo data
bun run db:seed
# 6. Start development server
bun run devThe API will be available at http://localhost:3001
| Service | Port | URL |
|---|---|---|
| API Server | 3001 | http://localhost:3001 |
| PostgreSQL | 5432 | Database |
| Valkey | 6379 | Cache & Queue (Redis-compatible) |
| Mailpit | 8025 | http://localhost:8025 (Email UI) |
| MinIO | 9001 | http://localhost:9001 (Storage Console) |
| Command | Description |
|---|---|
bun run setup |
Full dev environment setup |
bun run dev |
Start with hot reload |
bun run start |
Start production server |
| Command | Description |
|---|---|
bun run docker:up |
Start all services |
bun run docker:down |
Stop all services |
bun run docker:logs |
View service logs |
| Command | Description |
|---|---|
bun run db:generate |
Generate migrations |
bun run db:migrate |
Apply migrations |
bun run db:push |
Push schema (dev only) |
bun run db:studio |
Open Drizzle Studio |
bun run db:seed |
Seed demo data |
bun run db:setup:prod |
Production database setup |
| Command | Description |
|---|---|
bun run test |
Run all tests (unit + integration) |
bun run test:unit |
Run unit tests only (skip integration) |
bun run test:integration |
Run integration tests only (RLS/tenant) |
bun run test:setup |
Setup test database for integration |
bun run test:coverage |
Run unit tests with coverage |
bun run test:watch |
Watch mode (unit tests) |
bun run typecheck |
TypeScript check |
bun run check |
Lint & format check |
InsightDesk has two types of tests:
Unit tests mock the database and run quickly. They test business logic in isolation.
bun run test:unit # Run unit tests only
bun run test:watch # Watch mode (unit tests)
bun run test:coverage # Unit tests with coverage reportIntegration tests verify Row-Level Security (RLS) tenant isolation against a real PostgreSQL database.
First-time setup:
# Setup test database (automatically starts test containers)
bun run test:setupRun tests:
bun run test:integration # Run integration tests only
bun run test # Run ALL tests (unit + integration)- Unit tests use mocked database connections
- Integration tests use
insightdesk_testdatabase (separate from dev) - Test config is in
.env.test
Development: .env.development is pre-configured for Docker services.
copy .env.development .envProduction: Copy .env.example and configure all values. See Deployment Guide.
InsightDesk supports multiple package managers. The scripts automatically detect which one you're using based on lockfiles.
| Manager | Lockfile | Install | Run Script |
|---|---|---|---|
| Bun | bun.lockb / bun.lock |
bun install |
bun run <cmd> |
| pnpm | pnpm-lock.yaml |
pnpm install |
pnpm run <cmd> |
| Yarn | yarn.lock |
yarn |
yarn <cmd> |
| npm | package-lock.json |
npm install |
npm run <cmd> |
The project automatically detects your package manager by checking for lockfiles in this order:
bun.lockborbun.lockβ Uses Bunpnpm-lock.yamlβ Uses pnpmyarn.lockβ Uses Yarnpackage-lock.jsonβ Uses npm- Falls back to npm if no lockfile found
Switch to npm:
# Remove bun lockfile and install with npm
rm bun.lock
npm install
npm run devSwitch to pnpm:
rm bun.lock
pnpm install
pnpm run devSwitch to Yarn:
rm bun.lock
yarn install
yarn dev- β‘ 4-10x faster installs and script execution
- π Drop-in replacement for Node.js
- π¦ Built-in bundler, test runner, and package manager
- π― Native TypeScript support without compilation
Once you've chosen a package manager, all scripts work identically:
# These are equivalent (just replace 'bun' with your manager)
bun run dev
npm run dev
pnpm run dev
yarn devSee plan/06-api-design.md for full API documentation.
- Startups β Simple setup, grows with your needs
- Growing Companies β Scale support without losing quality
- Agencies β Manage multiple clients separately
- SaaS Companies β Professional support that matches your product
- β Multi-tenant organizations
- β Role-based access control
- β Ticket CRUD with bulk operations
- β Real-time messaging
- β File attachments
- β SLA policies with breach alerts
- β CSAT surveys
- β Activity logging
- β Canned responses
- β Saved filters
- β Categories & tags
- β Export (CSV/Excel)
- β Email notifications
- β Auto-close tickets
- β Daily digests
- β Background jobs
InsightDesk β Customer support that scales with you.