EKYC 3.0 — Gap Analysis: New Backend vs Old Code

Stage 8 (Signature) & Stage 9 (Personal Details) • Comparing D:\MO_Project\ekyc\backend vs D:\MO_Project\ekyc\existing_code
Scope: Stage 8 (Signature Capture/Validation) + Stage 9 (Personal Details, Nominees, Account Aggregator) New Backend: .NET 8 + PostgreSQL + In-Memory OTP Old Backend: .NET + SQL Server + SOAP

Table of Contents

  1. Executive Summary
  2. Stage 8 — Signature (Checks 1–13)
  3. Stage 9 — Personal Details (Checks 14–29)
  4. Missing / Partial Checks — Priority Action Items
  5. Old Tables NOT to Reuse
  6. Reference Tables
  7. Action Items

1. Executive Summary

24
PRESENT
3
PARTIAL
2
MISSING
0
N/A
29
TOTAL CHECKS
Reading guide PRESENT = logic exists in new backend and matches BRD requirement. PARTIAL = logic exists but is incomplete or has caveats. MISSING = logic is absent in new backend — action required. N/A = not needed per Product team decision — no action required.

2. Stage 8 — Signature (Checks 1–13)

# Check / Requirement Status Evidence / Notes
1 Draw on canvas input PRESENT SignatureMethod="DRAWN" — canvas-based signature capture supported
2 Upload image input (JPG/PNG, 5MB) PRESENT SignatureMethod="UPLOADED" — file upload with format and size validation
3 Claude Vision / AiNXT validation PRESENT ISignatureValidationProvider interface with provider implementation
4 AiNXT auto-crop for uploads PARTIAL Provider interface exists but actual AiNXT crop provider may need wiring. Currently validates raw base64 without cropping.
5 Max 3 attempts, 3rd fail = NON_STP (continues) PRESENT Configurable max attempts with NON_STP continuation on exhaustion
6 Service unavailable = PENDING_MANUAL_REVIEW PRESENT Handled in catch block — sets status to PENDING_MANUAL_REVIEW
7 Canvas clear doesn’t increment attempt PRESENT Attempt counter only incremented on Submit, not on canvas clear
8 Signature stored for AOF PRESENT File storage path configured for AOF generation
9 Downstream events PRESENT 4 targets fired (CleverTap, Zoho, CDP, Datalake)
10 Byte complexity validation (diversity ratio, min bytes) PRESENT ValidateSignatureContentAsync checks byte diversity ratio and minimum byte count
11 Assisted journey handoff link PRESENT FIXED: HandoffLinkService + HandoffController with generate/validate/complete endpoints. WhatsApp message templates for Stage 7+8. FRANCHISE/BRANCH only.
12 Signature S3Key should be drive path PRESENT FIXED: StoreSignatureToS3 now also creates DocumentPathInfo record for consistency with drive-based storage pattern.
13 CAPS vendor as alternative to AiNXT N/A DEPRECATED per Product team. CAPS vendor confirmed not required. Only AiNXT/Claude Vision used for signature validation.

3. Stage 9 — Personal Details (Checks 14–29)

# Check / Requirement Status Evidence / Notes
14 Section A personal fields (education, occupation, income, etc.) PRESENT PersonalDetail entity with all Section A fields
15 Section A2 investment details (experience, settlement, DIS, MTF) PRESENT TradingExperience, SettlementPreference on entity
16 Config-driven dropdowns PARTIAL Old code used TBL_PERSONAL_FIELD_MASTER_SJET for all dropdown values. New code hardcodes some values, uses application_config for others. No unified lookup table.
17 Father name pre-fill from DigiLocker PRESENT Fetches from AadhaarVerification.FatherName
18 Marital status from KRA PRESENT KRA prefill logic available for marital status
19 PEP declaration (NON_STP, not blocking) PRESENT PepDeclared, StpPepFlag — marks NON_STP but allows continuation
20 F&O segment toggle PRESENT FnoSelected flag on personal details
21 Account Aggregator (Onemoney) PRESENT OneMoneyConsent created, TryAccountAggregatorAsync invoked
22 AA fail → Stage 10 triggered PRESENT Stage10Required = true when Account Aggregator fails
23 Nominee CRUD (max 3, share=100%) PRESENT NomineeService with full CRUD, max 3 validation, share sum = 100%
24 No-nominee declaration PRESENT DeclareNoNomineeAsync available
25 Nominee name != lead name PRESENT Validation in SaveNomineeAsync prevents self-nomination
26 Minor nominee guardian PRESENT IsMinor + GuardianName/Relationship fields
27 Nominee PAN format-only (no NSDL) PRESENT VerifyPan returns format OK only — no NSDL verification for nominee
28 Dropdown master table (TBL_PERSONAL_FIELD_MASTER) MISSING Old code had comprehensive dropdown master TBL_PERSONAL_FIELD_MASTER_SJET. New code doesn’t have equivalent lookup table for all options (education, occupation, income ranges, relationships, etc.).
29 Segment management (Equity/Currency/Derivative/Commodity) MISSING Old code had USP_INSERTUPDATE_CLIENT_SELECTEDSEGMENTS with derivative → auto-currency/commodity logic. New code has FnoSelected flag but no explicit segment entity management.

