Build production-ready Python UI apps with architecture patterns inspired by GetX
Reactive state β’ Modular routing β’ Clean architecture β’ Developer productivity
Quick Start β’ Features β’ Showcase β’ Docs β’ Discord
FletX is an architectural framework that brings production-grade patterns to Flet applications. Built on proven GetX principles, it combines reactive state management, modular routing, and dependency injectionβall with zero boilerplate.
| Problem | Solution |
|---|---|
| Spaghetti code | Pages β Controllers β Services architecture |
| Manual state management | Reactive primitives (RxInt, RxList, Computed) |
| Boilerplate routing | Declarative routing with type safety |
| Dependency chaos | Global DI container with tag-based lookup |
| Slow development | CLI for instant scaffolding & generation |
| Poor dev experience | Hot reload, testing utilities, lifecycle hooks |
See FletX in action across different platforms:
Web
|
Mobile
|
Desktop
|
| Feature | Impact |
|---|---|
| Reactive state | Auto UI updatesβno manual page.update() (setState) |
| Modular routing | Deep linking, guards, middlewares, dynamic parameters |
| Dependency injection | Services & controllers managed elegantly |
| Clean architecture | Scale from MVP to enterprise apps |
| Developer CLI | 10x faster project setup & component generation |
| Type hints | Full IDE support and runtime safety |
Get a production-ready app running in under 3 minutes:
# 1. Install (Python 3.10+)
pip install FletXr[dev] --pre
# 2. Create new project
fletx new my_project
cd my_project
# 3. Run with hot reload
fletx run --web --watchThat's it! Your app is now running in the browser with live reload. Every save triggers instant feedback.
my_project/
βββ app/
β βββ controllers/ # State & business logic
β βββ services/ # APIs, storage, utilities
β βββ pages/ # UI screens
β βββ components/ # Reusable widgets
β βββ routes.py # All routes in one place
βββ assets/ # Images, fonts, etc.
βββ tests/ # Automated tests
βββ pyproject.toml # Dependencies & config
βββ main.py # Entry point
Every file generated by fletx generate follows FletX conventionsβno guessing, no inconsistency.
import flet as ft
from fletx.app import FletXApp
from fletx.core import FletXPage, FletXController, RxInt
from fletx.navigation import router_config
from fletx.decorators import obx
class CounterController(FletXController):
def __init__(self):
self.count = RxInt(0) # Reactive state
super().__init__()
def increment(self):
self.count.increment() # UI auto-updates
class CounterPage(FletXPage):
ctrl = CounterController()
@obx # πͺ Magic: auto-tracks reads, rebuilds on change
def counter_display(self):
return ft.Text(
f"Count: {self.ctrl.count}",
size=50, weight="bold",
color = 'red' if not self.ctrl.count.value % 2 == 0 else 'white'
)
def build(self):
return ft.Column(controls=[
self.counter_display(),
ft.ElevatedButton(
"+1",
on_click=lambda _: self.ctrl.increment()
),
])
if __name__ == "__main__":
# Defining route
router_config.add_route(
path = '/',
component = CounterPage
)
app = FletXApp(title="Counter", initial_route="/", debug=True)
app.run()No boilerplate. No manual rebuilds. Just reactive state.
Build scalable apps with separation of concerns:
class UserController(FletXController):
def __init__(self):
self.users = RxList([])
self.selected = RxInt(-1)
super().__init__()
def fetch_users(self):
# Async-friendly, auto-notifies UI
users = api.get_users()
self.users.set(users)
def select(self, index):
self.selected.set(index)class UserPage(FletXPage):
ctrl = UserController()
@obx
def user_list(self):
return ft.Column(controls=[
ft.Text(user.name) for user in self.ctrl.users
])
def build(self):
return self.user_list()class ApiService(FletXService):
def get_users(self):
# HTTP calls, caching, error handling
passfrom fletx.navigation import router_config, navigate
router_config.add_route("/users/:id", UserDetailPage)
navigate("/users/123") # Fully type-checkedfrom fletx.decorators import reactive_debounce, reactive_memo
@reactive_debounce(0.5) # Debounce at 500ms
def search(query):
pass
@reactive_memo(maxsize=100) # Memoize results
def expensive_compute(n):
passFletX users report:
- 50% faster development β Scaffold β code β deploy in hours, not days
- 0 boilerplate β Pre-built patterns for common patterns
- 10k+ downloads β Trusted by developers building production apps
- Active community β Daily updates, responsive maintainers, helpful Discord
β
Full-featured CLI β fletx new, fletx generate, fletx run, fletx test
β
Reactive primitives β RxInt, RxStr, RxList, RxDict, Computed
β
Smart decorators β @obx, @reactive_debounce, @reactive_memo, and 10+ more
β
Built-in DI β Global service container with tag-based lookup
β
Testing support β Built-in utilities for unit & integration tests
β
TypeScript-grade IDE support β Full autocomplete and type hints
β
Active maintenance β Bug fixes, features, and community updates
# Create & manage projects
fletx new my_project --author "You"
fletx generate controller Home --with-test
fletx generate service Api
fletx generate page Settings
# Development & testing
fletx run --web --watch # Browser + hot reload
fletx run --desktop # Desktop window
fletx run --android # Android device
fletx test --coverage # Test with coverage
# Validation
fletx check --json # Verify compatibility| Resource | Link |
|---|---|
| Full Docs | π Getting Started Guide |
| Examples | π― Real Projects |
| Community | π¬ Discord Chat |
| Video Tutorials | π₯ YouTube Course |
| Issue Tracker | π GitHub Issues |
We're building FletX together. Here's how you can help:
- β Star us on GitHub β Every star helps new developers find us
- π Report issues β Found a bug? Open an issue (we fix them fast)
- π‘ Suggest features β Have an idea? Discussions are open
- π Write docs β Help improve guides and examples
- π§ Contribute code β PRs welcome, see CONTRIBUTING.md
- π¬ Join Discord β Chat with maintainers and other developers
Ready to build?
- Install FletX (2 min)
- Create your first project (3 min)
- Learn the patterns (15 min)
- Build something awesome (β min)
MIT Β© 2026 AllDotPy
Built with β€οΈ by AllDotPy
β Star us on GitHub β’ π¬ Join Discord β’ π Read Docs



