Skip to content

Instantly share code, notes, and snippets.

@Saidbek
Last active October 1, 2022 02:31
Show Gist options
  • Save Saidbek/772cca7476de3fdd063193d2079bb9f5 to your computer and use it in GitHub Desktop.
Save Saidbek/772cca7476de3fdd063193d2079bb9f5 to your computer and use it in GitHub Desktop.
Author/Book Management System

React project: https://codesandbox.io/s/react-crud-libyzz

  1. Add login form
  1. Add ability to view books. Click name -> /users/1/books
  1. Add ability to create/update/delete books.

Form validations:

- title: required
- genre: optional
- description: required
- isbn: required (must be 8 chars length or less)
- edition: required

API: - Show book: GET https://mockapi.io/projects/632e1123b37236d2ebe5af2d/1/books/1

- Create book

  POST https://mockapi.io/projects/632e1123b37236d2ebe5af2d/users/1/books
      ```
      {
        "title": "Elegant Concrete Mouse",
        "author": "Dale Sauer",
        "genre": "ut",
        "description": "The Football Is Good For Training And Recreational Purposes",
        "cover": "http://loremflickr.com/640/480/cats",
        "isbn": "ratione-autem-non",
        "edition": 44,
      }
      ```
      
Update book

  PUT https://mockapi.io/projects/632e1123b37236d2ebe5af2d/users/1/books/1
  
      ```
      {
        "title": "Elegant Concrete Mouse",
        "author": "Dale Sauer",
        "genre": "ut",
        "description": "The Football Is Good For Training And Recreational Purposes",
        "cover": "http://loremflickr.com/640/480/cats",
        "isbn": "ratione-autem-non",
        "edition": 44,
      }
      ```

Delete book
  - GET https://mockapi.io/projects/632e1123b37236d2ebe5af2d/users/1/books/1
  1. Add ability to leave a review for each book. Text Rating 1-5

  2. Add ability to filter books by:

  • title
  • isbn
  • genre
  1. Add pagination to users and books. 10 users/books per page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment