Infrastructure low complexity backend
1
Dependencies
1
Dependents
0
Entities
0
Integrations

Description

Next.js REST API endpoint at /api/v1/activities/duplicate-check that exposes the duplicate detection service to the Flutter mobile client. Accepts the candidate activity parameters, delegates to the detection service, and returns a structured JSON response with the conflict flag and optional conflicting activity ID. Must respond with minimal latency to avoid disrupting the wizard UX.

Feature: Duplicate Activity Detection

duplicate-check-api-endpoint

Responsibilities

  • Expose duplicate check as a versioned REST endpoint
  • Validate incoming request parameters before delegating to service
  • Return structured response with isDuplicate flag and conflictingActivityId
  • Enforce authentication and local_association_id scoping on the request

Interfaces

POST /api/v1/activities/duplicate-check
validateRequestParams(body: DuplicateCheckRequest): ValidationResult
formatResponse(result: DuplicateCheckResult): ApiResponse

Relationships

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component