Skip to content
Back to search

mini-crm-site

MarketplaceWorks with Claude CodeGitHub

A website and a CRM for a small service business on one Cloudflare Worker and one D1 database.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/mavrin-xv--mini-crm-site/badge.svg)](/listings/mavrin-xv--mini-crm-site)

HTML

<a href="/listings/mavrin-xv--mini-crm-site"><img src="/api/listings/mavrin-xv--mini-crm-site/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

cd app
node --no-warnings test/run.mjs                  # 20 passed, no account needed
npx wrangler d1 create crm                       # paste the id into wrangler.toml (from wrangler.toml.example)
npx wrangler d1 migrations apply crm --remote
npx wrangler secret put ADMIN_PASSWORD
npx wrangler secret put SESSION_SECRET
npx wrangler secret put TG_BOT_TOKEN && npx wrangler secret put TG_CHAT_ID
npx wrangler deploy
python3 ../skills/crm-setup/scripts/smoke_test.py https://<your-worker>.workers.dev --password '<ADMIN_PASSWORD>'

Try it without deploying: `npx wrangler dev`, then open `http://localhost:8787` and `/admin`.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 15 lines
  1. {
  2. "name": "mini-crm-site",
  3. "plugins": [
  4. {
  5. "name": "mini-crm-site",
  6. "source": "./",
  7. "description": "A website and CRM for a small service business on one free Cloudflare Worker and D1 database: lead form, operator board with statuses, Telegram or webhook alerts, late-lead and daily digest cron, plus skills to deploy, customise, operate, audit and add bookings.",
  8. "version": "0.1.0"
  9. }
  10. ],
  11. "owner": {
  12. "name": "Artem Mavrin",
  13. "url": "https://github.com/mavrin-xv"
  14. }
  15. }
