Status: Backlog | Priority: P1 | Created: 2026-02-20 | Depends-on: cleanup-verification, headless-plugin
Port the Datomic portion of fulcro-rad-demo into src/demo of this project, converting everything to CLJC with headless support. This provides a full-stack exerciser for REPL-based testing without a browser.
../fulcro-rad-demo/ — Datomic backend with forms, reports, containers, picker options, subforms, validation../dataico-expansion/ — Reference for headless full-stack testing patternsrc/demo/com/example/model/)account.cljc — User accounts with addresses (subform), roles (enum), emailaddress.cljc — Address subform with state enuminvoice.cljc — Invoice with line items (nested), customer pickerline_item.cljc — Line item with item ref, quantity, priceitem.cljc — Inventory items with categoriescategory.cljc — Item categoriesmodel.cljc — Aggregated attribute listseed.cljc — Database seeding (convert from .clj to .cljc where possible)Remove from port: file.cljc, sales.cljc (mock data), timezone.cljc (35K entries), authorization.clj (deferred)
src/demo/com/example/ui/)All CLJC files:
account_forms.cljc — Account form (remove blob/avatar, file upload)address_forms.cljc — Address subforminvoice_forms.cljc — Invoice form with line items, customer picker quick-createitem_forms.cljc — Item formline_item_forms.cljc — Line item subforminventory_report.cljc — Item inventory reportinvoice_report.cljc — Account invoices reportui.cljc — Root component (remove DR router, use statecharts routing)Remove from port: login_dialog.cljc (auth deferred), master_detail.cljc (UISM demo), sales_report.cljc (mock data), file_forms.cljc (blob), dashboard.cljc (optional)
src/demo/com/example/components/)datomic.cljc — Datomic connections (Mount state)auto_resolvers.cljc — Auto-generated resolverssave_middleware.cljc — Form save (remove blob middleware)delete_middleware.cljc — Delete operationsparser.cljc — Pathom parserserver.cljc — HTTP server (use conditional compilation for http-kit)config.cljc — ConfigurationRemove from port: blob_store.clj, database_queries.clj (custom report queries — add back if needed), ring_middleware.clj (convert to CLJC)
src/demo/com/example/client.cljc)Follow dataico-expansion pattern:
h/build-test-app with http-kit-driver, full URLrad-app/fulcro-rad-app with relative /apisrc/demo/com/example/development.cljc — (go), (restart) for REPLsrc/demo/com/example/headless.clj — Headless client helper (following dataico-expansion pattern).clj → .cljc with reader conditionals where neededrstate, istate, route-to!)install-ui-controls! → Headless plugin multimethods auto-registerh/build-test-app, :event-loop? :immediate;; Start server
(development/go)
;; Create headless client
(def app (client/init {:port 3000}))
;; Render and inspect
(h/render-frame! app)
(h/hiccup-frame app)
;; Navigate, interact
(h/click-on-text! app "Inventory")
(h/text-exists? (h/hiccup-frame app) "Items")
fulcro-rad-datomic (and other RAD database adapters) depend on old com.fulcrologic/fulcro-rad. The demo's deps.edn MUST use :override-deps to ensure old RAD is NOT on the classpath:
:override-deps {com.fulcrologic/fulcro-rad {:local/root "."}}
This ensures all RAD references resolve to this project (fulcro-rad-statecharts), not the published fulcro-rad artifact. Without this, transitive deps from fulcro-rad-datomic will pull in the old RAD and cause conflicts.
Reference: fulcro-rad-datomic source is at ../fulcro-rad-datomic/ — maintain compatible namespace names so it can reference this library without modification.
(development/go) → seeds Datomic, starts serverCan you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |