Welcome to Lariv
Lariv is a radically productive, Python-first backend framework designed for building complex, data-intensive web applications. Built on the shoulders of giants—Django, HTMX, and Alpine.js—Lariv reimagines UI development by bringing the component model directly into Python.
No more writing messy HTML templates or context-switching between frontend JS frameworks and backend APIs. With Lariv, you define your entire UI tree dynamically using plain Python classes.
Why Lariv?
- Python-First UI: Build, compose, and refactor your UI components using the full power of Python. If you know Python, you know how to build UI in Lariv.
- Hypermedia Driven: By leveraging HTMX, Lariv sends HTML over the wire. This eliminates the need for complex state management on the client (like Redux or Zustand) and keeps your application logic centralized on the server.
- Surgical Interactivity: Need partial page updates? Lariv's component tree combined with HTMX allows for surgical rendering of specific components without reloading the entire page.
- Decoupled Plugin Architecture: Lariv enforces a strict plugin model via its
Registrysystem. Features are entirely decoupled and dynamically injected, making the codebase scale gracefully as complexity grows. - Built-in Access Control: Security isn't an afterthought. Every UI component has a
roleattribute, and the framework automatically prunes the UI tree—preventing unauthorized rendering at the deepest levels.
Cons & Trade-offs
While Lariv is powerful, it's not a silver bullet. Consider these trade-offs:
- Steep Learning Curve for Traditional Frontend Devs: Developers used to React, Vue, or Angular might find the Python-centric UI generation jarring initially. It shifts the center of gravity entirely back to the server.
- Server Load: Because the server renders HTML on every interaction (HTMX), CPU load and network payload sizes can be higher compared to passing minimal JSON to a SPA.
- Django Coupling: Lariv is deeply intertwined with Django's ORM and request lifecycle. Attempting to use Lariv components outside of a Django context is currently not supported.
Appropriate Use Cases
Lariv shines in scenarios where backend logic and data processing are the primary focus, and you want a rich, interactive UI without the overhead of a separate SPA.
- Complex Admin Panels & Internal Tools: Rapidly build data-heavy dashboards, reporting tools, and back-office applications. The component library (Tables, Forms, Charts) is tailor-made for this.
- SaaS Platforms (B2B/B2C): Build user portals, configuration interfaces, and management dashboards where secure, role-based data presentation is critical.
- Data-Intensive Applications: Applications that require complex server-side data aggregation before display. Rendering on the server allows for highly optimized database queries directly near the rendering logic.
- AI/LLM Interfaces: When building chat interfaces or prompt-driven workflows, Lariv's dynamic component rendering and Redis/WebSocket integration make it easy to stream responses and manage complex state entirely on the backend.