The App frontend architecture is server-first.
Pages are server-rendered Django templates styled using TailwindCSS.
Where necessary we use AlpineJS and HTMX to add interaction to the page and HTMX.
Django templates with AlpineJS and HTMX
- Using server-side rendered Django templates allows us to leverage a lot of Django's value i.e. views, templates, forms, sessions, and authentication.
- A lot can be achieved using HTMX, but the templates have to be well organized for the project to scale. See the Django templates
- TailwindCSS is a utility-first library that allows you to build beautiful interfaces quickly and effortlessly.
- One downside of TailwindCSS is that it does not abstract away the creation of components e.g.
dropdowns. Initially, this can take some getting used to if you are coming from UI Kit frameworks like Bootstrap or Bulma.
- The project includes basic core components that you can reuse, eg. form inputs, buttons, and checkboxes.
- There are also several open-source tailwind component libraries to get you started. See here for a full listing.
Adding a Client-side framework
- Headless API docs if you want to completely replace Django's templates with a SPA.
PostgreSQL Backups with Docker
Copyright © 2022 www.advantch.com