Skip to content

richardrigby/reactnd-project-myreads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyReads Project

BCH compliance

This is the final assessment project for Udacity's React Fundamentals course.

It is a bookshelf app that allows the user to select and categorize books they have read, are currently reading, or want to read. The project emphasizes using React to build the application and utilises an API server and client library provided by Udacity to persist information as the user interacts with the application.

TL;DR

To get started developing right away:

  • install all project dependencies with npm install
  • start the development server with npm start

Code structure

├── README.md - This file.
├── SEARCH_TERMS.md # The whitelisted short collection of available search terms for you to use with your app.
├── package.json # npm package manager file.
├── public
│   ├── favicon.ico # React Icon
│   └── index.html # DO NOT MODIFY
└── src
    ├── components
    │   ├── Book.js # A Book component which displays a thumbnail cover image, book title as well as the books authors.
    │   ├── BookShelf.js # A book shelf component, displays a collections of books.
    │   ├── OpenSearchButton.js # A button component for opening the search page.
    │   ├── SearchBooksBar.js # A search bar components; allows the user to type in search terms and view resulting matches.
    ├── App.css # Styles for the app.
    ├── App.js # This is the root of the app.
    ├── App.test.js # Used for testing. Provided with Create React App.
    ├── BooksAPI.js # A JavaScript API for the provided Udacity backend. Instructions for the methods are below.
    ├── icons # Helpful images for the app.
    │   ├── add.svg
    │   ├── arrow-back.svg
    │   └── arrow-drop-down.svg
    ├── index.css # Global styles.
    └── index.js

Backend Server

To simplify development process, a backend server is provided for you to develop against. The provided file BooksAPI.js contains the methods you will need to perform necessary operations on the backend:

getAll

Method Signature:

getAll()
  • Returns a Promise which resolves to a JSON object containing a collection of book objects.
  • This collection represents the books currently in the bookshelves in your app.

update

Method Signature:

update(book, shelf)
  • book: <Object> containing at minimum an id attribute
  • shelf: <String> contains one of ["wantToRead", "currentlyReading", "read"]
  • Returns a Promise which resolves to a JSON object containing the response data of the POST request

search

Method Signature:

search(query, maxResults)
  • query: <String>
  • maxResults: <Integer> Due to the nature of the backend server, search results are capped at 20, even if this is set higher.
  • Returns a Promise which resolves to a JSON object containing a collection of book objects.
  • These books do not know which shelf they are on. They are raw results only. You'll need to make sure that books have the correct state while on the search page.

Important

The backend API uses a fixed set of cached search results and is limited to a particular set of search terms, which can be found in SEARCH_TERMS.md. That list of terms are the only terms that will work with the backend, so don't be surprised if your searches for Basket Weaving or Bubble Wrap don't come back with any results.

About

MyReads Project for Udacity React Nano Degree

Resources

Stars

Watchers

Forks

Packages

No packages published