https://github.com/jason-cky/fastapi-htmx-example
htmx web server written in fastapi
https://github.com/jason-cky/fastapi-htmx-example
fastapi htmx tailwindcss
Last synced: about 2 months ago
JSON representation
htmx web server written in fastapi
- Host: GitHub
- URL: https://github.com/jason-cky/fastapi-htmx-example
- Owner: Jason-CKY
- Created: 2023-10-05T14:07:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-08T06:38:27.000Z (over 2 years ago)
- Last Synced: 2025-04-21T11:08:06.143Z (about 1 year ago)
- Topics: fastapi, htmx, tailwindcss
- Language: HTML
- Homepage:
- Size: 89.8 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# FastAPI htmx server
## Dependencies
* docker (docker-desktop if you are using windows)
* docker-compose (comes with docker-desktop, but can install [here](https://docs.docker.com/compose/install/standalone/) if you are not on windows)
* [Node LTS v18](https://nodejs.org/en/download)
## Features
https://github.com/Jason-CKY/fastapi-htmx-example/assets/27609953/9519a6ea-a5e4-407d-8a29-dcdd76bc2857
* [FastAPI](https://fastapi.tiangolo.com/) web server that serves html on htmx endpoints
* [HTMX](https://htmx.org/) for interactivity, minimal js needed
* Lazy loading with HTMX
* [DaisyUI](daisyui.com/) with [theme-changing library](https://github.com/saadeghi/theme-change) for CSS styling and themes
* [SortableJS](https://github.com/SortableJS/Sortable) for drag and drop of tasks (sorting and updates)
* [Directus](https://directus.io/) for headless CMS and API routes for CRUD operations
## Quickstart (development mode)
You can either start up using `docker-compose`:
```sh
npm ci
make build-dev
# make sure directus is up on http://localhost:8055
make initialize-db
```
## Format on save
Refer to this [link](https://www.digitalocean.com/community/tutorials/how-to-format-code-with-prettier-in-visual-studio-code) on how to install and set prettier to format on save.