# ilgar31/sktower architecture

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

- Interactive diagram: https://gitdiagram.com/ilgar31/sktower
- Repository: https://github.com/ilgar31/sktower

## Overview

SKTower is a Django website for a construction company. Visitors browse house projects, completed builds, services, promotions, contacts, reviews, and articles; project listings support filtering, sorting, and incremental loading, while inquiry forms submit requests for email handling. The main runtime path is URL routing into Django views, which query the domain models and render pages or return AJAX responses. The source index confirms the views-to-models dependency. Several frontend behaviors and view branches are visible only partially, so their connections are shown as unverified where necessary.

Main entry points: [`main/views.py`](https://github.com/ilgar31/sktower/blob/main/main/views.py) (Page and AJAX views), [`SKTower/urls.py`](https://github.com/ilgar31/sktower/blob/main/SKTower/urls.py) (Project routes), [`SKTower/settings.py`](https://github.com/ilgar31/sktower/blob/main/SKTower/settings.py) (Django settings), [`main/urls.py`](https://github.com/ilgar31/sktower/blob/main/main/urls.py) (App routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web routing and pages"]
  node_root_routes["Project routes<br/>[urls.py]"]
  node_app_routes["App routes<br/>[urls.py]"]
  node_site_views["Page and AJAX views<br/>[views.py]"]
  node_error_view["404 handler<br/>[views.py]"]
  node_templates["Page templates"]
  node_contact_context["Contact context"]
  node_settings["Django settings<br/>[settings.py]"]
end

subgraph group_catalog["Project and content domains"]
  node_project_catalog["House projects<br/>[views.py]"]
  node_project_detail["Project details<br/>[views.py]"]
  node_finished_work["Completed builds<br/>[views.py]"]
  node_articles["Articles<br/>[views.py]"]
  node_company_pages["Company pages<br/>[views.py]"]
end

subgraph group_interaction["Visitor interactions"]
  node_form_handlers["Form handlers<br/>[views.py]"]
  node_project_browser["Project browser UI<br/>[projects.js]"]
  node_form_ui["Form interactions<br/>[services.js]"]
end

subgraph group_persistence["Application data"]
  node_domain_models["Business models<br/>[models.py]"]
  node_database[("SQLite database")]
end

node_visitor(("Site visitor"))

node_root_routes -->|"includes routes"| node_app_routes
node_root_routes -->|"sets 404 handler"| node_error_view
node_app_routes -->|"routes requests"| node_site_views
node_site_views -->|"queries data"| node_domain_models
node_site_views -->|"renders pages"| node_templates
node_contact_context -->|"reads contact info"| node_domain_models
node_settings -->|"configures processor"| node_contact_context
node_settings -->|"configures SQLite"| node_database
node_visitor -.->|"requests pages"| node_root_routes
node_site_views -->|"dispatches forms"| node_form_handlers
node_project_browser -.->|"requests updates"| node_site_views
node_form_ui -.->|"submits forms"| node_form_handlers

click node_root_routes "https://github.com/ilgar31/sktower/blob/main/SKTower/urls.py"
click node_app_routes "https://github.com/ilgar31/sktower/blob/main/main/urls.py"
click node_site_views "https://github.com/ilgar31/sktower/blob/main/main/views.py"
click node_error_view "https://github.com/ilgar31/sktower/blob/main/SKTower/views.py"
click node_project_catalog "https://github.com/ilgar31/sktower/blob/main/main/views.py"
click node_project_detail "https://github.com/ilgar31/sktower/blob/main/main/views.py"
click node_finished_work "https://github.com/ilgar31/sktower/blob/main/main/views.py"
click node_articles "https://github.com/ilgar31/sktower/blob/main/main/views.py"
click node_company_pages "https://github.com/ilgar31/sktower/blob/main/main/views.py"
click node_templates "https://github.com/ilgar31/sktower/tree/main/main/templates/main"
click node_form_handlers "https://github.com/ilgar31/sktower/blob/main/main/views.py"
click node_project_browser "https://github.com/ilgar31/sktower/blob/main/main/static/main/js/projects.js"
click node_form_ui "https://github.com/ilgar31/sktower/blob/main/main/static/main/js/services.js"
click node_contact_context "https://github.com/ilgar31/sktower/blob/main/main/context_processors.py"
click node_domain_models "https://github.com/ilgar31/sktower/blob/main/main/models.py"
click node_settings "https://github.com/ilgar31/sktower/blob/main/SKTower/settings.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_root_routes,node_app_routes,node_site_views,node_error_view,node_templates,node_contact_context,node_settings toneBlue
class node_project_catalog,node_project_detail,node_finished_work,node_articles,node_company_pages toneAmber
class node_form_handlers,node_project_browser,node_form_ui toneMint
class node_domain_models,node_database toneRose
class node_visitor toneIndigo
```

## Components

### Web routing and pages

- [Project routes](https://github.com/ilgar31/sktower/blob/main/SKTower/urls.py): `SKTower/urls.py`
- [App routes](https://github.com/ilgar31/sktower/blob/main/main/urls.py): `main/urls.py`
- [Page and AJAX views](https://github.com/ilgar31/sktower/blob/main/main/views.py): `main/views.py`
- [404 handler](https://github.com/ilgar31/sktower/blob/main/SKTower/views.py): `SKTower/views.py`
- [Page templates](https://github.com/ilgar31/sktower/tree/main/main/templates/main): `main/templates/main`
- [Contact context](https://github.com/ilgar31/sktower/blob/main/main/context_processors.py): `main/context_processors.py`
- [Django settings](https://github.com/ilgar31/sktower/blob/main/SKTower/settings.py): `SKTower/settings.py`

### Project and content domains

- [House projects](https://github.com/ilgar31/sktower/blob/main/main/views.py): `main/views.py`
- [Project details](https://github.com/ilgar31/sktower/blob/main/main/views.py): `main/views.py`
- [Completed builds](https://github.com/ilgar31/sktower/blob/main/main/views.py): `main/views.py`
- [Articles](https://github.com/ilgar31/sktower/blob/main/main/views.py): `main/views.py`
- [Company pages](https://github.com/ilgar31/sktower/blob/main/main/views.py): `main/views.py`

### Visitor interactions

- [Form handlers](https://github.com/ilgar31/sktower/blob/main/main/views.py): `main/views.py`
- [Project browser UI](https://github.com/ilgar31/sktower/blob/main/main/static/main/js/projects.js): `main/static/main/js/projects.js`
- [Form interactions](https://github.com/ilgar31/sktower/blob/main/main/static/main/js/services.js): `main/static/main/js/services.js`

### Application data

- [Business models](https://github.com/ilgar31/sktower/blob/main/main/models.py): `main/models.py`
- **SQLite database**

### Other components

- **Site visitor**

## Connections

- Project routes → App routes: includes routes (evidence: `SKTower/urls.py`)
- Project routes → 404 handler: sets 404 handler (evidence: `SKTower/urls.py`)
- App routes → Page and AJAX views: routes requests (evidence: `main/urls.py`)
- Page and AJAX views → Business models: queries data (evidence: `main/views.py`)
- Page and AJAX views → Page templates: renders pages (evidence: `main/views.py`)
- Contact context → Business models: reads contact info (evidence: `main/context_processors.py`)
- Django settings → Contact context: configures processor (evidence: `SKTower/settings.py`)
- Django settings → SQLite database: configures SQLite (evidence: `SKTower/settings.py`)
- Site visitor → Project routes: requests pages
- Page and AJAX views → Form handlers: dispatches forms (evidence: `main/views.py`)
- Project browser UI → Page and AJAX views: requests updates
- Form interactions → Form handlers: submits forms
