# saidsurucu/verify-lawyer architecture

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

- Interactive diagram: https://gitdiagram.com/saidsurucu/verify-lawyer
- Repository: https://github.com/saidsurucu/verify-lawyer

## Overview

This Python package searches and verifies lawyers against the Turkish Bar Association database, through either a Python API or a CLI. The main workflow is to submit search criteria, automate the registry search, extract matching records, and either return all matches or reduce them to a single existence check. The README also documents trainee searches and Cloudflare handling. The graph reflects the sampled core and CLI code; the browser automation and registry are external dependencies, not repository modules.

Main entry points: [`verify_lawyer/core.py`](https://github.com/saidsurucu/verify-lawyer/blob/main/verify_lawyer/core.py) (Lawyer search), [`verify_lawyer/__init__.py`](https://github.com/saidsurucu/verify-lawyer/blob/main/verify_lawyer/__init__.py) (Python API exports), [`verify_lawyer/cli.py`](https://github.com/saidsurucu/verify-lawyer/blob/main/verify_lawyer/cli.py) (CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_python_api["Python API exports<br/>[__init__.py]"]
  node_cli["CLI<br/>[cli.py]"]
end

subgraph group_workflow["Search workflow"]
  node_search["Lawyer search<br/>[core.py]"]
  node_verification["Lawyer verification<br/>[core.py]"]
  node_extraction["Result extraction<br/>[core.py]"]
end

subgraph group_external["External systems"]
  node_scrapling["Scrapling fetcher"]
  node_registry[("Bar association registry")]
  node_cloudflare["Cloudflare challenge"]
end

node_user(("User"))

node_user -->|"runs"| node_cli
node_user -->|"calls"| node_python_api
node_cli -->|"dispatches search"| node_search
node_cli -->|"dispatches verify"| node_verification
node_python_api -->|"exports"| node_search
node_python_api -->|"exports"| node_verification
node_verification -->|"calls"| node_search
node_search -->|"fetches with"| node_scrapling
node_scrapling -->|"queries"| node_registry
node_search -->|"evaluates"| node_extraction
node_scrapling -->|"solves challenge"| node_cloudflare

click node_python_api "https://github.com/saidsurucu/verify-lawyer/blob/main/verify_lawyer/__init__.py"
click node_cli "https://github.com/saidsurucu/verify-lawyer/blob/main/verify_lawyer/cli.py"
click node_search "https://github.com/saidsurucu/verify-lawyer/blob/main/verify_lawyer/core.py"
click node_verification "https://github.com/saidsurucu/verify-lawyer/blob/main/verify_lawyer/core.py"
click node_extraction "https://github.com/saidsurucu/verify-lawyer/blob/main/verify_lawyer/core.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_python_api,node_cli,node_user toneBlue
class node_search,node_verification,node_extraction toneAmber
class node_scrapling,node_registry,node_cloudflare toneMint
```

## Components

### User interfaces

- [Python API exports](https://github.com/saidsurucu/verify-lawyer/blob/main/verify_lawyer/__init__.py): `verify_lawyer/__init__.py`
- [CLI](https://github.com/saidsurucu/verify-lawyer/blob/main/verify_lawyer/cli.py): `verify_lawyer/cli.py`

### Search workflow

- [Lawyer search](https://github.com/saidsurucu/verify-lawyer/blob/main/verify_lawyer/core.py): `verify_lawyer/core.py`
- [Lawyer verification](https://github.com/saidsurucu/verify-lawyer/blob/main/verify_lawyer/core.py): `verify_lawyer/core.py`
- [Result extraction](https://github.com/saidsurucu/verify-lawyer/blob/main/verify_lawyer/core.py): `verify_lawyer/core.py`

### External systems

- **Scrapling fetcher**
- **Bar association registry**
- **Cloudflare challenge**

### Other components

- **User**

## Connections

- User → CLI: runs (evidence: `README.md`)
- User → Python API exports: calls (evidence: `README.md`)
- CLI → Lawyer search: dispatches search (evidence: `verify_lawyer/cli.py`)
- CLI → Lawyer verification: dispatches verify (evidence: `verify_lawyer/cli.py`)
- Python API exports → Lawyer search: exports (evidence: `verify_lawyer/__init__.py`)
- Python API exports → Lawyer verification: exports (evidence: `verify_lawyer/__init__.py`)
- Lawyer verification → Lawyer search: calls (evidence: `verify_lawyer/core.py`)
- Lawyer search → Scrapling fetcher: fetches with (evidence: `verify_lawyer/core.py`)
- Scrapling fetcher → Bar association registry: queries
- Lawyer search → Result extraction: evaluates (evidence: `verify_lawyer/core.py`)
- Scrapling fetcher → Cloudflare challenge: solves challenge
