mirror of
https://github.com/Luchexx/wacrm.git
synced 2026-11-02 09:19:51 +00:00
Completes the public API roadmap (#245): register HTTPS endpoints to be POSTed to when things happen in an account, so automations can react to inbound activity instead of polling. - Migration 028: account-scoped webhook_endpoints (secret stored AES-GCM-encrypted) + an atomic record_webhook_failure() function. - Scope webhooks:manage; management API GET/POST /api/v1/webhooks and GET/PATCH/DELETE /api/v1/webhooks/{id} (secret returned once). - Events message.received / conversation.created / message.status_updated dispatched from the inbound webhook handler's after() block. - Signed delivery (X-Wacrm-Signature = HMAC-SHA256 over t.body), single best-effort attempt, auto-disable after consecutive failures. - Versioned 0.4.0; docs/public-api.md Webhooks section; CHANGELOG. Fixes from the adversarial code review of this diff: - SSRF: block private/loopback/link-local (incl. cloud metadata) targets at delivery time + redirect:'manual' so a public URL can't bounce internal (src/lib/webhooks/ssrf.ts). - Status mirror UPDATE no longer uses .select().maybeSingle() (message_id is non-unique); account resolved via a bounded limit(1) read. - Atomic failure counter via SQL RPC (was a racy read-modify-write). - conversation.created emitted before the reaction short-circuit. - Per-delivery id added for receiver dedupe; docs state at-least-once / unordered delivery. - Signature verify tolerates hex case / header whitespace. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
86 lines
2.1 KiB
JSON
86 lines
2.1 KiB
JSON
{
|
|
"name": "wacrm",
|
|
"version": "0.4.0",
|
|
"private": true,
|
|
"description": "Self-hostable CRM template for WhatsApp built on Next.js and Supabase — shared inbox, contacts, sales pipelines, broadcasts, and no-code automations.",
|
|
"license": "MIT",
|
|
"author": "Arnas Donauskas",
|
|
"homepage": "https://github.com/ArnasDon/wacrm",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/ArnasDon/wacrm.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/ArnasDon/wacrm/issues"
|
|
},
|
|
"keywords": [
|
|
"crm",
|
|
"whatsapp",
|
|
"whatsapp-business-api",
|
|
"nextjs",
|
|
"supabase",
|
|
"automation",
|
|
"broadcast",
|
|
"self-hosted",
|
|
"template"
|
|
],
|
|
"engines": {
|
|
"node": ">=20.0.0"
|
|
},
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "eslint",
|
|
"typecheck": "tsc --noEmit",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check .",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest"
|
|
},
|
|
"dependencies": {
|
|
"@base-ui/react": "^1.6.0",
|
|
"@dagrejs/dagre": "^3.0.0",
|
|
"@dnd-kit/core": "^6.3.1",
|
|
"@dnd-kit/sortable": "^10.0.0",
|
|
"@dnd-kit/utilities": "^3.2.2",
|
|
"@supabase/ssr": "^0.12.0",
|
|
"@supabase/supabase-js": "^2.107.0",
|
|
"@xyflow/react": "^12.11.0",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"date-fns": "^4.4.0",
|
|
"lucide-react": "^1.22.0",
|
|
"next": "16.2.6",
|
|
"opus-recorder": "^8.0.5",
|
|
"react": "19.2.4",
|
|
"react-dom": "19.2.4",
|
|
"recharts": "^3.8.1",
|
|
"shadcn": "^4.11.0",
|
|
"sonner": "^2.0.7",
|
|
"tailwind-merge": "^3.6.0",
|
|
"tw-animate-css": "^1.4.0"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/postcss": "^4",
|
|
"@types/node": "^26",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"eslint": "^9",
|
|
"eslint-config-next": "16.2.6",
|
|
"prettier": "^3.9.1",
|
|
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
"tailwindcss": "^4",
|
|
"typescript": "^6",
|
|
"vitest": "^4.1.9"
|
|
},
|
|
"overrides": {
|
|
"postcss": "^8.5.10",
|
|
"ip-address": "^10.1.1",
|
|
"fast-uri": "^3.1.2",
|
|
"hono": "^4.12.25",
|
|
"js-yaml": "^4.2.0",
|
|
"@babel/core": "^7.29.6"
|
|
}
|
|
}
|