Service Layer high complexity backendmobile
0
Dependencies
0
Dependents
5
Entities
0
Integrations

Description

Service responsible for enforcing NDA gating logic — checking whether a peer mentor has a valid, non-expired NDA on file before granting access to sensitive assignment data. Works in conjunction with Supabase RLS policies and Edge Functions to block unauthorized access at the data layer.

Feature: Driver Honorarium & NDA Management

nda-validation-service

Responsibilities

  • Check NDA validity for a given user (exists, not expired, correct version)
  • Trigger NDA signing flow when access is blocked
  • Verify document version hash against current template
  • Coordinate with Supabase Edge Function for server-side enforcement

Interfaces

hasValidNda(userId)
getNdaStatus(userId)
isNdaExpired(userId)
isCorrectVersion(userId, templateVersion)
blockAccessUntilSigned(userId)
triggerNdaFlow()