search

The Golit
System Architecture

Golit follows an opinionated "Modern Monolith" strategy, unifying the power of Pythonic high-performance backends with reactive, low-latency frontends without the complexity of SPA frameworks.

Back-End

Litestar

High-performance ASGI framework handling routing, security, and data persistence.

Pydantic v2 SQLAlchemy
Transport

HTMX

Hypermedia-driven interaction layer. Transforms standard HTML into reactive components.

hx-target SSE/WS
Front-End

Alpine.js

The "jQuery of the modern age" for handling complex client-side state and transitions.

x-data x-transition

01 Getting Started

# Create a new environment
python -m venv .venv
source .venv/bin/activate

# Install Golit Framework
pip install golit[all]

# Initialize a new project
golit init my_awesome_app --blueprint=saas

02 Defining a Controller

Controllers in Golit are standard Python classes decorated with the framework's reactive decorators. This allows Litestar to handle the ASGI lifecycle while automatically generating HTMX-compatible responses.

from golit import Controller, get, html

class HomeController(Controller):
    path = "/"

    @get()
    async def index(self) -> Template:
        # Standard Jinja2 integration
        return html("index.html", {"title": "Welcome"})

    @get("/partial")
    async def get_partial(self) -> Fragment:
        # HTMX fragment response
        return html("partials/stats.html")