Description
Implement create stream API: validate payload, persist draft or confirmed stream, return stable stream_id and status.
Requirements and context
- Input validation; idempotency considered (separate issue can extend).
- Map fields to contract semantics where applicable.
Suggested execution
- Fork the repository and create a branch (example below).
- Implement changes in StreamPay-Backend (TypeScript / Express per
package.json).
- Keep the service secure, tested, and documented; prefer small, reviewable PRs.
git checkout -b feature/api-post-streams
Implementation targets
src/routes/streams.ts or src/controllers/streamsController.ts.
- Wire into
src/index.ts.
Tests and validation
-
supertest: 201 success, 400 validation, 401 if auth enabled.
-
Run npm test and npm run lint in StreamPay-Backend.
-
Cover edge cases; include test output and brief security notes in the PR description.
Guidelines
- Target minimum 95% test coverage on new or changed backend code (or justify gaps).
- Clear documentation (OpenAPI / README / inline docs as specified).
- Timeframe: 96 hours from assignment.
Example commit message
feat(backend): POST /api/v1/streams create endpoint
Description
Implement create stream API: validate payload, persist draft or confirmed stream, return stable
stream_idand status.Requirements and context
Suggested execution
package.json).Implementation targets
src/routes/streams.tsorsrc/controllers/streamsController.ts.src/index.ts.Tests and validation
supertest: 201 success, 400 validation, 401 if auth enabled.Run
npm testandnpm run lintinStreamPay-Backend.Cover edge cases; include test output and brief security notes in the PR description.
Guidelines
Example commit message