A Book Club Platform
App Description
Bookishy is supposed to be a platform for readers, where they can add thier books, track thier progress, and add some notes in each book they add.
Also, users can view public books, which are added for the admin user page to moderate them, when ever 2 or more users have the same book. After approval, they become public books, which authenticated users can comment on, and comment on other peoples comments.
A user is able to apply full CRUD operations on anything related to them, whether it is a book, a comment or thier accout itself.
Database
The app will use a SQLAlchemy (sqlite as a starter db) database, with six tables.
Edit: I'll use google book api, so things are easier.
user
userContaining these columns:
id: Automatically generated.name: Unique string field.email: Unique valid email address (not necessairly working, but with a valid format).password: Hashed then stored.book
bookgoogle_id: to retrive book's data from google, and acting as an id since its unique.category
categoryid.name: Unique string field.comment
commentid.content.timestamp.is_deleted: to indicate the comment has been deleted..is_edited: to indicate the comment has been edited by the user.Relational Tables
user_book: many-to-many
user_book: many-to-manyid.FK:
user.id.FK:
book.google_id.status: 0,1,2 indicating to-read, reading and read.notes: user notes on this book.user_category: many-to-many
user_category: many-to-manyid.FK:
user.id.FK:
category.id.book_category: many-to-many
book_category: many-to-manyid.FK:
book.google_id.FK:
category.id.book_user_comment: many-to-many
book_user_comment: many-to-manyid.FK:
comment.id.FK:
book.google_id but the book in question should have is_public with a value of 1.FK:
user.id.FK:
book_user_comment.id, for creating nested comments, if it's null, then will be a top-tree comment.book_user_rating: many-to-many
book_user_rating: many-to-manyid.rating: a string from 1-5.FK:
book.google_id but the book in question should have is_public with a value of 1.FK:
user.id.Veiws
Here are the views for the app:
/: /user: Searching and Filtering
Done using google book api
Installling Requirements and Runnig
Install the packages found in requirements.txt, using pip (preferably in a virtual environment), and run theses commands:
pip install -r requirements.txtFirst time only to initialize the db:
python manage.py db initThen to migrate from objects to a datbase:
python manage.py db migrateThen to apply the migrations:
python manage.py db upgradeLastly to run the app use:
python manage.py run0 likes · 0 views · Aug 30, 2024
Contribute to khalid-faiz/final-bootcamp-project development by creating an account on GitHub.