About this demo
A multi-tenant workspace platform — projects, tasks, posts, comments, tags, and an activity feed — built on Nuxt 4 with all server routes hitting Cloudflare D1 directly via @orphnet/d1-eloquent. No separate API tier.
The Hono sibling example at hono-example.d1-eloquent.orph.dev exposes the same endpoints with identical responses; both apps use the same migrations and the same models — only the HTTP transport differs.
Workspace: Acme HQ
- Slug
acme- Members
- 8
- Projects
- 3
- Posts
- 10
- Settings (JSON cast)
{"theme":"default","invite_only":false}
Members belongsToMany
- Liam Adamswill.nguyen443@mail.test
- Opal Andersonadminleomoore622@inbox.example
- Sam Wrightblake_nelson777@mail.test
- Quinn Hillvicmartinez375@sample.io
- Reed Nelsonfrank_flores364@example.com
- Frank Harrisiris.white79@mail.test
- Rita Johnsondave.mitchell241@demo.net
- Sara Taylorbobmartin945@test.org
Projects withCount("tasks")
- Marketing Site12 tasksIncididunt eiusmod excepteur veniam pariatur mollit ullamco quis anim et qui et.
- Mobile App12 tasksNostrud reprehenderit ad mollit nostrud lorem sint.
- Platform12 tasksExcepteur minim ad dolor reprehenderit sint reprehenderit laboris aliqua est.
Tasks (default scope: open + in_progress) morphToMany("tags")
- Exercitation tempor cillum ex irure ex nulla doopenP3→ Frank Harrisannouncement
- Adipiscing adipiscing et ex eiusmod amet anim culpaopenP3→ Reed Nelson
- Aute laborum laborum amet ut ea aute cillumopenP3→ Sara Taylor
- Eiusmod dolor tempor velit ad do elit reprehenderitopenP3→ Reed Nelson
- Deserunt magna quis commodo aute anim veniam voluptateopenP3→ Quinn Hill
- Laborum in irure ex velit sed commodo magnaopenP3→ Sam Wrightdesignannouncement
- Do fugiat magna non aute dolore sed temporopenP3→ Rita Johnson
- Proident minim nostrud enim laboris adipiscing deserunt mollitopenP2→ Frank Harrisbug
Showing 8 of 32. Try /api/workspaces/acme/tasks?status=done to see completed ones.
Posts paginateCursor
- Consequat minim consectetur magna do incididunt labore enim1593 viewsby Rita Johnson — 5/17/2026, 5:46:01 PM
- Consectetur amet incididunt excepteur anim ea incididunt mollit2001 viewsby Rita Johnson — 5/16/2026, 5:46:01 PM
- Irure qui et elit nostrud sunt ipsum eiusmod266 viewsby Liam Adams — 5/15/2026, 5:46:01 PM
- Irure commodo nulla ullamco aute labore tempor lorem688 viewsby Sam Wright — 5/14/2026, 5:46:01 PM
- Commodo amet deserunt deserunt esse ea excepteur commodo1441 viewsby Opal Anderson — 5/13/2026, 5:46:01 PM
- Fugiat excepteur id dolore occaecat ut nostrud officia1675 viewsby Frank Harris — 5/12/2026, 5:46:01 PM
- Est labore ex aliquip minim irure quis proident1376 viewsby Sara Taylor — 5/11/2026, 5:46:01 PM
- Mollit aliqua minim id consectetur ut cupidatat occaecat1178 viewsby Frank Harris — 5/10/2026, 5:46:01 PM
Activity feed morphTo (actor + subject)
- post.published by Liam Adamspost → Irure qui et elit nostrud sunt ipsum eiusmod
- post.published by Frank Harrispost → Mollit aliqua minim id consectetur ut cupidatat occaecat
- post.published by Rita Johnsonpost → Consectetur amet incididunt excepteur anim ea incididunt mollit
- post.published by Opal Andersonpost → Commodo amet deserunt deserunt esse ea excepteur commodo
- post.published by Rita Johnsonpost → Consequat minim consectetur magna do incididunt labore enim
- post.published by Sara Taylorpost → Est labore ex aliquip minim irure quis proident
Try the API directly
GETtable links open the live JSON in a new tab. Write endpoints (POST/PATCH/DELETE) are listed below as curl recipes.
GET /apiGET /api/workspacesGET /api/workspaces/acmeGET /api/workspaces/acme/projectsGET /api/workspaces/acme/tasksGET /api/workspaces/acme/tasks?status=doneGET /api/workspaces/acme/postsGET /api/workspaces/acme/posts/post-1-do-suntGET /api/audit/post/7a684d8f-e792-46bb-a66d-5d669e1d5378GET /api/audit/task/57d39ccc-5e89-4769-aa0c-5987d0aef225GET /api/feed?workspace=acmeGET /api/search?q=loremGET /api/tags
curl recipes for write endpoints (POST / PATCH / DELETE)
# Re-seed (wipes + reseeds the workspace)
curl -X POST https://nuxt-example.d1-eloquent.orph.dev/api/admin/seed?fresh=1
# Create a task (records an activity event + create revision)
curl -X POST https://nuxt-example.d1-eloquent.orph.dev/api/workspaces/acme/tasks \
-H "content-type: application/json" \
-d '{"project_id":"<project-id>","title":"new task","priority":3}'
# Update a task (writes a revision row)
curl -X PATCH https://nuxt-example.d1-eloquent.orph.dev/api/workspaces/acme/tasks/57d39ccc-5e89-4769-aa0c-5987d0aef225 \
-H "content-type: application/json" \
-d '{"status":"done","priority":5}'
# Soft-delete a task
curl -X DELETE https://nuxt-example.d1-eloquent.orph.dev/api/workspaces/acme/tasks/57d39ccc-5e89-4769-aa0c-5987d0aef225
# Comment on a task (morphMany)
curl -X POST https://nuxt-example.d1-eloquent.orph.dev/api/workspaces/acme/tasks/57d39ccc-5e89-4769-aa0c-5987d0aef225/comments \
-H "content-type: application/json" \
-d '{"author_id":"08ef2012-273a-4d62-8333-5de923b75b79","body":"LGTM"}'
# Attach a tag to a task (morphToMany pivot)
curl -X POST https://nuxt-example.d1-eloquent.orph.dev/api/tags/<tag-id> # GET /api/tags/attach \
-H "content-type: application/json" \
-d '{"subject_type":"task","subject_id":"57d39ccc-5e89-4769-aa0c-5987d0aef225"}'
# Sync a task's tags (replace the full set)
curl -X POST https://nuxt-example.d1-eloquent.orph.dev/api/tags/sync \
-H "content-type: application/json" \
-d '{"subject_type":"task","subject_id":"57d39ccc-5e89-4769-aa0c-5987d0aef225","tag_ids":["<tag1>","<tag2>"]}'full manifest from /api
POST /api/admin/seed?fresh=1GET /api/workspacesGET /api/workspaces/:slugGET /api/workspaces/:slug/projectsGET /api/workspaces/:slug/tasksPOST /api/workspaces/:slug/tasksPATCH /api/workspaces/:slug/tasks/:idDELETE /api/workspaces/:slug/tasks/:idPOST /api/workspaces/:slug/tasks/:id/commentsGET /api/workspaces/:slug/postsGET /api/workspaces/:slug/posts/:postSlugGET /api/feed?workspace=:slugGET /api/search?q=...GET /api/tagsPOST /api/tags/:id/attachPOST /api/tags/:id/detachPOST /api/tags/syncGET /api/audit/:type/:idGET /api/audit/tasks/:id/asof/:ts