A small guestbook web app built with Flask and SQLite. Visitors can leave a name and a message, and everyone can read the latest messages.
- Home, About, Form and Guestbook pages
- Messages saved in a SQLite database, newest first
- Input checks: empty or too-long name/message is rejected
- Safe output: HTML typed by users is shown as plain text, not run
- Clean, mobile-friendly design with automatic dark mode
- Python
- Flask
- SQLite
- HTML and CSS (Jinja2 templates)
- Clone the repository:
git clone https://github.com/zyanhub/Flask.ap.git cd Flask.ap - Install the requirements:
pip install -r requirements.txt - Start the app:
python app.py - Open http://127.0.0.1:5000 in your browser.
The database file guestbook.db is created automatically on the first run.
Flask.ap/
├── app.py # Flask routes and validation
├── database.py # SQLite helper functions
├── requirements.txt # Python dependencies
└── templates/
├── base.html # Shared layout, menu and styles
├── index.html # Home page
├── about.html # About page
├── form.html # Message form
└── guestbook.html# List of messages
- No login, so anyone can post.
- All messages load on one page (no pagination yet).
- No way to delete messages yet.
Made by zyanhub
MIT