Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Finished my project #90

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
5a4b5d0
Rendered books on the currently reading shelf
AdoraNwodo Dec 2, 2018
2d866d3
Update README.md
AdoraNwodo Dec 2, 2018
a389358
Fixed mistake in render books on the currently reading shelf. Added f…
AdoraNwodo Dec 2, 2018
164f93d
Merge branch 'master' of https://github.com/AdoraNwodo/reactnd-projec…
AdoraNwodo Dec 2, 2018
67d334c
Coded the search component and used the api for returning results bas…
AdoraNwodo Dec 3, 2018
bd69bd9
Handled invalid queries & books without thumbnails / authors
AdoraNwodo Dec 4, 2018
3a8d4da
Fixed handled invalid queries - Added JSX and CSS to show 'No Results'
AdoraNwodo Dec 4, 2018
c64dc3d
Fixed search filter. made it work properly and show the right results
AdoraNwodo Dec 4, 2018
db443b8
Turned book li into a component since its used in three places on the…
AdoraNwodo Dec 4, 2018
644cb52
Addedimage screenshots for README
AdoraNwodo Dec 5, 2018
c489174
Create LICENSE
AdoraNwodo Dec 5, 2018
fd6966b
Update README.md
AdoraNwodo Dec 5, 2018
25bbc08
Update README.md
AdoraNwodo Dec 5, 2018
faed1d6
Made adjustments according to Udacity reviewers feedback
AdoraNwodo Dec 9, 2018
8457564
Merge branch 'master' of https://github.com/AdoraNwodo/reactnd-projec…
AdoraNwodo Dec 9, 2018
7dc492e
Made adjustments according to Udacity reviewers feedback
AdoraNwodo Dec 9, 2018
90e44ce
Made adjustments according to Udacity reviewers feedback
AdoraNwodo Dec 9, 2018
2ac5427
Made adjustments according to Udacity reviewers feedback
AdoraNwodo Dec 9, 2018
4079061
Made adjustments according to Udacity reviewers feedback
AdoraNwodo Dec 9, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions CONTRIBUTING.md

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Nenne 'Adora' Nwodo

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
141 changes: 51 additions & 90 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,92 +1,53 @@
# MyReads Project

This is the starter template for the final assessment project for Udacity's React Fundamentals course. The goal of this template is to save you time by providing a static example of the CSS and HTML markup that may be used, but without any of the React code that is needed to complete the project. If you choose to start with this template, your job will be to add interactivity to the app by refactoring the static code in this template.

