Commit b10dba6
committed
feat: integrate form submissions into content management system
Each form auto-creates a shadow collection in the collections table.
Submissions dual-write to both form_submissions and content, enabling
unified listing at /admin/content with form badge, submission metadata
panel, and full search/filter support.
- New migration (032): source_type/source_id on collections, content_id on form_submissions, system user
- New service (form-collection-sync.ts): shadow collection management, schema derivation, dual-write, backfill
- Bootstrap integration: syncs form collections on startup
- Content list: form badge, submitter metadata, form collections in filter
- Content edit: read-only Submission Info panel
- Submissions redirect: /admin/forms/:id/submissions → /admin/content?model=form_{name}
- Collection isolation: form-derived collections hidden from /admin/collections and new-content picker
- Cleanup protection: getManagedCollections() excludes source_type='form'
- Turnstile settings: PUT /admin/forms/:id accepts turnstile_enabled/turnstile_settings
- 82 unit tests (98.3% statement coverage) + 12 E2E tests covering full integration flow1 parent 2250de9 commit b10dba6
80 files changed
Lines changed: 4717 additions & 1337 deletions
File tree
- my-sonicjs-app/migrations
- packages/core
- dist
- migrations
- src
- db
- middleware
- routes
- services
- templates/pages
- tests/e2e
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1700 | 1700 | | |
1701 | 1701 | | |
1702 | 1702 | | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
1703 | 1710 | | |
1704 | 1711 | | |
1705 | 1712 | | |
| |||
2108 | 2115 | | |
2109 | 2116 | | |
2110 | 2117 | | |
2111 | | - | |
2112 | | - | |
| 2118 | + | |
| 2119 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
This file was deleted.
Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
| 424 | + | |
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
| |||
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
620 | | - | |
621 | | - | |
| 620 | + | |
| 621 | + | |
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
This file was deleted.
This file was deleted.
0 commit comments