Skip to content

Create example project: Todo API (Cloudflare Workers) #18

Description

@PAMulligan

Description

Create a complete example project demonstrating Nerva's Cloudflare Workers deployment path. A Todo API is the "Hello World" of REST APIs — simple enough to learn from, complex enough to showcase CRUD, validation, and auth patterns.

Why

New users need a working reference implementation to understand how all the pieces fit together. The README mentions three quick-start paths, but there are no concrete example projects to examine. A Todo API on Cloudflare Workers is the most requested developer experience for edge computing.

Acceptance Criteria

  • Create examples/todo-api-cloudflare/ directory
  • Include a complete, working API with:
    • CRUD endpoints for todos (GET /todos, POST /todos, GET /todos/:id, PUT /todos/:id, DELETE /todos/:id)
    • Drizzle schema with D1 database
    • Zod request/response validation
    • Integration tests (Vitest)
    • wrangler.toml configuration
    • Proper TypeScript strict mode
  • Include a README.md with:
    • Prerequisites
    • Setup instructions
    • API endpoint documentation
    • How to deploy to Cloudflare Workers
  • Generated using Nerva's setup-project.sh --cloudflare as the starting point
  • All tests pass
  • Add link from the main README's Quick Start section

Notes

This should serve as a reference implementation that contributors can point to when answering "how does this work?" questions.

Metadata

Metadata

Assignees

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions