← Back to Projects
MkViewer - Favorite Library [Read-Only]
Initializing MkViewer...
README.md

Day 63 - ๐Ÿ“š Flask Book Library

A simple Flask + SQLAlchemy web app that lets users create and view a personal book library. This project demonstrates core backend concepts including routing, forms, database persistence, and template rendering.

README GENERATED BY AI

โœจ Features

  • ๐Ÿ“– View a list of books
  • โž• Add new books using a form
  • ๐Ÿ’พ Persistent storage with SQLite
  • ๐Ÿง  ORM-based database modeling (SQLAlchemy)
  • ๐Ÿงพ Form handling & validation with Flask-WTF

๐Ÿ› ๏ธ Tech Stack

  • Python 3
  • Flask
  • Flask-SQLAlchemy
  • Flask-WTF
  • SQLite
  • Jinja2

๐Ÿ“‚ Project Structure

. โ”œโ”€โ”€ main.py โ”œโ”€โ”€ books.db โ”œโ”€โ”€ templates/ โ”‚ โ”œโ”€โ”€ index.html โ”‚ โ””โ”€โ”€ add.html โ”œโ”€โ”€ static/ โ”‚ โ””โ”€โ”€ (optional CSS) โ””โ”€โ”€ README.md


๐Ÿš€ Getting Started

1๏ธโƒฃ Clone the repository

bash git clone https://github.com/your-username/your-repo-name.git cd your-repo-name

2๏ธโƒฃ Install dependencies

bash pip install flask flask-sqlalchemy flask-wtf

3๏ธโƒฃ Run the app

bash python main.py

You should see:

โœ… Tables created

Then open:

http://127.0.0.1:5000/


๐Ÿงช Example Output

Dune - Frank Herbert - 9.5/10 The Midnight Library - Matt Haig - 8.7/10


๐Ÿ“Œ Notes

  • The database is automatically created on startup
  • SQLite is stored locally as books.db
  • This project focuses on backend fundamentals, not styling

๐ŸŒฑ Future Improvements

  • โœ๏ธ Edit existing books
  • ๐Ÿ—‘๏ธ Delete books
  • โญ Sort by rating
  • ๐ŸŽจ Add CSS styling
  • ๐Ÿ” User authentication

๐Ÿ Final Thoughts

This project marks the first published project built on a MacBook and serves as a solid foundation for future Flask applications.

Built with curiosity, debugging pain, and a lot of learning ๐Ÿ’ช