How ankitanahire/aml-investigation-platform works
The AML Investigation Platform combines a React investigation interface with a FastAPI banking and monitoring backend. The principal workflow is an authenticated user entering the protected dashboard, whose domain operations cover accounts and transactions; transaction processing also invokes AML monitoring, which creates and exposes alerts for review. Backend routers, services, repositories, and SQLAlchemy models provide the documented layered structure. The README documents authentication, banking, AML, and health capabilities; some route and page implementations were not sampled, so links involving them are omitted unless registration or references are shown.
Main entry points: main.py FastAPI application · App.jsx Page routing · authService.js API services · Login.jsx Login page
Components 31
Investigation interface
- Web entry
frontend/src/main.jsx - Page routing
frontend/src/App.jsx - Login page
frontend/src/pages/Login.jsx - Session context
frontend/src/context/AuthContext.jsx - Dashboard page
frontend/src/pages/Dashboard.jsx - Investigation pages
frontend/src/pages/Alerts.jsx - API services
frontend/src/services/authService.js - HTTP client
frontend/src/api/axios.js
API routing
- FastAPI application
backend/app/main.py - Authentication routes
backend/app/routers/auth.py - Account routes
backend/app/routers/accounts.py - Transaction routes
backend/app/routers/transaction.py - Alert routes
backend/app/routers/aml.py - Health routes
backend/app/routers/health.py - Dashboard routes
backend/app/routers/dashboard.py
Banking and AML
- Account operations
backend/app/services/account_service.py - Transaction processing
backend/app/services/transaction_service.py - AML detection
backend/app/services/aml_service.py - Health checks
backend/app/services/health_service.py
Persistence and identity
- Account repository
backend/app/repositories/account_repository.py - Transaction repository
backend/app/repositories/transaction_repository.py - Alert repository
backend/app/repositories/aml_repository.py - Banking records
backend/app/models/accounts.py - Alert record
backend/app/models/aml_alert.py - JWT and passwords
backend/app/auth/auth.py - User record
backend/app/models/user.py - SQL database
backend/app/database.py
Runtime support
- Request middleware
backend/app/middleware/logging_middleware.py - Exception handling
backend/app/exceptions/handlers.py - Application logging
backend/app/logging_config/logger.py
Other components
- Investigator
Connections 33
- Investigator → Web entry: opens
- Web entry → Page routing: renders
frontend/src/main.jsx - Page routing → Login page: routes to
frontend/src/App.jsx - Page routing → Dashboard page: routes to
frontend/src/App.jsx - Page routing → Investigation pages: routes to
frontend/src/App.jsx - Login page → Session context: uses session
frontend/src/pages/Login.jsx - Session context → API services: loads profile
frontend/src/context/AuthContext.jsx - Login page → API services: calls login
frontend/src/pages/Login.jsx - Dashboard page → API services: loads stats
frontend/src/pages/Dashboard.jsx - API services → HTTP client: sends requests
frontend/src/services/authService.js - FastAPI application → Authentication routes: registers
backend/app/main.py - FastAPI application → Account routes: registers
backend/app/main.py - FastAPI application → Transaction routes: registers
backend/app/main.py - FastAPI application → Alert routes: registers
backend/app/main.py - FastAPI application → Health routes: registers
backend/app/main.py - FastAPI application → Dashboard routes: registers
backend/app/main.py - Account routes → Account operations: delegates
backend/app/routers/accounts.py - Authentication routes → JWT and passwords: uses
backend/app/routers/auth.py - Alert routes → Alert repository: queries
backend/app/routers/aml.py - Account operations → Account repository: reads and writes
backend/app/services/account_service.py - Account operations → Transaction repository: records activity
backend/app/services/account_service.py - Transaction processing → Transaction repository: processes records
backend/app/services/transaction_service.py - Transaction processing → AML detection: checks activity
backend/app/services/transaction_service.py - AML detection → Alert repository: stores alerts
backend/app/services/aml_service.py - Account repository → Banking records: queries
backend/app/repositories/account_repository.py - Transaction repository → Banking records: queries
backend/app/repositories/transaction_repository.py - Alert repository → Alert record: queries
backend/app/repositories/aml_repository.py - JWT and passwords → User record: looks up user
backend/app/auth/auth.py - JWT and passwords → SQL database: gets session
backend/app/auth/auth.py - FastAPI application → SQL database: initializes tables
backend/app/main.py - FastAPI application → Request middleware: installs
backend/app/main.py - FastAPI application → Exception handling: registers handlers
backend/app/main.py - FastAPI application → Application logging: logs startup
backend/app/main.py