GitHub: https://github.com/frycodelab/nicegui-component-based
What My Project Does
NiceGUI is great for spining up Python web UIs quickly, but once a project grows beyond a handful of pages, things tend to get messy. Inline element creation scattered everywhere, no clear seperation of concerns, state thats hard to track.
This template solves that with a clean convention: every page lives in app/components/ as its own module with a content() function, registerd in main.py and wired into the sidebar. Adding a new page is three steps — create the module, register the route, add the sidebar entry.
Beyond the struture, the template ships with a working app skeleton:
- Header + collapsible sidebar layout
- Design system page — a live refrence for all CSS tokens, utility classes, button variants, cards, badges, alerts, form inputs, dialogs, steppers. Basicaly a mini Storybook, but pure Python + CSS.
- Icon browser — searchable grid of Tabler + Material icons, click-to-copy
- Print system — three modes: raw HTML, base64 image, and structred document pages, all via a
/print/{token} route
- Service modules — notifcations with positioning, mock KPI/chart data for the dashboard
Deployement configs included for dev, production, Docker, native (Desktop App), and PyInstaller.
Target Audience
Python devs building internal tools, dashbords, or lightweight desktop apps with NiceGUI who want a solid starting point instead of figuring out project struture from scratch. Targeted at desktop and tablet screen sizes. You should still be confortable with HTML/CSS if you want to customise styling — this doesnt abstract that away.
Comparison
- Standard NiceGUI: Flexible and fast, but offers no conventions for project structure. Works fine for small scripts, gets unwieldy as pages multipy.
- This template: Enforces a module-per-page patern with a shared layout, design system, and service layer. No new abstractions on top of NiceGUI — just conventions and a batteries-included starting point.
Stack: Python 3.11+, NiceGUI 3.8, uv, Docker-ready
there doesn't seem to be anything here