# bilgisayargoztepe-lgtm/wificorrect architecture

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

- Interactive diagram: https://gitdiagram.com/bilgisayargoztepe-lgtm/wificorrect
- Repository: https://github.com/bilgisayargoztepe-lgtm/wificorrect

## Overview

WifiCorrect is a café guest-Wi-Fi hotspot providing SMS OTP access, network controls, and 5651-compliant records. The guest journey runs from the captive portal through identity and OTP verification to network authorization and session logging. Operators manage the device and guest records through a local panel; separate services handle traffic limits, record sealing and backup, account-center synchronization, and health checks. The README describes the Rust application as the product; the Python server-side modules are included only as a legacy management surface. Connections are limited to documented behavior and sampled source references.

Main entry points: [`src/portal.rs`](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/portal.rs) (Captive portal), [`src/panel.rs`](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/panel.rs) (Admin panel), [`src/ortak.rs`](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/ortak.rs) (5651 records), [`src/kaydedici.rs`](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/kaydedici.rs) (Device recorder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_guest_access["Guest access"]
  node_portal["Captive portal<br/>[portal.rs]"]
  node_identity["Identity checks<br/>[kimlik.rs]"]
  node_guest_sessions["Guest sessions<br/>[misafir.rs]"]
  node_sms["SMS verification<br/>[sms.rs]"]
  node_network_access["Network access<br/>[ortak.rs]"]
end

subgraph group_device_ops["Device operations"]
  node_panel["Admin panel<br/>[panel.rs]"]
  node_panel_records["Record views<br/>[kayit_sayfalari.rs]"]
  node_panel_guest["Guest views<br/>[misafir_sayfasi.rs]"]
  node_panel_network["Port settings<br/>[portlar.rs]"]
  node_network_config["Network configuration<br/>[ag.rs]"]
  node_speed_limits["Speed limits<br/>[hiz.rs]"]
  node_traffic["Traffic accounting<br/>[trafik.rs]"]
  node_health["Health checks<br/>[saglik.rs]"]
end

subgraph group_compliance["Records and compliance"]
  node_recorder["Device recorder<br/>[kaydedici.rs]"]
  node_record_store[("5651 records<br/>[ortak.rs]")]
  node_record_search["Record search<br/>[kayit.rs]"]
  node_sealing["Seal and retain<br/>[muhur.rs]"]
end

subgraph group_service_links["Service integrations"]
  node_twilio["Twilio Verify<br/>[twilio.rs]"]
  node_center["Account center<br/>[merkez.rs]"]
  node_remote["Remote access<br/>[uzak.rs]"]
end

node_guest(("Guest"))
node_operator(("Operator"))

node_guest -->|"opens"| node_portal
node_portal -->|"checks identity"| node_identity
node_portal -->|"sends OTP"| node_sms
node_sms -->|"uses provider"| node_twilio
node_portal -->|"verifies guest"| node_guest_sessions
node_portal -->|"authorizes access"| node_network_access
node_portal -->|"writes sessions"| node_record_store
node_operator -->|"manages device"| node_panel
node_panel -->|"shows records"| node_panel_records
node_panel -->|"shows guests"| node_panel_guest
node_panel -->|"configures ports"| node_panel_network
node_panel_network -->|"updates network"| node_network_config
node_panel -->|"sets limits"| node_speed_limits
node_recorder -->|"samples counters"| node_traffic
node_recorder -->|"applies limits"| node_speed_limits
node_recorder -->|"writes records"| node_record_store
node_panel_records -->|"queries records"| node_record_search
node_record_search -->|"reads records"| node_record_store
node_sealing -->|"seals and cleans"| node_record_store
node_sealing -->|"backs up records"| node_remote
node_panel -->|"links device"| node_center
node_center -->|"configures tunnel"| node_remote
node_health -->|"checks service"| node_center
node_health -->|"checks network"| node_network_config

click node_portal "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/portal.rs"
click node_identity "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/kimlik.rs"
click node_guest_sessions "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/misafir.rs"
click node_sms "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/sms.rs"
click node_twilio "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/twilio.rs"
click node_network_access "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/ortak.rs"
click node_panel "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/panel.rs"
click node_panel_records "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/panel/kayit_sayfalari.rs"
click node_panel_guest "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/panel/misafir_sayfasi.rs"
click node_panel_network "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/panel/portlar.rs"
click node_network_config "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/ag.rs"
click node_speed_limits "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/hiz.rs"
click node_traffic "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/trafik.rs"
click node_recorder "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/kaydedici.rs"
click node_record_store "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/ortak.rs"
click node_record_search "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/kayit.rs"
click node_sealing "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/muhur.rs"
click node_health "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/saglik.rs"
click node_center "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/merkez.rs"
click node_remote "https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/uzak.rs"

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_portal,node_identity,node_guest_sessions,node_sms,node_network_access toneBlue
class node_panel,node_panel_records,node_panel_guest,node_panel_network,node_network_config,node_speed_limits,node_traffic,node_health toneAmber
class node_recorder,node_record_store,node_record_search,node_sealing toneMint
class node_twilio,node_center,node_remote toneRose
class node_guest,node_operator toneIndigo
```

## Components

### Guest access

- [Captive portal](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/portal.rs): `src/portal.rs`
- [Identity checks](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/kimlik.rs): `src/kimlik.rs`
- [Guest sessions](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/misafir.rs): `src/misafir.rs`
- [SMS verification](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/sms.rs): `src/sms.rs`
- [Network access](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/ortak.rs): `src/ortak.rs`

### Device operations

- [Admin panel](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/panel.rs): `src/panel.rs`
- [Record views](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/panel/kayit_sayfalari.rs): `src/panel/kayit_sayfalari.rs`
- [Guest views](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/panel/misafir_sayfasi.rs): `src/panel/misafir_sayfasi.rs`
- [Port settings](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/panel/portlar.rs): `src/panel/portlar.rs`
- [Network configuration](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/ag.rs): `src/ag.rs`
- [Speed limits](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/hiz.rs): `src/hiz.rs`
- [Traffic accounting](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/trafik.rs): `src/trafik.rs`
- [Health checks](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/saglik.rs): `src/saglik.rs`

### Records and compliance

- [Device recorder](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/kaydedici.rs): `src/kaydedici.rs`
- [5651 records](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/ortak.rs): `src/ortak.rs`
- [Record search](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/kayit.rs): `src/kayit.rs`
- [Seal and retain](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/muhur.rs): `src/muhur.rs`

### Service integrations

- [Twilio Verify](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/twilio.rs): `src/twilio.rs`
- [Account center](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/merkez.rs): `src/merkez.rs`
- [Remote access](https://github.com/bilgisayargoztepe-lgtm/wificorrect/blob/main/src/uzak.rs): `src/uzak.rs`

### Other components

- **Guest**
- **Operator**

## Connections

- Guest → Captive portal: opens
- Captive portal → Identity checks: checks identity (evidence: `src/portal.rs`)
- Captive portal → SMS verification: sends OTP (evidence: `src/portal.rs`)
- SMS verification → Twilio Verify: uses provider (evidence: `src/sms.rs`)
- Captive portal → Guest sessions: verifies guest (evidence: `src/portal.rs`)
- Captive portal → Network access: authorizes access (evidence: `src/portal.rs`)
- Captive portal → 5651 records: writes sessions (evidence: `src/portal.rs`)
- Operator → Admin panel: manages device
- Admin panel → Record views: shows records (evidence: `src/panel.rs`)
- Admin panel → Guest views: shows guests (evidence: `src/panel.rs`)
- Admin panel → Port settings: configures ports (evidence: `src/panel.rs`)
- Port settings → Network configuration: updates network (evidence: `src/panel/portlar.rs`)
- Admin panel → Speed limits: sets limits (evidence: `src/panel.rs`)
- Device recorder → Traffic accounting: samples counters (evidence: `src/kaydedici.rs`)
- Device recorder → Speed limits: applies limits (evidence: `src/kaydedici.rs`)
- Device recorder → 5651 records: writes records (evidence: `src/kaydedici.rs`)
- Record views → Record search: queries records (evidence: `src/panel/kayit_sayfalari.rs`)
- Record search → 5651 records: reads records (evidence: `src/kayit.rs`)
- Seal and retain → 5651 records: seals and cleans (evidence: `src/muhur.rs`)
- Seal and retain → Remote access: backs up records (evidence: `src/muhur.rs`)
- Admin panel → Account center: links device (evidence: `src/panel.rs`)
- Account center → Remote access: configures tunnel (evidence: `src/panel.rs`)
- Health checks → Account center: checks service (evidence: `src/saglik.rs`)
- Health checks → Network configuration: checks network (evidence: `src/saglik.rs`)
