A simple, real-time guestbook application built entirely in Python and deployed with Replit.
This app is only ~150 lines of Python (in one file) and makes use of:
- FastHTML: A Python framework for building HTML applications
- HTMX: For seamless AJAX requests and updates
- Replit: Online IDE and hosting platform
- Replit Database: Key-value store for message persistence
Say hi: https://guestbook.mattpalmer.io or follow along for more!
- Fork the Replit project
- Click the "Run" button at the top of the Replit interface
- The application will start, and you can access it via the provided URL
That's it!
- Update the
MAX_NAME_CHAR
andMAX_MESSAGE_CHAR
constants inmain.py
if you want to change input limits - Modify the
TIMESTAMP_FMT
constant to change the timestamp format - Adjust the styling in
style.css
to customize the appearance - The Replit database is used for storing messages (
from replit import db
).- You can easily swap this with Postgres / SQLite if you'd prefer an alternative.