Login

What's under the hood?

The architecture, tools, and patterns that make LocalSite professional and scalable.

Designed to scale

Blueprint-based structure — each feature lives in its own module.

🏭 App Factory Pattern

The app is created via create_app() in app/__init__.py. This keeps setup clean, enables testing, and makes registering new modules trivial.

🧩 Blueprint Architecture

Every section of the site is an isolated Blueprint. Adding a new section only requires:

  • Create app/blueprints/<name>/ with __init__.py and routes.py
  • Register it in create_app() with a URL prefix
  • Add templates to app/templates/<name>/

⚙️ Config-Driven Environments

Three config classes — DevelopmentConfig, ProductionConfig, and TestingConfig — are selected by the FLASK_ENV variable in your .env file.

🌐 Local Network Access

The server binds to 0.0.0.0, making it reachable from any device on your Wi-Fi. Find your machine's IP address and open http://<your-ip>:5000 on any phone or tablet.

Built with proven tools

No unnecessary dependencies — just the right tools for the job.

🐍

Flask

Web framework

📄

Jinja2

Templating engine

🔧

Python-dotenv

Config management

🎨

Vanilla CSS

Styling & layout

⚡

Vanilla JS

Interactivity

Folder structure

Every file has a clear purpose — easy to navigate and extend.

📁 Directory Overview

app/__init__.py — App factory & blueprint registration
app/config.py — Environment configurations
app/blueprints/ — One folder per site section
app/templates/ — Jinja2 HTML templates
app/static/ — CSS, JS, and images
run.py — Entry point (binds to 0.0.0.0)
.env — Secret key and environment flags