wacrm/docs/README.md
Arnas Donauskas 7cd0f46369
docs: README polish + architecture + alt hosts
Finishes the template-readiness sequence. All docs — nothing runtime.

README.md
  Rewrites the landing page of the repo to actually sell what it is
  to someone finding the repo cold on GitHub search.
  - Shields.io badges: MIT, CI status, Next.js 16, Supabase, GitHub
    stars.
  - "What you get out of the box" bullet list — inbox, contacts,
    pipelines, broadcasts, automations, dashboard, account
    management — so the feature surface is visible before the reader
    scrolls.
  - "Why fork this?" section: full ownership, full customisation,
    zero ops to start, real security primitives. Frames WaCRM as a
    template, not an SDK.
  - Docs section reorganised into Setup / Deploy / Reference to
    match the in-app /docs viewer and docs/README.md.
  - Contributing section rewrites the stale "Pull requests welcome"
    line to match the fork-first framing from PR #73.

docs/architecture.md  (new)
  One-page tour for forkers: stack table, full folder layout,
  two ASCII request-lifecycle diagrams (inbound webhook + outbound
  send), security primitives rundown, and a "where to change things"
  index that maps common customisation tasks to source files. This
  is the thing I wish I'd had the first time I opened a forked
  template.

docs/deployment-alternatives.md  (new)
  Short blocks for Vercel, Railway, raw VPS, and Docker. Each covers
  env-var setup, cron strategy (Vercel cron without custom headers
  is a footgun worth calling out), and trade-offs. Keeps Hostinger
  as the primary recommendation — this page is for people whose
  constraints rule it out.

docs/README.md
  - Reading order grouped as Setup / Deploy / Reference, adding the
    two new pages.
  - Stack-at-a-glance updated: encryption is AES-256-GCM, not CBC
    (the PR #71 change that earlier docs hadn't caught up to).

src/lib/docs/content.ts
  Registers the two new markdown files in the ORDER map so they
  appear in the in-app /docs sidebar under the Reference section,
  with prev/next pagination wiring.

Verified: /docs, /docs/architecture, /docs/deployment-alternatives,
and /docs/getting-started all return 200 from the dev server.
Sidebar shows 9 pages grouped Setup / Deploy / Reference with the
new entries. Typecheck clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 21:43:42 +03:00

2.2 KiB

WaCRM documentation

WaCRM is a self-hostable WhatsApp CRM built on Next.js and Supabase. These docs walk you from a freshly forked repo to a production deploy.

Reading order

Setup

  1. Getting started — fork the repo, install, run locally.
  2. Supabase setup — create the database, run the migrations, grab the keys.
  3. WhatsApp setup — create a Meta app, connect a phone number, wire the webhook.
  4. Environment variables — the full reference.

Deploy

  1. Deploy on Hostinger — recommended hosting walkthrough (Managed Node.js Hosting).
  2. Alternative hosts — Vercel, Railway, raw VPS, Docker / Kubernetes.
  3. Automations cron — schedule the pending executions drain so waits and delays fire.

Reference

  1. Architecture — stack, folder layout, request lifecycle, where to change things.
  2. Troubleshooting — the usual suspects.

What you will need before starting

  • A GitHub account (to fork the repo).
  • A Supabase project on any paid or free tier.
  • A Meta for Developers account with a WhatsApp Business app.
  • A WhatsApp phone number that is not already tied to the regular WhatsApp or WhatsApp Business mobile apps.
  • A Hostinger Managed Node.js Hosting plan (or any Node host that runs long-running Node.js 20+ processes).

Stack at a glance

  • Frontend / API — Next.js 16 (App Router), React 19, Tailwind v4.
  • Database + auth + storage — Supabase (Postgres + RLS).
  • WhatsApp transport — Meta Cloud API (official WhatsApp Business API).
  • Encryption — AES-256-GCM for per-user WhatsApp access + verify tokens at rest. Legacy CBC-encrypted rows self-heal on next use.
  • Scheduler — cron (or any pinger) that hits GET /api/automations/cron.

Getting help

If something is unclear or broken, open an issue against the source repo: https://github.com/ArnasDon/wacrm/issues.