# mg7434209-hue/tarifesec architecture

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

- Interactive diagram: https://gitdiagram.com/mg7434209-hue/tarifesec
- Repository: https://github.com/mg7434209-hue/tarifesec

## Overview

tarifesec.net.tr is a Turkish internet and mobile tariff comparison platform. Visitors browse home-internet and mobile plans, read guides, submit a quote request, or run a speed test; administrators manage prices, leads, and scraping. The backend serves these features from PostgreSQL and also renders crawlable SEO content. The graph includes documented capabilities whose route wiring was not excerpted; edges without direct source evidence are omitted. Some client page/API connections and unsampled route internals are therefore not shown.

Main entry points: [`server/index.ts`](https://github.com/mg7434209-hue/tarifesec/blob/main/server/index.ts) (HTTP application), [`client/src/App.tsx`](https://github.com/mg7434209-hue/tarifesec/blob/main/client/src/App.tsx) (Web application), [`drizzle/db.ts`](https://github.com/mg7434209-hue/tarifesec/blob/main/drizzle/db.ts) (PostgreSQL), [`server/routes/admin.ts`](https://github.com/mg7434209-hue/tarifesec/blob/main/server/routes/admin.ts) (Admin API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Visitor experience"]
  node_webapp["Web application<br/>[App.tsx]"]
  node_comparison["Plan comparison"]
  node_mobile["Mobile plans<br/>[MobilTarifeler.tsx]"]
  node_speedui["Speed test UI<br/>[HizTesti.tsx]"]
  node_speedengine["Measurement engine<br/>[speedtest.ts]"]
  node_adminui["Admin panel<br/>[Admin.tsx]"]
  node_blogui["Guides<br/>[Blog.tsx]"]
end

subgraph group_backend["Application services"]
  node_server["HTTP application<br/>[index.ts]"]
  node_adminapi["Admin API<br/>[admin.ts]"]
  node_auth["Admin authentication<br/>[adminAuth.ts]"]
  node_health["Scrape health<br/>[health.ts]"]
  node_speedapi["Speed test API<br/>[speedtest.ts]"]
  node_leads["Quote requests<br/>[leads.ts]"]
  node_visitors["Visitor counter<br/>[visitors.ts]"]
end

subgraph group_pricing["Price collection"]
  node_scheduler["Scrape scheduler<br/>[scheduler.ts]"]
  node_scraper["Price scraper<br/>[index.ts]"]
  node_parsing["Parse and match<br/>[parse.ts]"]
  node_sources["Operator sources<br/>[sources.ts]"]
end

subgraph group_content["SEO and content"]
  node_ssr["SEO rendering<br/>[render.ts]"]
  node_seohtml["Searchable content<br/>[content.ts]"]
  node_llms["Machine-readable feeds<br/>[llms.ts]"]
  node_seo_data["SEO data access<br/>[data.ts]"]
end

subgraph group_storage["Persistent data"]
  node_db[("PostgreSQL<br/>[db.ts]")]
  node_schema["Data schema<br/>[schema.ts]"]
end

node_visitor(("Visitor"))

node_visitor -->|"browses"| node_webapp
node_webapp -->|"routes to"| node_comparison
node_webapp -->|"routes to"| node_mobile
node_webapp -->|"routes to"| node_speedui
node_webapp -->|"routes to"| node_adminui
node_webapp -->|"routes to"| node_blogui
node_speedui -.->|"uses"| node_speedengine
node_server -->|"renders routes with"| node_ssr
node_server -->|"requests report from"| node_health
node_server -->|"starts"| node_scheduler
node_server -->|"bootstraps"| node_db
node_adminapi -->|"triggers"| node_scheduler
node_adminapi -->|"requests report from"| node_health
node_adminapi -->|"updates and reads"| node_db
node_server -.->|"serves admin routes"| node_adminapi
node_adminapi -.->|"checks credentials"| node_auth
node_scheduler -->|"schedules"| node_scraper
node_scraper -->|"parses and matches"| node_parsing
node_scraper -->|"reads sources"| node_sources
node_scraper -->|"reads and updates prices"| node_db
node_speedapi -->|"stores and reads results"| node_db
node_server -.->|"serves speed tests"| node_speedapi
node_server -.->|"serves quote requests"| node_leads
node_server -.->|"serves visitor counts"| node_visitors
node_ssr -->|"renders content with"| node_seohtml
node_ssr -->|"loads data through"| node_seo_data
node_llms -->|"loads summaries from"| node_seo_data
node_seo_data -->|"reads records"| node_db
node_db -->|"uses schema"| node_schema

click node_webapp "https://github.com/mg7434209-hue/tarifesec/blob/main/client/src/App.tsx"
click node_comparison "https://github.com/mg7434209-hue/tarifesec/blob/main/client/src/pages/PaketKarsilastirma.tsx"
click node_mobile "https://github.com/mg7434209-hue/tarifesec/blob/main/client/src/pages/MobilTarifeler.tsx"
click node_speedui "https://github.com/mg7434209-hue/tarifesec/blob/main/client/src/pages/HizTesti.tsx"
click node_speedengine "https://github.com/mg7434209-hue/tarifesec/blob/main/client/src/lib/speedtest.ts"
click node_adminui "https://github.com/mg7434209-hue/tarifesec/blob/main/client/src/pages/Admin.tsx"
click node_blogui "https://github.com/mg7434209-hue/tarifesec/blob/main/client/src/pages/Blog.tsx"
click node_server "https://github.com/mg7434209-hue/tarifesec/blob/main/server/index.ts"
click node_adminapi "https://github.com/mg7434209-hue/tarifesec/blob/main/server/routes/admin.ts"
click node_auth "https://github.com/mg7434209-hue/tarifesec/blob/main/server/adminAuth.ts"
click node_health "https://github.com/mg7434209-hue/tarifesec/blob/main/server/health.ts"
click node_speedapi "https://github.com/mg7434209-hue/tarifesec/blob/main/server/routes/speedtest.ts"
click node_leads "https://github.com/mg7434209-hue/tarifesec/blob/main/server/routes/leads.ts"
click node_visitors "https://github.com/mg7434209-hue/tarifesec/blob/main/server/routes/visitors.ts"
click node_scheduler "https://github.com/mg7434209-hue/tarifesec/blob/main/server/scheduler.ts"
click node_scraper "https://github.com/mg7434209-hue/tarifesec/blob/main/scraper/index.ts"
click node_parsing "https://github.com/mg7434209-hue/tarifesec/blob/main/scraper/parse.ts"
click node_sources "https://github.com/mg7434209-hue/tarifesec/blob/main/scraper/sources.ts"
click node_ssr "https://github.com/mg7434209-hue/tarifesec/blob/main/server/seo/render.ts"
click node_seohtml "https://github.com/mg7434209-hue/tarifesec/blob/main/server/seo/content.ts"
click node_llms "https://github.com/mg7434209-hue/tarifesec/blob/main/server/seo/llms.ts"
click node_seo_data "https://github.com/mg7434209-hue/tarifesec/blob/main/server/seo/data.ts"
click node_db "https://github.com/mg7434209-hue/tarifesec/blob/main/drizzle/db.ts"
click node_schema "https://github.com/mg7434209-hue/tarifesec/blob/main/drizzle/schema.ts"

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_webapp,node_comparison,node_mobile,node_speedui,node_speedengine,node_adminui,node_blogui toneBlue
class node_server,node_adminapi,node_auth,node_health,node_speedapi,node_leads,node_visitors toneAmber
class node_scheduler,node_scraper,node_parsing,node_sources toneMint
class node_ssr,node_seohtml,node_llms,node_seo_data toneRose
class node_db,node_schema,node_visitor toneIndigo
```

## Components

### Visitor experience

- [Web application](https://github.com/mg7434209-hue/tarifesec/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Plan comparison](https://github.com/mg7434209-hue/tarifesec/blob/main/client/src/pages/PaketKarsilastirma.tsx): `client/src/pages/PaketKarsilastirma.tsx`
- [Mobile plans](https://github.com/mg7434209-hue/tarifesec/blob/main/client/src/pages/MobilTarifeler.tsx): `client/src/pages/MobilTarifeler.tsx`
- [Speed test UI](https://github.com/mg7434209-hue/tarifesec/blob/main/client/src/pages/HizTesti.tsx): `client/src/pages/HizTesti.tsx`
- [Measurement engine](https://github.com/mg7434209-hue/tarifesec/blob/main/client/src/lib/speedtest.ts): `client/src/lib/speedtest.ts`
- [Admin panel](https://github.com/mg7434209-hue/tarifesec/blob/main/client/src/pages/Admin.tsx): `client/src/pages/Admin.tsx`
- [Guides](https://github.com/mg7434209-hue/tarifesec/blob/main/client/src/pages/Blog.tsx): `client/src/pages/Blog.tsx`

### Application services

- [HTTP application](https://github.com/mg7434209-hue/tarifesec/blob/main/server/index.ts): `server/index.ts`
- [Admin API](https://github.com/mg7434209-hue/tarifesec/blob/main/server/routes/admin.ts): `server/routes/admin.ts`
- [Admin authentication](https://github.com/mg7434209-hue/tarifesec/blob/main/server/adminAuth.ts): `server/adminAuth.ts`
- [Scrape health](https://github.com/mg7434209-hue/tarifesec/blob/main/server/health.ts): `server/health.ts`
- [Speed test API](https://github.com/mg7434209-hue/tarifesec/blob/main/server/routes/speedtest.ts): `server/routes/speedtest.ts`
- [Quote requests](https://github.com/mg7434209-hue/tarifesec/blob/main/server/routes/leads.ts): `server/routes/leads.ts`
- [Visitor counter](https://github.com/mg7434209-hue/tarifesec/blob/main/server/routes/visitors.ts): `server/routes/visitors.ts`

### Price collection

- [Scrape scheduler](https://github.com/mg7434209-hue/tarifesec/blob/main/server/scheduler.ts): `server/scheduler.ts`
- [Price scraper](https://github.com/mg7434209-hue/tarifesec/blob/main/scraper/index.ts): `scraper/index.ts`
- [Parse and match](https://github.com/mg7434209-hue/tarifesec/blob/main/scraper/parse.ts): `scraper/parse.ts`
- [Operator sources](https://github.com/mg7434209-hue/tarifesec/blob/main/scraper/sources.ts): `scraper/sources.ts`

### SEO and content

- [SEO rendering](https://github.com/mg7434209-hue/tarifesec/blob/main/server/seo/render.ts): `server/seo/render.ts`
- [Searchable content](https://github.com/mg7434209-hue/tarifesec/blob/main/server/seo/content.ts): `server/seo/content.ts`
- [Machine-readable feeds](https://github.com/mg7434209-hue/tarifesec/blob/main/server/seo/llms.ts): `server/seo/llms.ts`
- [SEO data access](https://github.com/mg7434209-hue/tarifesec/blob/main/server/seo/data.ts): `server/seo/data.ts`

### Persistent data

- [PostgreSQL](https://github.com/mg7434209-hue/tarifesec/blob/main/drizzle/db.ts): `drizzle/db.ts`
- [Data schema](https://github.com/mg7434209-hue/tarifesec/blob/main/drizzle/schema.ts): `drizzle/schema.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Web application: browses (evidence: `client/src/App.tsx`)
- Web application → Plan comparison: routes to (evidence: `client/src/App.tsx`)
- Web application → Mobile plans: routes to (evidence: `client/src/App.tsx`)
- Web application → Speed test UI: routes to (evidence: `client/src/App.tsx`)
- Web application → Admin panel: routes to (evidence: `client/src/App.tsx`)
- Web application → Guides: routes to (evidence: `client/src/App.tsx`)
- Speed test UI → Measurement engine: uses
- HTTP application → SEO rendering: renders routes with (evidence: `server/index.ts`)
- HTTP application → Scrape health: requests report from (evidence: `server/index.ts`)
- HTTP application → Scrape scheduler: starts (evidence: `server/index.ts`)
- HTTP application → PostgreSQL: bootstraps (evidence: `server/index.ts`)
- Admin API → Scrape scheduler: triggers (evidence: `server/routes/admin.ts`)
- Admin API → Scrape health: requests report from (evidence: `server/routes/admin.ts`)
- Admin API → PostgreSQL: updates and reads (evidence: `server/routes/admin.ts`)
- HTTP application → Admin API: serves admin routes (evidence: `server/index.ts`)
- Admin API → Admin authentication: checks credentials
- Scrape scheduler → Price scraper: schedules (evidence: `server/scheduler.ts`)
- Price scraper → Parse and match: parses and matches (evidence: `scraper/index.ts`)
- Price scraper → Operator sources: reads sources (evidence: `scraper/index.ts`)
- Price scraper → PostgreSQL: reads and updates prices (evidence: `scraper/index.ts`)
- Speed test API → PostgreSQL: stores and reads results (evidence: `server/routes/speedtest.ts`)
- HTTP application → Speed test API: serves speed tests (evidence: `server/index.ts`)
- HTTP application → Quote requests: serves quote requests (evidence: `server/index.ts`)
- HTTP application → Visitor counter: serves visitor counts (evidence: `server/index.ts`)
- SEO rendering → Searchable content: renders content with (evidence: `server/seo/render.ts`)
- SEO rendering → SEO data access: loads data through (evidence: `server/seo/render.ts`)
- Machine-readable feeds → SEO data access: loads summaries from (evidence: `server/seo/llms.ts`)
- SEO data access → PostgreSQL: reads records (evidence: `server/seo/data.ts`)
- PostgreSQL → Data schema: uses schema (evidence: `drizzle/db.ts`)
