Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
@@ -4,8 +4,7 @@ Tenant-authored forms that other websites can embed via a single
|
||||
`<script>` tag. Submissions land in the tenant inbox and can optionally
|
||||
route to CRM contacts, entity rows, webhooks or notification emails.
|
||||
|
||||
Phase 05 task #58 — spec:
|
||||
`docs/improvement-plan/05-business-features/form-widget.md`.
|
||||
Phase 05 task #58.
|
||||
|
||||
## Architecture
|
||||
|
||||
@@ -28,7 +27,7 @@ Four layers:
|
||||
implemented, tested, and wired from the `worker-general` entrypoint.
|
||||
Webhook follow-ups emit `webhook.form-submission.deliver`, which is
|
||||
bridged by `worker-mail` from `outbox.webhook` onto the existing
|
||||
`toolctrl.email` `deliver-webhook` processor.
|
||||
`hivegrid.email` `deliver-webhook` processor.
|
||||
5. **Tenant admin** — list + create at `/:tenant/forms`, edit and
|
||||
submissions inbox at `/:tenant/forms/:id`. The edit page hosts a
|
||||
visual drag-drop **form-builder** (see below) backed by
|
||||
@@ -115,7 +114,7 @@ either rejects the request or quietly drops it (honeypot).
|
||||
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
|
||||
| Origin allowlist | `Origin` header matched against `Form.allowedOrigins`. Empty allowlist = no submissions. Supports `*.example.com` wildcards. | per-form |
|
||||
| Honeypot | A hidden field with key `hp_extra_data`. When filled, the API returns 204 silently. | always on |
|
||||
| Rate-limit | Sliding-window via `@toolctrl/shared-store`: 10/min/IP, 100/min/origin. | static |
|
||||
| Rate-limit | Sliding-window via `@hivegrid/shared-store`: 10/min/IP, 100/min/origin. | static |
|
||||
| Turnstile | Cloudflare CAPTCHA, opt-in per form (`config.turnstileEnabled=true`) + feature flag `form-widget-turnstile`. | per-form + global flag |
|
||||
|
||||
## Submission targets
|
||||
@@ -144,13 +143,13 @@ follow-up publisher.
|
||||
Webhook targets are delivered through a second queue hop: routing emits
|
||||
`webhook.form-submission.deliver`; `WORKER_QUEUE_GROUP=mail` subscribes
|
||||
to `outbox.webhook`, validates the tenant-scoped payload, then enqueues
|
||||
the existing `toolctrl.email` `deliver-webhook` job with an idempotency key
|
||||
the existing `hivegrid.email` `deliver-webhook` job with an idempotency key
|
||||
based on the outbox event id, dispatch key, or submission id. Notification
|
||||
email follow-ups use the same pattern: routing emits
|
||||
`mail.transactional.form-submission`; `WORKER_QUEUE_GROUP=mail`
|
||||
subscribes to `outbox.mail`, validates the tenant-scoped payload, renders
|
||||
a compact operator notification, then enqueues the existing
|
||||
`toolctrl.email` `send-transactional-email` job.
|
||||
`hivegrid.email` `send-transactional-email` job.
|
||||
|
||||
The PII-sensitive submitter IP is never stored raw; only the
|
||||
`sha256(ip).slice(0, 32)` lives in `FormSubmission.ipHash`.
|
||||
@@ -215,7 +214,7 @@ When `notifyEmails` is non-empty, the same follow-up planner emits
|
||||
`mail.transactional.form-submission` with `recipients`, `targetType`,
|
||||
`targetId` and `values`. The worker host publishes the returned outbox
|
||||
events transactionally during routing, and `worker-mail` bridges them
|
||||
from `outbox.mail` into `toolctrl.email`. Operator-owned delivery
|
||||
from `outbox.mail` into `hivegrid.email`. Operator-owned delivery
|
||||
concerns include provider credentials, queue health and any
|
||||
tenant-facing delivery-status UX.
|
||||
|
||||
@@ -226,9 +225,9 @@ they're allowed to save (SSRF defense).
|
||||
## CLI
|
||||
|
||||
```
|
||||
toolctrl-cli forms list --tenant <tenantId>
|
||||
toolctrl-cli forms create --tenant <tenantId> --name "Contact" --origin https://www.example.com
|
||||
toolctrl-cli forms delete --id <formId>
|
||||
hivegrid-cli forms list --tenant <tenantId>
|
||||
hivegrid-cli forms create --tenant <tenantId> --name "Contact" --origin https://www.example.com
|
||||
hivegrid-cli forms delete --id <formId>
|
||||
```
|
||||
|
||||
## Environment variables
|
||||
|
||||
Reference in new issue
Block a user