README.md · README · 129 lines
  1. ![mini-crm-site](assets/banner.png)
  2. # mini-crm-site
  3. **A website and a CRM for a small service business on one free Cloudflare Worker and one D1 database: the form saves the lead, the operator moves it across a board, and nobody waits two days for a call back.**
  4. Leads from the site land in an inbox nobody checks, a spreadsheet nobody updates, or a paid CRM that is overkill for one person answering the phone.
  5. [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
  6. ![Works with](https://img.shields.io/badge/works%20with-Claude%20Code%20%7C%20Codex%20%7C%20any%20SKILL.md%20agent-black)
  7. ![Python](https://img.shields.io/badge/helpers-Python%203.8%2B%20stdlib-green)
  8. ![Cloudflare](https://img.shields.io/badge/runs%20on-Cloudflare%20free%20tier-orange)
  9. ```bash
  10. git clone https://github.com/mavrin-xv/mini-crm-site && cd mini-crm-site
  11. ./install.sh # or: ./install.sh --project
  12. ```
  13. <!-- install-notes:start -->
  14. Other ways in: as a Claude Code plugin, run `/plugin marketplace add mavrin-xv/mini-crm-site` and then `/plugin install mini-crm-site@mini-crm-site`. For Codex or another agent that reads `SKILL.md`, copy the folders under `skills/` into its skills directory. On Windows, run `install.sh` from Git Bash or WSL and type `py -3` where these docs say `python3`.
  15. <!-- install-notes:end -->
  16. Then open the folder in your agent and say "set up the CRM".
  17. ---
  18. ## What it solves
  19. | Pain | Fix in this repo |
  20. |---|---|
  21. | Form submissions go to email and get lost | Every lead is a row in D1 before the visitor sees "thanks"; alerts are a copy, not the record |
  22. | Nobody knows which leads are still open | Board with columns new, contacted, quoted, booked, done, lost, spam, plus notes and a change log |
  23. | Leads wait hours for a first call | Alert on arrival, a second alert if nobody touched it within the SLA, daily digest |
  24. | Double taps create duplicate leads | Dedup by phone and service inside 30 minutes |
  25. | Bots fill the form | Honeypot, per-IP rate limit (hashed), optional Turnstile |
  26. | "Where do our leads come from?" | UTM fields captured from the URL; weekly report by source, speed to first contact, stale leads |
  27. | Hand-rolled Workers leak customer data | Static audit and a live probe that flags public read endpoints, default passwords, tokens in HTML |
  28. | Same crew booked twice | Bookings add-on with holds, a 409 on overlap and an overlap checker |
  29. ## What's inside
  30. | Skill | What it does | Say |
  31. |---|---|---|
  32. | `crm-setup` | Deploys the template to a live URL and proves it with an 18-check smoke test | "set up the CRM", "deploy it to Cloudflare" |
  33. | `crm-customize` | Changes services, statuses, fields and landing copy without breaking the database, form and board sync | "add a field for square meters", "rename the services" |
  34. | `crm-operate` | Daily routine, weekly pipeline report, speed-to-lead and stale-lead rules | "weekly lead report", "which leads are stuck" |
  35. | `crm-hardening` | Security and QA audit of this or any lead Worker, static scan plus live probe | "is my CRM secure", "audit before launch" |
  36. | `crm-bookings` | Adds time-slot bookings with expiring holds and finds double bookings | "add bookings", "we got double-booked" |
  37. Also: `app/` (the working template, 20 offline tests), `templates/` (bookings add-on), `examples/` (sample data, a deliberately broken Worker for the audit), `docs/architecture.md`.
  38. ## Quick start
  39. ```bash
  40. cd app
  41. node --no-warnings test/run.mjs # 20 passed, no account needed
  42. npx wrangler d1 create crm # paste the id into wrangler.toml (from wrangler.toml.example)
  43. npx wrangler d1 migrations apply crm --remote
  44. npx wrangler secret put ADMIN_PASSWORD
  45. npx wrangler secret put SESSION_SECRET
  46. npx wrangler secret put TG_BOT_TOKEN && npx wrangler secret put TG_CHAT_ID
  47. npx wrangler deploy
  48. python3 ../skills/crm-setup/scripts/smoke_test.py https://<your-worker>.workers.dev --password '<ADMIN_PASSWORD>'
  49. ```
  50. Try it without deploying: `npx wrangler dev`, then open `http://localhost:8787` and `/admin`.
  51. ## How it works
  52. ```text
  53. visitor ─ form ─► POST /api/lead ─► checks (honeypot, Turnstile, validate, rate limit)
  54. │
  55. ├─► D1: contact (by phone) + lead + 'created' event
  56. ├─► 200 to visitor
  57. └─► waitUntil: Telegram / webhook ─► notify_ok | notify_fail
  58. operator ─ /admin ─► signed cookie ─► board: status, value, follow-up, notes, history
  59. cron every 15 min ─► lead untouched past SLA in work hours ─► one reminder
  60. └► DIGEST_HOUR local ─► yesterday's leads, open count, overdue follow-ups
  61. weekly ─► wrangler d1 export ─► report.py ─► by source, speed to lead, stale, win rate
  62. ```
  63. Two rules carry the design. The database is the record and alerts are best effort, so a broken bot never loses a lead. Every list (services, statuses) lives in `config.js`, is enforced by a CHECK in the database, and `check_config.py` fails if the two drift.
  64. ## Configure
  65. | Setting | Where | Default |
  66. |---|---|---|
  67. | Business name, currency, timezone | `app/src/config.js` `BUSINESS` | Northwind Cleaning (invented), USD, America/Chicago |
  68. | Services on the form | `config.js` `SERVICES` + `public/index.html` | regular, deep, move-out, office |
  69. | Statuses | `config.js` `STATUSES` + migration CHECK | new, contacted, quoted, booked, done, lost, spam |
  70. | Work hours, SLA, digest hour | `config.js` | 8 to 20, 15 minutes, 8:00 |
  71. | Login | secrets `ADMIN_PASSWORD`, `SESSION_SECRET` | none (admin returns 503 until set) |
  72. | Alerts | secrets `TG_BOT_TOKEN` + `TG_CHAT_ID`, and/or `NOTIFY_WEBHOOK_URL` | none |
  73. | Bot check | secret `TURNSTILE_SECRET` + site key in the page | off |
  74. | Board link in alerts | `[vars] PUBLIC_URL` | empty |
  75. ## Honest limits
  76. - One shared operator password. Several named users need a `users` table (sketched in `docs/architecture.md`).
  77. - No email sending, no SMS, no calendar sync. The webhook hands off to a tool that does those.
  78. - The free tier is plenty for a small business (Cloudflare's published D1 and Workers limits are in `skills/crm-setup/references/deploy-steps.md`), but check the current numbers before you rely on them.
  79. - D1 has no row locks. The bookings add-on re-checks after insert; very busy public booking needs a Durable Object.
  80. - Tested: 20 offline tests and 8 bookings tests on Node's built-in SQLite, the 18-check smoke test and the UI against `wrangler dev` locally. Not tested by us: a real deploy to a Cloudflare account, real Telegram delivery, Turnstile, the cron on Cloudflare's scheduler.
  81. - Tested with Claude Code. Other agents that read SKILL.md files should work; not tested.
  82. ## Credits
  83. - Cloudflare's agent skills https://github.com/cloudflare/skills (Apache-2.0): Workers and D1 conventions, wrangler command order. Idea only, no text copied.
  84. - https://github.com/crmkit/crmkit (MIT): append-only activity log per record, reminders as data. Idea only.
  85. - https://github.com/cloudflare/d1-northwind (MIT): one-database layout with schema and seed scripts as separate files.
  86. - Form pipeline order (honeypot, bot check, validate, save, then notify) follows common Workers form handlers such as the Astro forms examples on npm; no code copied.
  87. - Speed-to-lead background: Oldroyd, McElheran, Elkington, "The Short Life of Online Sales Leads", Harvard Business Review, March 2011, https://hbr.org/2011/03/the-short-life-of-online-sales-leads.
  88. ## Contributing
  89. See `CONTRIBUTING.md`. Coding agents should read `AGENTS.md` first.
  90. <!-- author:start -->
  91. ## Author
  92. Built and maintained by [Artem Mavrin](https://github.com/mavrin-xv). This repo is one of a set of agent skill packs for marketing and operations work. Each one installs on its own; the full list is in [agent-skill-packs](https://github.com/mavrin-xv/agent-skill-packs). If a pack saved you an afternoon, a star helps other people find it.
  93. <!-- author:end -->
  94. ## License
  95. MIT, see `LICENSE`.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.