4 ms·
Ok I feel like I can give some good advice here. I wrote 4 Django apps over the last few years some for work and some during vacation/downtime (and sold a coupl
by rlawson 4y ago
Ok I feel like I can give some good advice here. I wrote 4 Django apps over the last few years some for work and some during vacation/downtime (and sold a couple). One was a car reservation system with reminder emails. The others were covid screening, warehouse management and a car key replacement service.
They all were multi-tenant and had the concept of an admin login and a user login. Basically I had organizations and each org can have admins and users. Each user had a profile with a role/organization_id which determined what UI they were served.
I used Django apps this way:
* core-app - models and common services
* admin-app - admin ui and admin services
* user-app - user ui and user services
Of course you could code up the admin and user projects separately for maximum decoupling but you'd want your common core app to be a dependency for each.
Messages (Email and SMS) to be sent were dropped on a queue and processed by workers.
Each message was self contained and basically was the type of email to send, a map of data and a pointer to the template. I think in the later version I skipped the worker and called a lambda on the message appearing (this was AWS)
Reminders in the future were just put in the db and then a cron job grabbed them when it was time to send. For instance, the time to remind someone that their car reservation was about to expire was configurable by the admin - so you could say 24 hrs before or less depending on the dealer's policy. Anyway you get the picture.
UI was all simple with a bootstrap based admin template that was mobile friendly and mostly web 1.0. I did add some fanciness with intercooler or later htmx. I also used a js grid extensively for reports.
I can't share the code with you (sold it or was for employer) but I can certainly share some poc code on other projects as well as the general approach. My email is in my profile and I am happy to talk you through it and login and show you the some of the systems that I still do enhancements for.
The main point is Django was rock solid and super productive. Deploying was the only hassle and since I know AWS pretty well that's what I went with.
I do know there are products that you can purchase that have a lot of stuff already setup. I haven't used them but this one seems to come up a lot - https://www.saaspegasus.com/ https://www.saaspegasus.com/