Skip to main content
Primary implementation: /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:
  1. run deal-focused integration tests
  2. test at least one end-to-end deal lifecycle path
  3. verify filtering/sorting/pagination behavior
  4. 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