This project is a challenge to create a complete website using a unique stack combination:
- HTMX for frontend interactions
- Jinja Templates for HTML rendering
- FastAPI as the backend framework
- SASS for styling
- PostgreSQL as the database
- SQLAlchemy for ORM
- Websockets for real-time group chat functionality
-
Authentication Pages
- Login and Register pages built with HTMX and Jinja templates.
-
Group Chat
- A real-time chat page using Websockets, with HTMX handling dynamic content updates.
-
Clone the repository:
git clone https://github.com/Tony-ArtZ/htmx-fastapi cd htmx-fastapi
-
Install the required dependencies:
pip install -r requirements.txt
-
Set the database URL:
Openmodels.py
and update theDATABASE_URL
with your PostgreSQL connection string. -
Run the application:
uvicorn main:app --reload
-
Access the application at:
http://127.0.0.1:8000
python-htmx
├── auth_router.py
├── db.py
├── dependency.py
├── main.py
├── models.py
├── readme.md
├── requirements.txt
├── schema.py
└── static
├── images
│ ├── bg.jpg
│ ├── logo.png
│ └── welcome.png
├── index.html
├── stylesheets
│ ├── style.css
│ ├── style.css.map
│ └── style.scss
└── templates
├── about.html
├── auth.html
├── errors.html
├── home.html
├── login.html
├── message.html
└── register.html
Enjoy exploring this unconventional tech stack for a fun, fully functional website!