An open API service indexing awesome lists of open source software.

https://github.com/anandukrishnaaa/booksapp

A simple app to add books and allow users to lend books from one user to another, made in spare time as part of a practice run.
https://github.com/anandukrishnaaa/booksapp

flask flask-sqlalchemy pipenv python python-dotenv python3 sqlalchemy

Last synced: 7 months ago
JSON representation

A simple app to add books and allow users to lend books from one user to another, made in spare time as part of a practice run.

Awesome Lists containing this project

README

          

# Simple Book Lending App with Flask & SQLAlchemy

A scrappy Flask app that lets users borrow and lend books from fellow bookworms. It’s not polished, but it gets the job done. Built to dust off some old coding skills and fueled by caffeine, quick hackery and a little bit of magic. It's like a digital bookshelf that doesn't judge you for skipping a few features - cause it doesn't have any ¯\\_(ツ)_/¯

# Screenshots

## User authentication
![Sign Up Form](docs/{8AA55993-634C-48E7-9732-DFCB7381DEA9}.png)

![Sign Up Form Filled](docs/{3C4254E1-6621-4805-A65B-42409D26049B}.png)

![Sign Up Form Submitted](docs/{7CEEBDAB-E31D-4BA3-A16D-FBC3D042A250}.png)

![Login Form](docs/{A5611839-1492-4212-899D-88B540231E3A}.png)

![Login Form Submitted](docs/{B62ED940-0461-4A62-8A36-356D766227E0}.png)

## Dashboard
![Dashboard](docs/{6C43DA1C-0629-4E66-81E7-C2CF834BDC78}.png)

## Add, edit & delete a book
![Add a book](docs/{A30E5A0B-A10D-4DD6-96E9-4DB0C22C3618}.png)

![Add a book success](docs/{E9F3BCE6-D634-4820-8503-492B01929583}.png)

![Delete a book](docs/{471D63BB-FF2A-4718-95B5-E71CAABBBA11}.png)

## Browse & search books by other users

![Browse books](docs/{4D276CD1-4B9D-4EFF-9A96-63C9ABF841E8}.png)

![Search for books](docs/{70922FC4-EA93-4CFD-8A8A-6DC9CB440493}.png)

## Request a book
![Request book](docs/{34469657-8284-4895-9CDE-77E41CC62F12}.png)

![Request book success](docs/{CBD4D053-A54A-482C-9EC5-8037188C6FA3}.png)

![Request book status](docs/{91D702C1-BB35-4FB8-8962-F7C19B15B3A6}.png)

## View & approve requests from other users
![Pending request](docs/{C5F5FE89-E7D2-458D-8F28-ADA1CD2C7F89}.png)

![Approve request](docs/{10B3A1DC-C1B1-44E3-8267-A5AB072D8471}.png)

## View & return borrowed books

![View and return borrowed books](docs/{2F57917F-7D63-49F4-A541-5A8EF7B0E275}.png)

# Setup & run

Clone the repo to a folder, open the folder in terminal or command prompt and then copy-paste the following one by one; just like the good old stackoverflow days before ChatGPT blew up.

1. `python -m venv .venv`
2. `venv\Scripts\activate` (for Windows)
or
`source .venv/bin/activate` (for Linux)
3. `cd app`
4. Rename `env.example` to `.env` and change the default values for `SECRET_KEY` & `SQLALCHEMY_DATABASE`
5. `python app.py`

# References

- [Securing Your Flask Application: Hashing Passwords Tutorial](https://dev.to/goke/securing-your-flask-application-hashing-passwords-tutorial-2f0p)

- [How to Use Flask-SQLAlchemy to Interact with Databases in a Flask Application](https://www.digitalocean.com/community/tutorials/how-to-use-flask-sqlalchemy-to-interact-with-databases-in-a-flask-application)

# Dependencies

- [Flask](https://flask.palletsprojects.com/en/stable/)

- [python-dotenv](https://pypi.org/project/python-dotenv/)

- [Flask-WTF](https://flask-wtf.readthedocs.io/en/1.2.x/)

- [Flask-SQLAlchemy](https://flask-sqlalchemy.readthedocs.io/en/stable/)