Backend Verification Process

While Sarah sees a loading indicator, the backend is performing a comprehensive verification check. The system queries the secure database to validate the reference and determine the instruction's status.

โฑ๏ธ Processing Time

The entire backend check typically completes in under 2 secondsโ€”fast enough for a seamless user experience while performing thorough validation.

๐Ÿ”’ https://shepwedd.com/verify

Verifying Instructions...

Checking our secure records for reference REF-9F2A-47B1

โœ“
Identity Verified
โณ
Checking Records
โ—‹
Result Ready

๐Ÿ” What the Backend Is Checking

๐Ÿ—„๏ธ

Does This Reference Exist?

Database lookup: "SELECT * FROM instructions WHERE reference = 'REF-9F2A-47B1'". If no match, this is either a typo or a fraudulent reference.

๐Ÿข

Which Firm/Agent/Client?

Checks: Is this instruction from Shepherd+Wedderburn? Issued by David Thompson? For Sarah Mitchell's matter MITCHELL-42MAPLE?

๐Ÿ“„

What Type of Instruction?

Verifies the instruction type: bank details, payment information, completion instructions, etc. This helps display the right verdict message.

โฐ

When Was It Issued?

Checks creation timestamp: Dec 9, 2025, 2:32 PM. This helps customers understand if the instructions are recent or old.

๐Ÿ“…

Has It Expired?

Checks expiry date if set. Some instructions have time limits (e.g., "valid until completion date"). Expired instructions return a warning.

๐Ÿšซ

Has It Been Superseded?

Checks if a newer instruction replaced this one. If solicitor sent corrected bank details, the old reference becomes invalid.

๐Ÿ› ๏ธ Backend Flow

1
Receive Request

POST /api/verify { reference: "REF-9F2A-47B1", auth_token: "..." }

โ†“
2
Validate Authentication

Verify passkey signature matches stored public key. Confirm request is from authenticated Sarah Mitchell.

โ†“
3
Database Query

Look up instruction record by reference. JOIN with firm, agent, client, matter tables.

โ†“
4
Status Check

Evaluate: status (active/revoked/superseded), expiry date, replacement references.

โ†“
5
Permission Validation

Confirm Sarah has permission to view this instruction (is she the client on the matter?).

โ†“
6
Generate Verdict

Construct response: genuine/not-found/outdated with full context (firm, agent, date, instruction type).

โ†“
7
Log & Return

Log verification attempt for audit trail. Return verdict to frontend (next step).

๐Ÿ” Security Considerations

๐Ÿ›ก๏ธ

Rate Limiting

Prevent brute-force attempts to guess valid references. Max 10 verification requests per minute per user.

๐Ÿ“Š

Audit Logging

Every verification attempt is logged: who, when, what reference, from what IP. Helps detect suspicious patterns.

๐Ÿ”’

Encrypted Storage

Instruction details stored encrypted at rest. Database compromise doesn't expose sensitive payment information.

๐Ÿ‘๏ธ

Permission Checks

Users can only verify instructions for their own matters. Sarah can't look up references for other clients.

โšก Why This Is Fast & Scalable

๐Ÿ—ƒ๏ธ Indexed Database Queries

Reference lookup uses database indexโ€”constant-time O(1) performance even with millions of instructions.

๐Ÿš€ Optimized Data Model

All required data (firm, agent, client, status) retrieved in a single JOIN queryโ€”no N+1 problems.

๐Ÿ’พ Caching Layer

Frequently accessed instructions cached in Redisโ€”sub-millisecond response times for repeat queries.

๐Ÿ“ˆ Horizontal Scaling

Stateless API design allows adding more servers to handle increased load without architectural changes.