Logo Lanfrica

deegeeartz/nigeria-legal-mvp

Domaine:

socioeconomic

Type de record:

software
Créateur:
dee
Hôte:
# Nigeria Legal Marketplace MVP A FastAPI MVP implementing the agreed Nigeria-first legal matching strategy: - Problem-first intake (Option B) - Balanced ranking model - Adaptive new-lawyer exposure bands (`25/20/15/10`) - Verification guardrails (`NIN`, `NBA`; `BVN` optional for payouts) - Explainable match reasons and legal disclaimer ## Features - `POST /api/auth/signup`: - Registers a user and returns a session token - For `role=lawyer`, supports optional `lawyer_id` linkage to a seeded lawyer profile - Enforces password complexity (uppercase + lowercase + number + special character) - `POST /api/auth/login`: - Authenticates user and returns `access_token` + `refresh_token` - Applies short-window failed-attempt rate limiting per email - `POST /api/auth/refresh`: - Rotates refresh token and issues new access/refresh token pair - Applies short-window failed-attempt rate limiting per refresh token - `POST /api/auth/logout`: - Revokes active session using access and/or refresh token - `GET /api/auth/me`: - Returns current user profile (`X-Auth-Token` access token required) - `POST /api/intake/match`: - Classifies intake text to legal category - Matches lawyers with weighted balanced scoring: - expertise fit: 30% - trust verification: 20% - quality outcomes: 20% - responsiveness: 15% - price-fit: 10% - availability: 5% - Applies quota-based new-lawyer rotation using adaptive exposure band - Returns top reasons (`why_recommended`) for transparency - `GET /api/lawyers/{lawyer_id}`: - Returns contextual profile stats and verification state - `POST /api/complaints`: - Files a complaint and applies hybrid trigger logic (`minor|major|severe`) (`X-Auth-Token` required) - `GET /api/complaints/{lawyer_id}`: - Lists complaints for a lawyer - `POST /api/complaints/{complaint_id}/resolve`: - Resolves a complaint (`uphold|reject`) and recalculates trust flags (admin-only) - `POST /api/kyc/verify`: - Admin-only endpoint to update lawyer verification status - `GET /api/kyc/{law …