Self-hostable CRM template for WhatsApp — shared inbox, contacts, sales pipelines, broadcasts, and no-code automations. Fork it, brand it, host it.
Go to file
Arnas Donauskas bf90c370fc
feat(dashboard): adopt Tremor for charts — first integration
Brings Tremor (Apache-2.0) in as the project's chart component
library and converts the response-time chart as the first
integration. Tremor is distributed copy-paste ("Tremor Raw") so
the components live under `src/components/tremor/`; the only
runtime peer dependency added is `recharts`. Two small local
adaptations to the vendored `BarChart`:

- `cx` (Tremor's `clsx`+`twMerge` helper) → our `cn` from
  `@/lib/utils`, aliased locally to keep diff vs upstream minimal.
- `@remixicon/react` legend-slider icons →
  `lucide-react`'s `ChevronLeft` / `ChevronRight`, since
  `lucide-react` is already a project dep.
- `ChartTooltipProps.label` widened from `string` to
  `string | number | undefined` to match recharts 3.x (Tremor's
  source still types it for recharts 2.x).

Why Tremor and not a wider switch (Mantine, HeroUI):
- The dashboard ships ~700 lines of hand-rolled SVG across three
  chart files — a focused charting library is the highest-ROI
  addition without touching the wider component surface.
- Tremor is Tailwind-native and built on the same Radix/Base UI
  layer as the existing `src/components/ui/*`, so it composes
  rather than displaces.
- Apache-2.0 + copy-paste distribution means no upgrade lock-in.

What this PR does
- Adds `src/components/tremor/{bar-chart.tsx,chart-colors.ts,
  get-y-axis-domain.ts,use-on-window-resize.ts}` (vendored from
  tremorlabs/tremor with the adaptations above).
- Installs `recharts@^3.8.1` (React 19 + Next.js 16 compatible).
- Rewrites `src/components/dashboard/response-time-chart.tsx`:
  drops 130 lines of bespoke SVG math (axis scaling, bar
  positioning, grid lines, tooltip rendering), reuses the same
  card/header/empty-state shell.

Deferred (own follow-up PRs)
- `pipeline-donut.tsx` — has user-customisable per-stage hex
  colours; Tremor's palette would override them. Needs either a
  small upstream patch or a `colors` override path.
- `conversations-chart.tsx` — area-chart conversion (largest of
  the three, 341 lines).
- The previous hand-rolled bar chart drew a horizontal dashed
  "target N minutes" reference line. Tremor BarChart doesn't
  expose Recharts primitives, so for now the target is promoted
  to a header pill (`target 5m`). On-chart reference line is a
  follow-up — either via a positioned overlay or an upstream
  `referenceLines` prop.

Verification
- `npm run lint`   → 0 errors (same 20 pre-existing warnings).
- `npm run typecheck` → clean.
- `npm test`       → 319/319 pass.
- `npm run build`  → succeeds, dashboard remains a static route.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-31 14:42:10 +03:00
.github test: foundational Vitest suite for security + critical pure logic 2026-05-18 16:06:02 +03:00
public feat(inbox): WhatsApp-style doodle background in the chat area 2026-05-22 10:06:34 +03:00
src feat(dashboard): adopt Tremor for charts — first integration 2026-05-31 14:42:10 +03:00
supabase/migrations fix(db): create profile.account_id before is_account_member helper 2026-05-31 13:06:14 +03:00
.editorconfig chore: contributor experience — CoC, templates, Dependabot, editor configs 2026-04-20 21:16:21 +03:00
.env.local.example feat(templates): submit-to-Meta endpoint + component-based form builder 2026-05-29 15:34:58 +02:00
.gitignore fix(webhook): require META_APP_SECRET, fail closed 2026-04-20 18:54:52 +03:00
.prettierignore chore: contributor experience — CoC, templates, Dependabot, editor configs 2026-04-20 21:16:21 +03:00
.prettierrc chore: contributor experience — CoC, templates, Dependabot, editor configs 2026-04-20 21:16:21 +03:00
AGENTS.md Initial commit from Create Next App 2026-04-16 17:52:39 +03:00
CHANGELOG.md feat(db): account-sharing schema foundation 2026-05-31 12:59:07 +03:00
CLAUDE.md Initial commit from Create Next App 2026-04-16 17:52:39 +03:00
components.json feat: initial commit 2026-04-16 17:53:27 +03:00
CONTRIBUTING.md chore: rename product to "CRM Template for WhatsApp" 2026-05-06 11:52:11 +03:00
eslint.config.mjs Initial commit from Create Next App 2026-04-16 17:52:39 +03:00
LICENSE chore: OSS metadata + LICENSE + SECURITY + complete env example 2026-04-20 20:41:14 +03:00
next.config.ts security: baseline response headers (CSP report-only + OWASP set) 2026-04-20 19:24:41 +03:00
package-lock.json feat(dashboard): adopt Tremor for charts — first integration 2026-05-31 14:42:10 +03:00
package.json feat(dashboard): adopt Tremor for charts — first integration 2026-05-31 14:42:10 +03:00
postcss.config.mjs Initial commit from Create Next App 2026-04-16 17:52:39 +03:00
README.md docs: add Deploy on Hostinger button to README 2026-05-19 17:04:25 +03:00
tsconfig.json Initial commit from Create Next App 2026-04-16 17:52:39 +03:00
vitest.config.ts test: foundational Vitest suite for security + critical pure logic 2026-05-18 16:06:02 +03:00

wacrm — CRM Template for WhatsApp

Self-hostable CRM template for WhatsApp® — shared inbox, contacts, sales pipelines, broadcasts, and no-code automations. Fork it, brand it, host it.

Deploy on Hostinger

License: MIT CI Next.js 16 Supabase Stars

The marketing site and self-host docs live in a separate repo: ArnasDon/wacrm-site (wacrm.tech). This repo is the product — clone or fork it to run your own CRM.

What you get out of the box

  • Shared inbox on the official WhatsApp Business API — multiple agents working one number, per-conversation assignment, status, and notes.
  • Contacts + tags + custom fields, CSV import, deduplication.
  • Sales pipelines (Kanban) with deals linked to conversations.
  • Broadcasts with Meta-approved templates, delivery + read tracking, per-recipient variable substitution.
  • No-code automations — triggers on inbound messages, new contacts, keywords, or schedule; conditional branches, waits, tags, webhooks. Visual builder.
  • Real-time dashboard — response times, daily volume, pipeline value, cross-module activity feed.
  • Account management — email, password, avatar, global sign-out.

Why fork this?

This is a template, not a product. Forking means you get:

  • Full ownership — your code, your Supabase project, your domain, your data. No SaaS lock-in, no seat pricing, no trust dance.
  • Full customisation — add the fields your team needs, remove the modules you don't, redesign anything. The stack is boring on purpose (Next.js + Supabase + Tailwind) so the learning curve is short.
  • Zero ops to start — Hostinger Managed Node.js deploys a fork in a few clicks. No Docker, no Kubernetes, no infra team needed.
  • Real security primitives — token encryption (AES-256-GCM), RLS on every table, HMAC-verified webhooks, CSP, rate limiting, CI typecheck/build on every PR.

Not a framework. Not an SDK. A concrete, working CRM you can stand up in an afternoon and make yours.

Quick start

# Fork on GitHub first: https://github.com/ArnasDon/wacrm → Fork
git clone https://github.com/<your-username>/wacrm.git
cd wacrm
npm install
cp .env.local.example .env.local   # fill in Supabase + Meta creds
npm run dev

Open http://localhost:3000. You'll be redirected to /login (or /dashboard if already signed in).

Documentation

Full self-host documentation — Supabase migrations, WhatsApp Business API config, and production deploy — lives at wacrm.tech/docs (source: ArnasDon/wacrm-site).

Key pages:

Stack

  • App — Next.js 16 (App Router), React 19, TypeScript, Tailwind v4.
  • Data — Supabase (Postgres + Auth + Storage + RLS).
  • WhatsApp — Meta Cloud API (official WhatsApp Business API).

Contributing

This is a template, not a collaborative product — the expected flow is fork → customise → deploy, not upstream contribution. Bug reports and security issues are welcome; feature PRs often belong in your fork rather than here. Details in CONTRIBUTING.md and .github/SECURITY.md.

License

MIT. Fork it, brand it, host it.