07 - Controllers Reference

Complete reference of all 33 controllers grouped by stage, admin area, and WarRoom. Use as a quick lookup when you need to find the entry point for a specific endpoint.

Stage Controllers (17 files under Stage0-15)

StageControllerKey Endpoints
0ArrivalController.csGET /journey/init - create session, fraud pre-checks
1RegistrationController.csPOST /registration/signup, POST /registration/otp/generate, GET /registration/resume/{leadId}
2OtpVerificationController.csPOST /registration/otp/verify
3EmailController.csGET /email, POST /email/otp/generate|verify|resend
4PanController.csGET /pan/details, POST /pan/validate, POST /pan/verify
5AadhaarController.csGET /aadhaar/details, POST /aadhaar/digilocker/initiate|callback, POST /aadhaar/upload
6BankController.csGET /bank/details, POST /bank/account, POST /bank/reverse-penny/initiate|complete, GET /bank/micr/{ifsc}, GET /bank/list/{ifsc}
7LivenessController.csGET /selfie/details, POST /selfie/liveness/initiate|callback
8SignatureController.csGET /signature/details, POST /signature/upload
9PersonalDetailsController.csGET/POST /personal-details
9NomineeController.csCRUD /nominees/{id}, POST /nominees/verify-pan
10IncomeProofController.csPOST /income-proof/upload, POST /documents/submit-proofs
11FinalValidationController.csPOST /journey/final-validation
12DocumentGenerationController.csPOST /documents/generate-aof, GET /documents/pdf/{type}, POST /documents/regenerate
13EsignController.csGET /esign/details, POST /esign/initiate|callback, POST /esign/generate-client-code, POST /esign/wet-sign
14AccountCreationController.csPOST /account/create, GET /account/status
15ActivationController.csPOST /account/activate
15PaymentController.csGET /payment/defaults, POST /payment/initiate|status|callback

Common Controllers (6 files under Common/)

ControllerEndpointsPurpose
JourneyController.csPOST /journey/stage, GET /journey/status, POST /app/version-check, GET /lookups/{category}, GET /master/states|cities/{state}Cross-stage journey utilities
HandoffController.csPOST /handoff/generate, GET/POST /handoff/{token}Desktop → mobile handoff links
LeadDeletionController.csPOST /lead/deleteGDPR lead data deletion
DevController.csPOST /dev/purge-all, POST /dev/purge-lead/{leadId}Development-only DB purge
OneMoneyController.csGET /onemoney/bank-details|web-urlAccount Aggregator for income proof
SebiController.csGET /sebi/submission/{leadId}, POST /sebi/generate|submit|response/{leadId}SEBI submission workflow

Admin Controllers (7 files under Admin/)

ControllerRequired RoleEndpoints
AnalyticsController.cs[RequiresRole("ADMIN","ANALYST")]funnel, stage-times, provider-health, daily-snapshot, drop-offs
ApplicationSearchController.csADMINSearch applications, view timeline
LookupController.csADMINCRUD for lookups (states, cities, occupation, etc.)
MockController.csADMINPOST /admin/mock/{provider}/{apiName} - set mock response templates
ProviderConfigController.csADMINCRUD for provider_configurations table
StageConfigController.csADMINGET/PUT stage-level settings
VerifierController.csVERIFIERQueue, approve, reject, send-back manual reviews

WarRoom Controllers (2 files)

ControllerEndpoints
WarRoomAuthController.csPOST /warroom/auth/login
WarRoomController.csDashboard, journey list / detail / timeline, providers list + health, feature flags, stage configs, analytics (funnel, drops), mock-all toggle

Filter Attributes

[RequiresStage(N)] or [RequiresStage(N, max)]Enforces Lead.CurrentStage ≥ N (and ≤ max if set). Returns 409 Conflict otherwise.
[RequiresRole("ADMIN", "ANALYST")]Checks JWT claims for matching role. Returns 403 Forbidden otherwise.

Route Constants

All route strings are constants in MO.Ekyc.Shared/Constants/ApiRoutes.cs. Controllers reference them like [HttpPost(ApiRoutes.RegistrationSignup)] instead of magic strings.

backend/src/MO.Ekyc.Shared/Constants/ApiRoutes.csC#excerpt
public static class ApiRoutes
{
    public const string Base = "api/v1";

    // Stage 0
    public const string JourneyInit = $"{Base}/journey/init";

    // Stage 1
    public const string RegistrationSignup = $"{Base}/registration/signup";
    public const string RegistrationOtpGenerate = $"{Base}/registration/otp/generate";
    public const string RegistrationResumeState = $"{Base}/registration/resume/{{leadId}}";

    // Stage 2
    public const string RegistrationOtpVerify = $"{Base}/registration/otp/verify";

    // ... ~100 route constants total
}
Frontend API call reference