Skip to content

Create example project: Blog API (Node.js/Docker) #19

@PAMulligan

Description

@PAMulligan

Description

Create a complete example project demonstrating Nerva's Node.js/Docker deployment path with a blog API. This covers a more realistic multi-resource API with relations, authentication, and pagination.

Why

The Cloudflare Workers example covers edge deployment; this example covers the traditional server deployment path. A blog API demonstrates features beyond basic CRUD: resource relations (users → posts → comments), authentication, pagination, and Docker orchestration.

Acceptance Criteria

  • Create examples/blog-api-node/ directory
  • Include a complete, working API with:
    • Resources: users, posts, comments (with relations)
    • JWT authentication (register, login, refresh)
    • Pagination (offset-based with meta)
    • Drizzle schema with PostgreSQL
    • Zod validation on all endpoints
    • Integration tests covering auth flows
    • Dockerfile + docker-compose.yml (API + PostgreSQL)
    • Database seed script
  • Include a README.md with:
    • Prerequisites (Docker, pnpm)
    • docker compose up quick start
    • API documentation with example requests
    • Database schema diagram (text-based)
  • Generated using Nerva's setup-project.sh --node as the starting point
  • All tests pass
  • Add link from the main README's Quick Start section

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions