# 751k/flatradar architecture

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

- Interactive diagram: https://gitdiagram.com/751k/flatradar
- Repository: https://github.com/751k/flatradar

## Overview

FlatRadar monitors Dutch rental listings, applies each user’s criteria, and delivers alerts; Holland2Stay can additionally prepare a checkout through the payment page, while Plaza can submit applications when enabled. The hosted web interface supports list, map, calendar, dashboard and charts, plus multi-user settings and mobile push. The graph combines README-described product stages with relationships visible in the supplied source excerpts and SOURCE INDEX. Some monitor, notification, and route wiring was not sampled, so those links are documented at product level rather than presented as inspected call paths.

Main entry points: [`app/services/listing_service.py`](https://github.com/751k/flatradar/blob/master/app/services/listing_service.py) (Listing queries), [`scrapers`](https://github.com/751k/flatradar/tree/master/scrapers) (Platform scrapers), [`web.py`](https://github.com/751k/flatradar/blob/master/web.py) (Hosted web app), [`monitor.py`](https://github.com/751k/flatradar/blob/master/monitor.py) (Monitor runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_monitoring["Market monitoring"]
  node_monitor["Monitor runtime<br/>[monitor.py]"]
  node_source_config["Source configuration<br/>[config.py]"]
  node_source_registry["Platform registry<br/>[registry.py]"]
  node_scraper_core["Scraper framework<br/>[base.py]"]
  node_platform_scrapers["Platform scrapers"]
  node_browser_workers["Browser workers<br/>[browser_worker.py]"]
end

subgraph group_matching["Listings and matching"]
  node_listing_model["Listing model<br/>[models.py]"]
  node_user_filters["Filter rules<br/>[filters.py]"]
  node_listing_service["Listing queries<br/>[listing_service.py]"]
  node_listing_store[("Listing storage<br/>[_listings.py]")]
end

subgraph group_web["Web experience"]
  node_webapp["Hosted web app<br/>[web.py]"]
  node_web_routes["Web routes"]
  node_listing_views["Listing views<br/>[app.js]"]
  node_map_views["Map view<br/>[map_routes.py]"]
  node_calendar_views["Calendar view<br/>[calendar_routes.py]"]
end

subgraph group_accounts["Accounts and settings"]
  node_user_store[("User profiles<br/>[users.py]")]
  node_account_auth["Authentication<br/>[auth.py]"]
  node_settings_store[("Runtime settings<br/>[settings_store.py]")]
end

subgraph group_actions["Alerts and applications"]
  node_notification_delivery["Notification delivery<br/>[notifier.py]"]
  node_push_delivery["Mobile push<br/>[push.py]"]
  node_booking_worker["Booking worker<br/>[booking_worker.py]"]
  node_h2s_checkout["H2S checkout<br/>[h2s_checkout.py]"]
  node_plaza_applications["Plaza applications<br/>[plaza.py]"]
end

node_renter(("Renter"))

node_renter -->|"sets criteria"| node_webapp
node_webapp -.->|"authenticates"| node_account_auth
node_account_auth -->|"checks accounts"| node_user_store
node_webapp -.->|"configures"| node_settings_store
node_monitor -.->|"loads settings"| node_source_config
node_source_config -->|"uses platform data"| node_source_registry
node_monitor -->|"polls platforms"| node_platform_scrapers
node_platform_scrapers -->|"produce listings"| node_listing_model
node_browser_workers -->|"runs scrapers"| node_scraper_core
node_browser_workers -->|"loads scraper"| node_platform_scrapers
node_platform_scrapers -->|"stores listings"| node_listing_store
node_listing_store -.->|"supplies listing data"| node_listing_service
node_listing_service -->|"queries listings"| node_listing_store
node_listing_service -->|"applies filters"| node_user_filters
node_web_routes -->|"serves listing views"| node_listing_service
node_web_routes -->|"routes map requests"| node_map_views
node_web_routes -->|"routes calendar requests"| node_calendar_views
node_listing_views -.->|"renders dashboard"| node_webapp
node_listing_service -.->|"matches trigger alerts"| node_notification_delivery
node_notification_delivery -->|"sends mobile push"| node_push_delivery
node_notification_delivery -->|"delivers alerts"| node_renter
node_monitor -.->|"starts booking flow"| node_booking_worker
node_booking_worker -->|"runs checkout"| node_h2s_checkout
node_booking_worker -.->|"submits applications"| node_plaza_applications
node_h2s_checkout -->|"sends payment link"| node_renter

click node_webapp "https://github.com/751k/flatradar/blob/master/web.py"
click node_monitor "https://github.com/751k/flatradar/blob/master/monitor.py"
click node_source_config "https://github.com/751k/flatradar/blob/master/config.py"
click node_source_registry "https://github.com/751k/flatradar/blob/master/mcore/registry.py"
click node_scraper_core "https://github.com/751k/flatradar/blob/master/scrapers/base.py"
click node_platform_scrapers "https://github.com/751k/flatradar/tree/master/scrapers"
click node_browser_workers "https://github.com/751k/flatradar/blob/master/mcore/browser_worker.py"
click node_listing_model "https://github.com/751k/flatradar/blob/master/models.py"
click node_user_filters "https://github.com/751k/flatradar/blob/master/filters.py"
click node_listing_service "https://github.com/751k/flatradar/blob/master/app/services/listing_service.py"
click node_listing_store "https://github.com/751k/flatradar/blob/master/mstorage/_listings.py"
click node_web_routes "https://github.com/751k/flatradar/tree/master/app/routes"
click node_listing_views "https://github.com/751k/flatradar/blob/master/static/app.js"
click node_map_views "https://github.com/751k/flatradar/blob/master/app/routes/map_routes.py"
click node_calendar_views "https://github.com/751k/flatradar/blob/master/app/routes/calendar_routes.py"
click node_user_store "https://github.com/751k/flatradar/blob/master/users.py"
click node_account_auth "https://github.com/751k/flatradar/blob/master/app/auth.py"
click node_settings_store "https://github.com/751k/flatradar/blob/master/settings_store.py"
click node_notification_delivery "https://github.com/751k/flatradar/blob/master/notifier.py"
click node_push_delivery "https://github.com/751k/flatradar/blob/master/mcore/push.py"
click node_booking_worker "https://github.com/751k/flatradar/blob/master/mcore/booking_worker.py"
click node_h2s_checkout "https://github.com/751k/flatradar/blob/master/bookers/h2s_checkout.py"
click node_plaza_applications "https://github.com/751k/flatradar/blob/master/bookers/plaza.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_monitor,node_source_config,node_source_registry,node_scraper_core,node_platform_scrapers,node_browser_workers toneBlue
class node_listing_model,node_user_filters,node_listing_service,node_listing_store toneAmber
class node_webapp,node_web_routes,node_listing_views,node_map_views,node_calendar_views toneMint
class node_user_store,node_account_auth,node_settings_store toneRose
class node_notification_delivery,node_push_delivery,node_booking_worker,node_h2s_checkout,node_plaza_applications,node_renter toneIndigo
```

## Components

### Market monitoring

- [Monitor runtime](https://github.com/751k/flatradar/blob/master/monitor.py): `monitor.py`
- [Source configuration](https://github.com/751k/flatradar/blob/master/config.py): `config.py`
- [Platform registry](https://github.com/751k/flatradar/blob/master/mcore/registry.py): `mcore/registry.py`
- [Scraper framework](https://github.com/751k/flatradar/blob/master/scrapers/base.py): `scrapers/base.py`
- [Platform scrapers](https://github.com/751k/flatradar/tree/master/scrapers): `scrapers`
- [Browser workers](https://github.com/751k/flatradar/blob/master/mcore/browser_worker.py): `mcore/browser_worker.py`

### Listings and matching

- [Listing model](https://github.com/751k/flatradar/blob/master/models.py): `models.py`
- [Filter rules](https://github.com/751k/flatradar/blob/master/filters.py): `filters.py`
- [Listing queries](https://github.com/751k/flatradar/blob/master/app/services/listing_service.py): `app/services/listing_service.py`
- [Listing storage](https://github.com/751k/flatradar/blob/master/mstorage/_listings.py): `mstorage/_listings.py`

### Web experience

- [Hosted web app](https://github.com/751k/flatradar/blob/master/web.py): `web.py`
- [Web routes](https://github.com/751k/flatradar/tree/master/app/routes): `app/routes`
- [Listing views](https://github.com/751k/flatradar/blob/master/static/app.js): `static/app.js`
- [Map view](https://github.com/751k/flatradar/blob/master/app/routes/map_routes.py): `app/routes/map_routes.py`
- [Calendar view](https://github.com/751k/flatradar/blob/master/app/routes/calendar_routes.py): `app/routes/calendar_routes.py`

### Accounts and settings

- [User profiles](https://github.com/751k/flatradar/blob/master/users.py): `users.py`
- [Authentication](https://github.com/751k/flatradar/blob/master/app/auth.py): `app/auth.py`
- [Runtime settings](https://github.com/751k/flatradar/blob/master/settings_store.py): `settings_store.py`

### Alerts and applications

- [Notification delivery](https://github.com/751k/flatradar/blob/master/notifier.py): `notifier.py`
- [Mobile push](https://github.com/751k/flatradar/blob/master/mcore/push.py): `mcore/push.py`
- [Booking worker](https://github.com/751k/flatradar/blob/master/mcore/booking_worker.py): `mcore/booking_worker.py`
- [H2S checkout](https://github.com/751k/flatradar/blob/master/bookers/h2s_checkout.py): `bookers/h2s_checkout.py`
- [Plaza applications](https://github.com/751k/flatradar/blob/master/bookers/plaza.py): `bookers/plaza.py`

### Other components

- **Renter**

## Connections

- Renter → Hosted web app: sets criteria
- Hosted web app → Authentication: authenticates
- Authentication → User profiles: checks accounts (evidence: `app/auth.py`)
- Hosted web app → Runtime settings: configures
- Monitor runtime → Source configuration: loads settings
- Source configuration → Platform registry: uses platform data (evidence: `config.py`)
- Monitor runtime → Platform scrapers: polls platforms
- Platform scrapers → Listing model: produce listings (evidence: `models.py`)
- Browser workers → Scraper framework: runs scrapers (evidence: `mcore/browser_worker.py`)
- Browser workers → Platform scrapers: loads scraper (evidence: `mcore/browser_worker.py`)
- Platform scrapers → Listing storage: stores listings
- Listing storage → Listing queries: supplies listing data
- Listing queries → Listing storage: queries listings (evidence: `app/services/listing_service.py`)
- Listing queries → Filter rules: applies filters (evidence: `app/services/listing_service.py`)
- Web routes → Listing queries: serves listing views (evidence: `app/routes/map_routes.py`)
- Web routes → Map view: routes map requests (evidence: `app/routes/map_routes.py`)
- Web routes → Calendar view: routes calendar requests (evidence: `app/routes/calendar_routes.py`)
- Listing views → Hosted web app: renders dashboard
- Listing queries → Notification delivery: matches trigger alerts
- Notification delivery → Mobile push: sends mobile push (evidence: `app/services/announcement_service.py`)
- Notification delivery → Renter: delivers alerts
- Monitor runtime → Booking worker: starts booking flow
- Booking worker → H2S checkout: runs checkout (evidence: `mcore/booking_worker.py`)
- Booking worker → Plaza applications: submits applications
- H2S checkout → Renter: sends payment link
