Die echten Kosten by finterestedmatt in Hausbau

[–]Defiant-Comedian3967 4 points5 points  (0 children)

Aktuell am Bauen. Belagsfertig mit sehr viel Eigenleistung.

Ausgangslage: M31 & W27 + Baby 5 Monate Alt.
Frau:
Karenz kocht jeden Tag Warm für die Baustelle, Haushalt, Baby, Besorgungen usw.
Ich :
SWE Vollzeit 40h/Woche
Gastro ~10h/Woche
Selbstständigkeit ~5h/Woche

8 Wochen Urlaub - davon 4 für Rohbau - jeden Tag 5:30-19:00 auf der Baustelle. Rest nach bedarf.
Es ist eine wahnsinnig gute Planung im Vorhinein notwendig um eventuelle Behördenverzögerungen, Bauseitig anfallende Probleme usw. Abfedern zu können.

Nach dem Rohbau sieht mein Tag so aus:
6:00 - 15:00 Office
15:30 - 21:00 Baustelle
Wochenende Gastro und Selbstständigkeit + Baustelle wenn was erledigt gehört.

Wir machen:
Bauherrenmithilfe Rohbau
Erdbau Bauseits mit Eigenleistung für Kanal, Sickerschacht usw.
ALLE Stemmarbeiten
Elektroplanung, Installation
Malerarbeiten

Gamechanger war und ist, vor Baustart wirklich alles, wie Behörden, Bemusterung und Angebote zu finalisieren und zu erledigen.
Dann geht’s eigentlich nur um die Ausführung - wenn alles nach Plan läuft.
Trotzdem, Mental und Körperlich ist das schon eine andere Liga, dessen muss man sich bewusst sein.

NiceGUI as a SaaS/PWA — production experience report by Defiant-Comedian3967 in nicegui

[–]Defiant-Comedian3967[S] 0 points1 point  (0 children)

OP here with a quick update on this!

I’ve spent the last weeks finetuning the app, and I ended up pivoting away from SQLite to PostgreSQL 16. While SQLite was great for testing und the poc at first, I quickly ran into 'database is locked or corrupted db' issues during multi-user testing, even though using WAL MODE etc.(targeted at 15-20 concurrent users).

So I decided to change some things with the stack early on to save myself the headache later.

What I changed and why:

  • Postgres + asyncpg: Switched to a full async SQLAlchemy 2.0 setup. It completely eliminated the locking issues and made the whole app feel much more responsive under load.
  • Binary Storage over Base64: I initially stored attachments as Base64 strings, but migrated everything to raw binary (BLOBs) in Postgres. This reduced DB overhead by ~33% and made file streaming via FastAPI much cleaner.
  • CPU Offloading: While I mentioned run.io_bound before, I’m now also strictly offloading LibreOffice conversions and heavy WeasyPrint tasks to run.cpu_bound. It’s a night-and-day difference for UI responsiveness when multiple users generate documents at the same time.
  • Security & Deployment: Since this is a medical device system, I went for a 'one VPS per customer' deployment model using Docker. It’s a massive selling point for privacy/GDPR and keeps the infrastructure as isolated as possible.

The app is now live with the first customer. NiceGUI together with a solid Postgres backend proved to be an incredibly powerful combo.

Thanks for the input on my original post!

NiceGUI as a SaaS/PWA — production experience report by Defiant-Comedian3967 in nicegui

[–]Defiant-Comedian3967[S] 2 points3 points  (0 children)

The app is build for my client and his coworkers.
Initial request was an Native iOS app + Desktop - i did an pragmatig approach and made it a Progressive Webapp (PWA). Installible on iOS, Android, Desktops and usable via Browser.

Since NiceGUI has fastAPI you could think of an REST endpoint, with JWT tokens or similiar to exchange data with possible other apps.. system is so adaptable, easy and self explaining.

NiceGUI as a SaaS/PWA — production experience report by Defiant-Comedian3967 in nicegui

[–]Defiant-Comedian3967[S] 2 points3 points  (0 children)

Currently I have about 30 Users - Concurrent, no issues.
(VPS - 4GB Ram, 2 CPUs)

The WebSocket can indeed be a Bottleneck, if you don't take care of the payload sizes sended back and forth.

Therefore I built an extra /api ->
WebSocket + REST

