/server/routes/deals.ts.
Route Capabilities
- CRUD endpoints for deal records
- bulk update/delete/import operations
- related deal analytics and helper lookups
- deal-progress children (videos, stories, views, payments)
Typical Dependencies
- influencer/contact joins
- tasks/reminders triggered from deal state changes
- activity logging and analytics endpoints
Testing Expectations
When deals routes change:- run deal-focused integration tests
- test at least one end-to-end deal lifecycle path
- verify filtering/sorting/pagination behavior
- confirm schema and status values remain consistent
Common Risk Areas
- enum/status drift between DB, frontend, and AI schema endpoint
- partial updates overwriting nullable fields incorrectly
- bulk endpoints skipping validation or auth checks