4. Missing / Partial Checks — Priority Action Items

Priority Check # Issue Required Action
P1 #28 Dropdown master table missing Create personal_field_master lookup table with category + key + display values for all dropdowns (Education, Occupation, AnnualIncome, MaritalStatus, NomineeRelationship, Gender, InvestmentExperience).
P2 #29 Segment management missing Add segment selection entity/logic if needed beyond F&O toggle. Old code auto-enabled currency + commodity when derivative was selected.
P2 #4 AiNXT crop not wired Wire AiNXT crop provider for signature upload extraction.
P2 #12 SignatureS3Key naming Migrate SignatureS3Key to document_path_info pattern for consistency.
P2 #13 CAPS vendor legacy CAPS vendor is legacy — confirm with Product team if needed (likely N/A).
P2 #11 Assisted journey handoff Consider handoff link for assisted RM journeys.
P2 #16 Config-driven dropdowns incomplete Depends on #28 — once personal_field_master exists, wire all dropdown APIs to read from it.

5. Old Tables NOT to Reuse

These old tables are replaced by new entities. Do NOT create equivalents — data maps to the new schema as shown.
Old Table Replaced By (New Entity)
TBL_CLIENT_PERSONALDETAILS personal_details
TBL_CLIENT_NOMINEEDETAILS nominees
TBL_CLIENT_SEGMENT leads + personal_details (FnoSelected)
TBL_CLIENT_SELECTEDSEGMENTS personal_details (FnoSelected)
TBL_CLIENT_WORKDETAILS personal_details (Occupation, AnnualIncomeRange)
TBL_AINXT_SIGN_RESPONSE signature_verifications + api_audit_logs
TBL_CAPS_SIGN_RESPONSE signature_verifications + api_audit_logs
TBL_PERSONAL_FIELD_MASTER_SJET NEW: personal_field_master (lookup table)

6. Reference Tables

Existing tables that can serve Stage 8 and Stage 9, plus one new table required.
Table Source Used In Status
lookup (existing) Application configuration Can be used for dropdown values if category-based Already exists
application_config (existing) TBL_APPLICATIONCONFIG Default values, feature flags Already exists
personal_field_master TBL_PERSONAL_FIELD_MASTER_SJET Stage 9 (All dropdown values for personal details, nominee, etc.) NEW TABLE NEEDED
New table schema: personal_field_master Columns: Category (e.g. Education, Occupation, AnnualIncome, MaritalStatus, NomineeRelationship, Gender, InvestmentExperience), Code (internal key), DisplayName (UI label), SortOrder (display ordering), IsActive (soft delete flag).

7. Action Items (6 items)

# Priority Action
1 P1 Create personal_field_master lookup table with all dropdown categories (Education, Occupation, AnnualIncome, MaritalStatus, NomineeRelationship, Gender, InvestmentExperience)
2 P2 Add segment selection logic (derivative → auto-enable currency + commodity)
3 P2 Wire AiNXT crop provider for uploaded signature extraction
4 P2 Migrate SignatureS3Key to document_path_info
5 P2 Confirm CAPS vendor deprecation with Product team
6 P2 Consider handoff link for assisted RM journeys