v2/examples/rest-api-simple/implementation-plan.md
Implement a minimal REST API for task management demonstrating core REST principles with Express.js.
SPARC Mode: code
Tasks:
Deliverables:
Command:
npx claude-flow sparc run code "Setup Express server with health endpoint for rest-api-simple" --non-interactive
SPARC Mode: tdd
Tasks:
Test Coverage:
Command:
npx claude-flow sparc run tdd "Implement CRUD operations for tasks with full test coverage" --non-interactive
SPARC Mode: code
Tasks:
Deliverables:
Command:
npx claude-flow sparc run code "Add input validation and error handling to REST API" --non-interactive
SPARC Mode: docs-writer
Tasks:
Deliverables:
Command:
npx claude-flow sparc run docs-writer "Create comprehensive documentation for simple REST API" --non-interactive
SPARC Mode: security-review
Tasks:
Command:
npx claude-flow sparc run security-review "Review REST API for security best practices" --non-interactive
examples/rest-api-simple/
├── server.js # Main application file
├── server.test.js # Test suite
├── package.json # Dependencies and metadata
├── package-lock.json # Lock file
├── README.md # User documentation
├── architecture.md # System design (already created)
├── api-specification.md # API contracts (already created)
└── implementation-plan.md # This file
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run with coverage
npm run test:coverage
Start Development Server
npm run dev # Uses nodemon for auto-reload
Run Tests
npm test
Manual Testing
# Use curl or Postman to test endpoints
curl http://localhost:3000/api/v1/tasks
For faster implementation, use background swarms:
# Complete implementation in parallel
npx claude-flow swarm "Implement complete simple REST API based on architecture" \
--strategy development --background --parallel --testing \
--max-agents 4 --output ./
# Monitor progress
npx claude-flow monitor
express: ^4.18.2jest: ^29.7.0supertest: ^6.3.3nodemon: ^3.0.1PORT: Server port (default: 3000)NODE_ENV: Environment (development/production)No other configuration needed!