Web app uses Google-books API allow users to search their books and categorize their Books and keep tracks of their readings , By putting books into 3 diffrent categories which are :
- Read
- Want to Read
- Currently reading
In an attempt to distinguish this project from the previous course PSETS, I had to take another Course to learn React. the course is FullStackOpen Which took a couple of weeks , then I had to study RESTFUL API so I used books to learn Django-Rest-Framework
and at the end the Tech Stack is :
Client: React, Redux, ReduxToolKit
Server: Django, Django-rest-framework
the project has 2 apps on the backend and they are:
- users
- books
POST /users/login
POST /users/register
POST /users/logout
the project used Django built-in model to handle users
List all the books in the DB
GET /books-api/books
Add a new book to the DB
POST /books-api/books
List info about one book
GET /books-api/books/{book_id}
Delete one book
DELETE /books-api/books/{book_id}
CRUD of Comments for each Book
/v1-comments/{book_id}
Parameter | Type | Description |
---|---|---|
book_id |
string |
Required. Id of book to fetch |
The books app used two models:
- BooksAdded
- Comments
Keep track of each Book and the user who added it , and prevent the user from adding the book twice , this model save some data that was sent from Google-books-API
Keep track of each book comments, Though the project dose not save the nested comments, the neseted comments were made in the frontend
The project used Class based views and functions based views, the function based views gave more flexibility and was needed for hanlding errors in the nested models
The frontend used React framework and handled the state management of the app using Redux and Redux toolkit
The style was made with React-Bootstrap and MUI
- Componets : Which has 17 files that are used to render the data
- hooks
- Reducers: That handle the dispatching calls to the server and fetching the data
- Services: Folder that contain all the API that are used in this project
- Add/Delete/update your Books into diffrent categories
- Add review to books and share your thought with diffrent users
- Reply to other users comment
Clone the project
git clone https://github.com/Zayd123mouses/bookspace-django-backend.git
Go to the project directory
cd bookspace-django-backend
Install requirements
pip3 install -r requirements.txt
Install dependencies
cd src
npm install
Start the server
cd ..
python3 manage.py runserver
This project was made by a 2 developers, Zayd and Pablo
Because Pablo Have no experience in Python and django The contribution was as follows:
- Zayd would make the backend
- Zayd and Pablo would do the frontend functions and state management
- Pablo would take care of styling the project
https://django-api-bookspace.herokuapp.com/
This is project was inspired by :