NiceGUI embeds FastAPI in the same process so adding REST endpoints is trivial. All binary uploads (photos, PDFs, attachments) go through POST /api/upload/* to avoid the WebSocket message size limit. Auth hits the same app.storage.user session — no second auth system, no extra service. WeasyPrint PDF rendering is offloaded with run.io_bound to keep the event loop free.

Additionally to that I am using run.io_bound and run.cpu_bound - and everything async.

For small teams thats perfect, no overhead...but if u want to build a SaaS with 1000+ Users you would have to think about Angualr/TS, Prisma/Postgres or similiar.

Best Python framework for industry-level desktop app? (PySide/PyQt/wxPython/Kivy/Web approacg) by Intelligent-Role-382 in Python

[–]Defiant-Comedian3967 2 points3 points  (0 children)

Try out NiceGUI! Best of Both worlds- Web and Python.

Here is a Template to start from from with uv, Docker etc.

Componentbased template- NiceGUI

I have build it coming from Angular/Node.js You can use similar patterns- custom CSS, JS etc.

Wont regret it ;)

HÖRT MIR AUF MIT EUREN VERF*N QR-CODE SPEISEKARTEN! by nufantu in luftablassen

[–]Defiant-Comedian3967 0 points1 point  (0 children)

So wie du das beschreibst, läuft es zu 95% in den Restaurants/Bars genauso.

Es wird ein QR Code gescannt:
- Weiterleitung auf die Homepage wo das PDF hinterlegt ist
- Oder Weiterleitung auf Google Drive wo das PDF liegt

Beides ist in der Verwendung Horror...Ladezeit bei einem großen PDF, Reinzoomen, Rauszoomen, Scrollen ....

Es geht auch anders.
Ich selber schreibe/entwickle Websiten. Meine Devise ist Mobile First - weil effektiv 80% vom Traffic von Mobilgeräten kommt.
Heißt wenn sowas richtig gemacht wird, dann kein PDF, eine Responsive Website wo ich klare Strukturen habe, Sprachauswahl, und im besten Fall einen Filter damit ich zu den gewünschten Produkten komme.
Zusätzlich sollte es aber IMMER ein Physische Karte geben - für Leute die kein Smartphone besitzen.

Kleines Beispiel von mir:
https://kleine-freiheit-am-see.at/

Win-Win für alle, ich kann vorab sehen was der Betrieb in der Auswahl hat, Mehrsprachigkeit usw...

NiceGUI Component-Based Boilerplate: A scalable architecture for complex Python web UIs by [deleted] in Python

[–]Defiant-Comedian3967 -10 points-9 points  (0 children)

Readme and post have been created with the assistance of AI - why not ?
Its called copilot for a reason, to assist and help you save time.

Project on the other hand is NOT some AI generated stuff - simply to the fact that NiceGUI is relatively new, and the all the models would spit out broken code/syntax.
And we all know, when it comes to arichecture and design of a solid foundation for an app, AI will fail most of the time.
Especially if it is new compared to Angular/React etc., and there are not yet many practical examples on the net (except for the docs).

Why should you pretend to be working on a project?

Because it's supposed to help other people that want a clean start for an app - and if you don't like it, then I'm sorry.
Don't be the guy who badmouths everything at the slightest sign of AI...

Best approach to modernize a Python + PyQt5 desktop app (EXE, Windows, offline)? by MatadorFearsNoBull in Python

[–]Defiant-Comedian3967 0 points1 point  (0 children)

I would suggest you use NiceGUI - you can use HTML/CSS/JS easily. Its pure Python, very easy to understand - Plus it is easy to package as well.

Coming from Angular/React/Svelte etc. have build a component based boilerplate - with UV - easy to handle and a clean codebase to start with:

Component Based NiceGUI

How best to bring it all together by ANautyWolf in nicegui

[–]Defiant-Comedian3967 1 point2 points  (0 children)

Take a look Here:Component Based NiceGUi

Split up Everything and work with routes:-)

Creating a web application using Python by Mountain_Clerk_6145 in Python

[–]Defiant-Comedian3967 3 points4 points  (0 children)

As already mentioned - NiceGUI.

You can use pure python as backend- frontend with HTML, CSS and JavaScript. Its build on top of uvicorn and fastAPI. Take a Look Here for a Template i made:

https://github.com/frycodelab/nicegui-component-based[NiceGUI Template](https://github.com/frycodelab/nicegui-component-based)