# anuragpathak07/nice_hackarena architecture

> Architecture diagram of the GitHub repository anuragpathak07/nice_hackarena, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anuragpathak07/nice_hackarena
- Repository: https://github.com/anuragpathak07/nice_hackarena

## Overview

This is a FastAPI AML/KYC compliance backend: it accepts applicant and watchlist data, checks identity consistency, screens applicants for watchlist matches, assesses risk, and supports impact analysis and officer case resolution. Alerts and audit records preserve review activity. The sampled API and services show these principal flows; the README is empty, and only partial excerpts are available, so some routing and dashboard details are represented only where supported by the tree and router registration.

Main entry points: [`backend/app/repositories/__init__.py`](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/repositories/__init__.py) (Repositories), [`backend/app/services/screening_service.py`](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/services/screening_service.py) (Applicant screening), [`backend/app/main.py`](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/main.py) (FastAPI application), [`backend/app/api/v1/compliance.py`](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/api/v1/compliance.py) (Compliance API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and review"]
  node_app["FastAPI application<br/>[main.py]"]
  node_compliance_api["Compliance API<br/>[compliance.py]"]
  node_applicants_api["Applicant routes<br/>[applicants.py]"]
  node_watchlist_api["Watchlist routes<br/>[watchlist.py]"]
  node_case_service["Case workflow<br/>[case_service.py]"]
end

subgraph group_screen["Screening and risk"]
  node_consistency["ID consistency"]
  node_screen_service["Applicant screening"]
  node_matching["Name matching"]
  node_risk["Risk assessment<br/>[risk_service.py]"]
  node_summary["Case summaries<br/>[llm_service.py]"]
  node_rescreening["Rescreening"]
end

subgraph group_impact["Impact monitoring"]
  node_impact_service["Impact analysis<br/>[impact_service.py]"]
  node_impact_api["Impact routes<br/>[compliance.py]"]
end

subgraph group_data["Persistence"]
  node_repositories["Repositories<br/>[__init__.py]"]
  node_models["Compliance records<br/>[__init__.py]"]
  node_database[("SQL database<br/>[database.py]")]
  node_config["Runtime settings<br/>[config.py]"]
end

node_officer(("Compliance officer"))
node_client(("API client"))
node_groq["Groq LLM"]

node_client -->|"sends requests"| node_app
node_officer -->|"uses API"| node_client
node_app -->|"registers routers"| node_compliance_api
node_compliance_api -->|"routes applicant requests"| node_applicants_api
node_compliance_api -->|"routes watchlist requests"| node_watchlist_api
node_applicants_api -->|"checks identity"| node_consistency
node_applicants_api -->|"starts screening"| node_screen_service
node_screen_service -->|"calculates matches"| node_matching
node_screen_service -->|"assesses match risk"| node_risk
node_screen_service -->|"reads and writes"| node_repositories
node_consistency -->|"loads ID records"| node_repositories
node_compliance_api -->|"manages cases"| node_case_service
node_case_service -->|"reads and writes"| node_repositories
node_case_service -->|"builds case summary"| node_summary
node_summary -.->|"requests summary"| node_groq
node_watchlist_api -->|"reads and writes"| node_repositories
node_impact_api -->|"starts analysis"| node_impact_service
node_impact_service -->|"calculates matches"| node_matching
node_impact_service -->|"recalculates risk"| node_risk
node_impact_service -->|"records results"| node_repositories
node_rescreening -->|"uses screening"| node_screen_service
node_repositories -->|"queries and persists"| node_models
node_models -->|"maps records"| node_database
node_app -->|"creates tables"| node_database
node_app -->|"loads settings"| node_config

click node_app "https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/main.py"
click node_compliance_api "https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/api/v1/compliance.py"
click node_applicants_api "https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/api/v1/applicants.py"
click node_watchlist_api "https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/api/v1/watchlist.py"
click node_case_service "https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/services/case_service.py"
click node_consistency "https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/services/consistency_service.py"
click node_screen_service "https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/services/screening_service.py"
click node_matching "https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/services/matching_service.py"
click node_risk "https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/services/risk_service.py"
click node_summary "https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/services/llm_service.py"
click node_rescreening "https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/services/rescreening_service.py"
click node_impact_service "https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/services/impact_service.py"
click node_impact_api "https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/api/v1/compliance.py"
click node_repositories "https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/repositories/__init__.py"
click node_models "https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/models/__init__.py"
click node_database "https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/core/database.py"
click node_config "https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/core/config.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_compliance_api,node_applicants_api,node_watchlist_api,node_case_service,node_client toneBlue
class node_consistency,node_screen_service,node_matching,node_risk,node_summary,node_rescreening toneAmber
class node_impact_service,node_impact_api toneMint
class node_repositories,node_models,node_database,node_config toneRose
class node_officer,node_groq toneIndigo
```

## Components

### API and review

- [FastAPI application](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/main.py): `backend/app/main.py`
- [Compliance API](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/api/v1/compliance.py): `backend/app/api/v1/compliance.py`
- [Applicant routes](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/api/v1/applicants.py): `backend/app/api/v1/applicants.py`
- [Watchlist routes](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/api/v1/watchlist.py): `backend/app/api/v1/watchlist.py`
- [Case workflow](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/services/case_service.py): `backend/app/services/case_service.py`

### Screening and risk

- [ID consistency](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/services/consistency_service.py): `backend/app/services/consistency_service.py`
- [Applicant screening](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/services/screening_service.py): `backend/app/services/screening_service.py`
- [Name matching](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/services/matching_service.py): `backend/app/services/matching_service.py`
- [Risk assessment](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/services/risk_service.py): `backend/app/services/risk_service.py`
- [Case summaries](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/services/llm_service.py): `backend/app/services/llm_service.py`
- [Rescreening](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/services/rescreening_service.py): `backend/app/services/rescreening_service.py`

### Impact monitoring

- [Impact analysis](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/services/impact_service.py): `backend/app/services/impact_service.py`
- [Impact routes](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/api/v1/compliance.py): `backend/app/api/v1/compliance.py`

### Persistence

- [Repositories](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/repositories/__init__.py): `backend/app/repositories/__init__.py`
- [Compliance records](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/models/__init__.py): `backend/app/models/__init__.py`
- [SQL database](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/core/database.py): `backend/app/core/database.py`
- [Runtime settings](https://github.com/anuragpathak07/nice_hackarena/blob/main/backend/app/core/config.py): `backend/app/core/config.py`

### Other components

- **Compliance officer**
- **API client**
- **Groq LLM**

## Connections

- API client → FastAPI application: sends requests
- Compliance officer → API client: uses API
- FastAPI application → Compliance API: registers routers
- Compliance API → Applicant routes: routes applicant requests
- Compliance API → Watchlist routes: routes watchlist requests
- Applicant routes → ID consistency: checks identity
- Applicant routes → Applicant screening: starts screening
- Applicant screening → Name matching: calculates matches
- Applicant screening → Risk assessment: assesses match risk
- Applicant screening → Repositories: reads and writes
- ID consistency → Repositories: loads ID records
- Compliance API → Case workflow: manages cases
- Case workflow → Repositories: reads and writes
- Case workflow → Case summaries: builds case summary
- Case summaries → Groq LLM: requests summary
- Watchlist routes → Repositories: reads and writes
- Impact routes → Impact analysis: starts analysis
- Impact analysis → Name matching: calculates matches
- Impact analysis → Risk assessment: recalculates risk
- Impact analysis → Repositories: records results
- Rescreening → Applicant screening: uses screening
- Repositories → Compliance records: queries and persists
- Compliance records → SQL database: maps records
- FastAPI application → SQL database: creates tables
- FastAPI application → Runtime settings: loads settings
