Git Product home page Git Product logo

bookspace-django-backend's Introduction

BookSpace

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

Screenshots

App Screenshot

App Screenshot

App Screenshot

App Screenshot

Distinctiveness and Complexity

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

Server

the project has 2 apps on the backend and they are:

  • users
  • books

Users

Users API

Login users and genrate Tokens

  POST /users/login

Register new users

  POST /users/register

Logout and Destroy the token

  POST /users/logout

Users Models.py

the project used Django built-in model to handle users

Books

Books API

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

Books Models.py

The books app used two models:

  • BooksAdded
  • Comments

BooksAdded

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

Comments

Keep track of each book comments, Though the project dose not save the nested comments, the neseted comments were made in the frontend

Books Views.py

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

Client

The frontend used React framework and handled the state management of the app using Redux and Redux toolkit

Frontend Style

The style was made with React-Bootstrap and MUI

Folders of the client

  • 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

Features

  • Add/Delete/update your Books into diffrent categories
  • Add review to books and share your thought with diffrent users
  • Reply to other users comment

Run locally

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

contributors

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

Demo

https://django-api-bookspace.herokuapp.com/

Inspired by

This is project was inspired by :

bookspace-django-backend's People

Contributors

pablo-maff avatar zayd-r avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.