How prasanth-634/rent-hub works
Rent Verification is a role-based rental verification product: landlords manage properties, tenants, leases and uploaded rental transactions; the backend supports verification and AI-assisted rent/anomaly analysis, with lender and admin portals, reports, billing and API access. The frontend routes users into role-specific workflows and maintains authentication through the REST API. Backend routes share SQLAlchemy-backed domain data. Several portal and domain capabilities are documented by the file tree and route registration, but their internal calls were not sampled; those relationships are omitted rather than inferred.
Main entry points: main.py FastAPI entry · database.py SQLAlchemy data · admin.py Admin operations · landlord_portal.py Landlord portal API
Components 28
Frontend
- Role routing
frontend/src/App.tsx - Session auth
frontend/src/context/AuthContext.tsx - API URL client
frontend/src/services/api.ts - Role workflows
frontend/src/pages - Verification detail
frontend/src/pages/LandlordVerificationDetail.tsx
API and access
- FastAPI entry
backend/app/main.py - Authentication
backend/app/api/auth.py - Identity and roles
backend/app/api/deps.py - Admin operations
backend/app/api/admin.py - Landlord portal API
backend/app/api/landlord_portal.py - Domain API routes
backend/app/api - Tenant and lender
backend/app/api/tenant_portal.py - AI analysis API
backend/app/api/ai.py
Rental services
- Verification service
backend/app/services/verification.py - Billing service
backend/app/services/billing.py - PDF reports
backend/app/services/report_pdf.py - Notifications
backend/app/services/notification.py
Data and AI
- SQLAlchemy data
backend/app/core/database.py - Domain records
backend/app/db/models.py - JWT and keys
backend/app/core/security.py - ML orchestration
backend/app/ml/engine.py - Rent classification
backend/app/services/ai/rent_classifier.py - Anomaly detection
backend/app/services/ai/anomaly_detector.py - Feature engineering
backend/app/services/ai/feature_engineering.py - Model loading
backend/app/services/ai/model_loader.py - Runtime settings
backend/app/core/config.py - Database initialization
backend/app/db/init_db.py
Other components
- Portal user
Connections 35
- Portal user → Role routing: uses
frontend/src/App.tsx - Role routing → Role workflows: routes to
frontend/src/App.tsx - Role routing → Session auth: uses session
frontend/src/App.tsx - Session auth → API URL client: gets API URL
frontend/src/context/AuthContext.tsx - Session auth → Authentication: requests auth
frontend/src/context/AuthContext.tsx - Role workflows → Verification detail: routes to
frontend/src/App.tsx - FastAPI entry → Authentication: registers
backend/app/main.py - FastAPI entry → Landlord portal API: registers
backend/app/main.py - FastAPI entry → Tenant and lender: registers
backend/app/main.py - FastAPI entry → Domain API routes: registers
backend/app/main.py - FastAPI entry → Admin operations: registers
backend/app/main.py - FastAPI entry → AI analysis API: registers
backend/app/main.py - FastAPI entry → Database initialization: initializes on startup
backend/app/main.py - FastAPI entry → SQLAlchemy data: opens startup session
backend/app/main.py - Authentication → SQLAlchemy data: queries via
backend/app/api/auth.py - Authentication → JWT and keys: uses tokens
backend/app/api/auth.py - Admin operations → SQLAlchemy data: uses sessions
backend/app/api/admin.py - Admin operations → Verification service: uses
backend/app/api/admin.py - Admin operations → Model loading: uses
backend/app/api/admin.py - Landlord portal API → SQLAlchemy data: uses sessions
backend/app/api/landlord_portal.py - Landlord portal API → Billing service: uses
backend/app/api/landlord_portal.py - Landlord portal API → Verification service: uses
backend/app/api/landlord_portal.py - Identity and roles → SQLAlchemy data: gets sessions
backend/app/api/deps.py - Identity and roles → JWT and keys: validates tokens
backend/app/api/deps.py - SQLAlchemy data → Runtime settings: reads connection config
backend/app/core/database.py - Domain records → SQLAlchemy data: uses declarative base
backend/app/db/models.py - Database initialization → SQLAlchemy data: uses database
backend/app/db/init_db.py - Database initialization → Domain records: initializes records
backend/app/db/init_db.py - JWT and keys → Runtime settings: reads JWT config
backend/app/core/security.py - AI analysis API → ML orchestration: uses
backend/app/api/ai.py - ML orchestration → Rent classification: classifies rent
backend/app/ml/engine.py - ML orchestration → Anomaly detection: detects anomalies
backend/app/ml/engine.py - ML orchestration → Model loading: uses versions
backend/app/ml/engine.py - Anomaly detection → Feature engineering: uses features
backend/app/services/ai/anomaly_detector.py - Anomaly detection → Model loading: uses model
backend/app/services/ai/anomaly_detector.py