# sandeepkumar-14/intern architecture

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

- Interactive diagram: https://gitdiagram.com/sandeepkumar-14/intern
- Repository: https://github.com/sandeepkumar-14/intern

## Overview

The tree contains two separate products: a Flask JWT authentication API and a scheduled, task-queued web scraper. Their principal workflows are represented independently. The supplied README is empty, so capabilities and wiring are based on the sampled source; unsampled auth model/schema internals are not expanded.

Main entry points: [`project6_scraper/app/tasks.py`](https://github.com/sandeepkumar-14/intern/blob/main/project6_scraper/app/tasks.py) (Scrape Tasks), [`project5_auth/app/routes.py`](https://github.com/sandeepkumar-14/intern/blob/main/project5_auth/app/routes.py) (Auth Routes), [`project6_scraper/manage.py`](https://github.com/sandeepkumar-14/intern/blob/main/project6_scraper/manage.py) (Management CLI), [`project5_auth/app/decorators.py`](https://github.com/sandeepkumar-14/intern/blob/main/project5_auth/app/decorators.py) (Token Guard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_auth_api["Authentication API"]
  node_auth_app["Flask App<br/>[__init__.py]"]
  node_auth_routes["Auth Routes<br/>[routes.py]"]
  node_auth_schemas["Request Schemas<br/>[schemas.py]"]
  node_auth_user["User Model<br/>[models.py]"]
  node_auth_db[("Auth Database<br/>[models.py]")]
end

subgraph group_auth_security["Token Security"]
  node_auth_tokens["Refresh Tokens<br/>[models.py]"]
  node_auth_jwt["JWT Utilities<br/>[jwt_utils.py]"]
  node_auth_guard["Token Guard<br/>[decorators.py]"]
end

subgraph group_scrape_control["Scrape Control"]
  node_scrape_cli["Management CLI<br/>[manage.py]"]
  node_scrape_schedule["Periodic Scheduler<br/>[celery_app.py]"]
  node_scrape_queue["Task Broker"]
end

subgraph group_scrape_runtime["Scrape Runtime"]
  node_scrape_tasks["Scrape Tasks<br/>[tasks.py]"]
  node_scrape_static["Static Scraper<br/>[static_scraper.py]"]
  node_scrape_dynamic["Dynamic Scraper<br/>[dynamic_scraper.py]"]
  node_export_task["CSV Export<br/>[tasks.py]"]
end

subgraph group_scrape_data["Scrape Data"]
  node_scrape_targets[("Target Records<br/>[models.py]")]
  node_scraped_items[("Scraped Items<br/>[models.py]")]
  node_csv_file["CSV File"]
end

node_auth_client(("API Client"))
node_scrape_operator(("Operator"))
node_websites(("Target Websites"))

node_auth_client -->|"sends requests"| node_auth_app
node_auth_app -->|"registers routes"| node_auth_routes
node_auth_routes -->|"validates input"| node_auth_schemas
node_auth_routes -->|"creates and checks"| node_auth_user
node_auth_routes -->|"stores and revokes"| node_auth_tokens
node_auth_routes -->|"issues and decodes"| node_auth_jwt
node_auth_routes -->|"protects endpoints"| node_auth_guard
node_auth_guard -->|"decodes token"| node_auth_jwt
node_auth_guard -->|"loads user"| node_auth_user
node_auth_user -->|"persists user"| node_auth_db
node_auth_tokens -->|"persists token state"| node_auth_db
node_auth_routes -->|"returns responses"| node_auth_client
node_scrape_operator -->|"manages targets"| node_scrape_cli
node_scrape_cli -->|"creates and lists"| node_scrape_targets
node_scrape_cli -->|"queues jobs"| node_scrape_tasks
node_scrape_schedule -->|"dispatches periodic job"| node_scrape_tasks
node_scrape_tasks -->|"publishes tasks"| node_scrape_queue
node_scrape_queue -->|"delivers tasks"| node_scrape_tasks
node_scrape_tasks -->|"loads targets"| node_scrape_targets
node_scrape_tasks -->|"calls when static"| node_scrape_static
node_scrape_tasks -->|"calls when dynamic"| node_scrape_dynamic
node_scrape_static -->|"fetches pages"| node_websites
node_scrape_dynamic -->|"loads pages"| node_websites
node_scrape_tasks -->|"stores results"| node_scraped_items
node_scrape_cli -->|"queues export"| node_export_task
node_export_task -->|"reads results"| node_scraped_items
node_export_task -->|"writes CSV"| node_csv_file

click node_auth_app "https://github.com/sandeepkumar-14/intern/blob/main/project5_auth/app/__init__.py"
click node_auth_routes "https://github.com/sandeepkumar-14/intern/blob/main/project5_auth/app/routes.py"
click node_auth_schemas "https://github.com/sandeepkumar-14/intern/blob/main/project5_auth/app/schemas.py"
click node_auth_user "https://github.com/sandeepkumar-14/intern/blob/main/project5_auth/app/models.py"
click node_auth_tokens "https://github.com/sandeepkumar-14/intern/blob/main/project5_auth/app/models.py"
click node_auth_jwt "https://github.com/sandeepkumar-14/intern/blob/main/project5_auth/app/jwt_utils.py"
click node_auth_guard "https://github.com/sandeepkumar-14/intern/blob/main/project5_auth/app/decorators.py"
click node_auth_db "https://github.com/sandeepkumar-14/intern/blob/main/project5_auth/app/models.py"
click node_scrape_cli "https://github.com/sandeepkumar-14/intern/blob/main/project6_scraper/manage.py"
click node_scrape_schedule "https://github.com/sandeepkumar-14/intern/blob/main/project6_scraper/app/celery_app.py"
click node_scrape_tasks "https://github.com/sandeepkumar-14/intern/blob/main/project6_scraper/app/tasks.py"
click node_scrape_targets "https://github.com/sandeepkumar-14/intern/blob/main/project6_scraper/app/models.py"
click node_scrape_static "https://github.com/sandeepkumar-14/intern/blob/main/project6_scraper/app/scrapers/static_scraper.py"
click node_scrape_dynamic "https://github.com/sandeepkumar-14/intern/blob/main/project6_scraper/app/scrapers/dynamic_scraper.py"
click node_scraped_items "https://github.com/sandeepkumar-14/intern/blob/main/project6_scraper/app/models.py"
click node_export_task "https://github.com/sandeepkumar-14/intern/blob/main/project6_scraper/app/tasks.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_auth_app,node_auth_routes,node_auth_schemas,node_auth_user,node_auth_db,node_auth_client toneBlue
class node_auth_tokens,node_auth_jwt,node_auth_guard toneAmber
class node_scrape_cli,node_scrape_schedule,node_scrape_queue toneMint
class node_scrape_tasks,node_scrape_static,node_scrape_dynamic,node_export_task toneRose
class node_scrape_targets,node_scraped_items,node_csv_file,node_scrape_operator,node_websites toneIndigo
```

## Components

### Authentication API

- [Flask App](https://github.com/sandeepkumar-14/intern/blob/main/project5_auth/app/__init__.py): `project5_auth/app/__init__.py`
- [Auth Routes](https://github.com/sandeepkumar-14/intern/blob/main/project5_auth/app/routes.py): `project5_auth/app/routes.py`
- [Request Schemas](https://github.com/sandeepkumar-14/intern/blob/main/project5_auth/app/schemas.py): `project5_auth/app/schemas.py`
- [User Model](https://github.com/sandeepkumar-14/intern/blob/main/project5_auth/app/models.py): `project5_auth/app/models.py`
- [Auth Database](https://github.com/sandeepkumar-14/intern/blob/main/project5_auth/app/models.py): `project5_auth/app/models.py`

### Token Security

- [Refresh Tokens](https://github.com/sandeepkumar-14/intern/blob/main/project5_auth/app/models.py): `project5_auth/app/models.py`
- [JWT Utilities](https://github.com/sandeepkumar-14/intern/blob/main/project5_auth/app/jwt_utils.py): `project5_auth/app/jwt_utils.py`
- [Token Guard](https://github.com/sandeepkumar-14/intern/blob/main/project5_auth/app/decorators.py): `project5_auth/app/decorators.py`

### Scrape Control

- [Management CLI](https://github.com/sandeepkumar-14/intern/blob/main/project6_scraper/manage.py): `project6_scraper/manage.py`
- [Periodic Scheduler](https://github.com/sandeepkumar-14/intern/blob/main/project6_scraper/app/celery_app.py): `project6_scraper/app/celery_app.py`
- **Task Broker**

### Scrape Runtime

- [Scrape Tasks](https://github.com/sandeepkumar-14/intern/blob/main/project6_scraper/app/tasks.py): `project6_scraper/app/tasks.py`
- [Static Scraper](https://github.com/sandeepkumar-14/intern/blob/main/project6_scraper/app/scrapers/static_scraper.py): `project6_scraper/app/scrapers/static_scraper.py`
- [Dynamic Scraper](https://github.com/sandeepkumar-14/intern/blob/main/project6_scraper/app/scrapers/dynamic_scraper.py): `project6_scraper/app/scrapers/dynamic_scraper.py`
- [CSV Export](https://github.com/sandeepkumar-14/intern/blob/main/project6_scraper/app/tasks.py): `project6_scraper/app/tasks.py`

### Scrape Data

- [Target Records](https://github.com/sandeepkumar-14/intern/blob/main/project6_scraper/app/models.py): `project6_scraper/app/models.py`
- [Scraped Items](https://github.com/sandeepkumar-14/intern/blob/main/project6_scraper/app/models.py): `project6_scraper/app/models.py`
- **CSV File**

### Other components

- **API Client**
- **Operator**
- **Target Websites**

## Connections

- API Client → Flask App: sends requests
- Flask App → Auth Routes: registers routes
- Auth Routes → Request Schemas: validates input
- Auth Routes → User Model: creates and checks
- Auth Routes → Refresh Tokens: stores and revokes
- Auth Routes → JWT Utilities: issues and decodes
- Auth Routes → Token Guard: protects endpoints
- Token Guard → JWT Utilities: decodes token
- Token Guard → User Model: loads user
- User Model → Auth Database: persists user
- Refresh Tokens → Auth Database: persists token state
- Auth Routes → API Client: returns responses
- Operator → Management CLI: manages targets
- Management CLI → Target Records: creates and lists
- Management CLI → Scrape Tasks: queues jobs
- Periodic Scheduler → Scrape Tasks: dispatches periodic job
- Scrape Tasks → Task Broker: publishes tasks
- Task Broker → Scrape Tasks: delivers tasks
- Scrape Tasks → Target Records: loads targets
- Scrape Tasks → Static Scraper: calls when static
- Scrape Tasks → Dynamic Scraper: calls when dynamic
- Static Scraper → Target Websites: fetches pages
- Dynamic Scraper → Target Websites: loads pages
- Scrape Tasks → Scraped Items: stores results
- Management CLI → CSV Export: queues export
- CSV Export → Scraped Items: reads results
- CSV Export → CSV File: writes CSV