Of course, you are free to start this project from scratch if you wish! Just be sure to use [Create React App](https://github.com/facebookincubator/create-react-app) to bootstrap the project.

## TL;DR

To get started developing right away:

* install all project dependencies with `npm install`
* start the development server with `npm start`

## What You're Getting
```bash
├── CONTRIBUTING.md
├── 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. It's unlikely that you'll need to modify this.
├── public
│   ├── favicon.ico # React Icon, You may change if you wish.
│   └── index.html # DO NOT MODIFY
└── src
├── App.css # Styles for your app. Feel free to customize this as you desire.
├── App.js # This is the root of your app. Contains static HTML right now.
├── App.test.js # Used for testing. Provided with Create React App. Testing is encouraged, but not required.
├── BooksAPI.js # A JavaScript API for the provided Udacity backend. Instructions for the methods are below.
├── icons # Helpful images for your app. Use at your discretion.
│   ├── add.svg
│   ├── arrow-back.svg
│   └── arrow-drop-down.svg
├── index.css # Global styles. You probably won't need to change anything here.
└── index.js # You should not need to modify this file. It is used for DOM rendering only.
```

Remember that good React design practice is to create new JS files for each component and use import/require statements to include them where they are needed.

## Backend Server

To simplify your development process, we've provided a backend server for you to develop against. The provided file [`BooksAPI.js`](src/BooksAPI.js) contains the methods you will need to perform necessary operations on the backend:

* [`getAll`](#getall)
* [`update`](#update)
* [`search`](#search)

### `getAll`

Method Signature:

```js
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:

```js
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:

```js
search(query)
```

* query: `<String>`
* Returns a Promise which resolves to a JSON object containing a collection of a maximum of 20 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](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.

## Create React App

This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app). You can find more information on how to perform common tasks [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md).

## Contributing

This repository is the starter code for _all_ Udacity students. Therefore, we most likely will not accept pull requests.

For details, check out [CONTRIBUTING.md](CONTRIBUTING.md).
MyReads is an app built with Reactjs to track a users books. A book on the shelf can be in any of these 3 categories:

1. Want to Read
2. Currently Reading
3. Read

The application consists of two pages.
1. **Home Page** : The Home Page consists of all the books currently in your shelf. Here you can move books between the 3 categories mentioned above or completely take them off your shelf.

<img src="https://github.com/AdoraNwodo/reactnd-project-myreads-starter/blob/master/home1.png" height="250"/> <img src="https://github.com/AdoraNwodo/reactnd-project-myreads-starter/blob/master/home2.png" height="250"/>

2. **Search Page** : The Search Page consists of a search input where users can type in a search query and books that match the query will be returned. If there are no matching books, an appropriate error message is shown. Users can add search results to their homepage and if the search result is already on the shelf, users can move between shelves or completely take the book off the shelf.

<img src="https://github.com/AdoraNwodo/reactnd-project-myreads-starter/blob/master/search1.png" height="250"/> <img src="https://github.com/AdoraNwodo/reactnd-project-myreads-starter/blob/master/search2.png" height="250"/>




# Installation

Step 1: Clone this project
```git clone https://github.com/AdoraNwodo/reactnd-project-myreads-starter.git```

Step 2: Install all project dependencies (via npm)
```npm install```

Step 3: Start the development server
```npm start```

**N.B: Internet access is important for the search page to work as the API is not hosted locally**




# Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.




# Credits

Udacity React Nanodegree ❤️❤️




# License

MIT. Please see the [license file](LICENSE) for more information.
Binary file added home1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added home2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
87 changes: 87 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"prop-types": "^15.6.2",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"react-router-dom": "^4.3.1",
"react-scripts": "2.1.1"
},
"scripts": {
Expand Down
Binary file added search1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added search2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 24 additions & 5 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
@import url('https://fonts.googleapis.com/css?family=Raleway|Work+Sans:700');

html, body, .root {
height: 100%;
}

body {
line-height: 1.5;
font-family: 'Raleway', sans-serif !important;
}

body, .app {
Expand All @@ -14,14 +17,18 @@ body, .app {

.list-books-title {
padding: 10px 0;
background: #2e7c31;
background: #c6edf7;
text-align: center;
}

.list-books-title h1 {
font-weight: 400;
font-family: 'Work Sans', sans-serif;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 3px;
margin: 0;
color: white;
color: black;
}

.list-books-content {
Expand All @@ -41,6 +48,9 @@ body, .app {

.bookshelf-title {
border-bottom: 1px solid #dedede;
text-align: center;
font-size: 20px;

}

.bookshelf-books {
Expand All @@ -53,12 +63,12 @@ body, .app {
bottom: 25px;
}

.open-search button {
.open-search a {
display: block;
width: 50px;
height: 50px;
border-radius: 50%;
background: #2e7d32;
background: #c6edf7;
background-image: url('./icons/add.svg');
background-repeat: no-repeat;
background-position: center;
Expand Down Expand Up @@ -106,6 +116,7 @@ body, .app {
height: 53px;
background-image: url('./icons/arrow-back.svg');
background-position: center;
background-color: white;
background-repeat: no-repeat;
background-size: 28px;
font-size: 0;
Expand Down Expand Up @@ -169,7 +180,7 @@ button:active {
width: 40px;
height: 40px;
border-radius: 50%;
background: #60ac5d;
background: #000000;
background-image: url('./icons/arrow-drop-down.svg');
background-repeat: no-repeat;
background-position: center;
Expand All @@ -196,3 +207,11 @@ button:active {
text-align: center;
font-size: 0.8em;
}

/* Handle empty search results */
.no-results-div p{
text-align: center;
padding-top: 25vh;
font-size: 30px;
color: #999;
}
Loading