Giter VIP home page Giter VIP logo

bookstore's Introduction

logo

BOOKSTORE

πŸ“— Table of Contents

πŸ“– BOOKSTORE

Bookstore is a single page web app that lets users manage a book list. Users can add, edit, and remove books (title and author) from the list. It was coded using React.

πŸ›  Built With

Tech Stack

Client

Key Features

Describe between 1-3 key features of the application.

  • Display a list of books
  • Add a book (title and author) to the book list
  • Remove a selected book fron the list

(back to top)

πŸš€ Live Demo

Click in the following link to see a working live version of this project:

(back to top)

πŸ’» Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

In order to run this project you need to have installed:

  • You’ll need to have Node >= 14.0.0 and npm >= 5.6 on your machine.

Optionally, in order to modify this project you should to have installed:

Setup

To clone this repository to your desired folder:

  • You can download the Zip file from the GitHub repository, or clone the repository with:
git clone https://github.com/elafildecolor/Bookstore.git
  • Access the cloned directory with:
cd Bookstore
  • Open it with your favorite code editor or with the live server

Install

To install run:

npm install

Usage

To run the project, execute the following command in the project directory:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.
You may also see any lint errors in the console.

Run tests

To run tests, run the following command:

  npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

Build

To build the project, run the following command:

  npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

Deployment

You car read more about deployment in the following link:

Deploy a React application

(back to top)

πŸ‘₯ Authors

Mention all of the collaborators of this project.

πŸ‘€ Paul SΓ‘enz Sucre

(back to top)

πŸ”­ Future Features

Will implement these features in the future:

  • Filtering books by category

(back to top)

🀝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)

⭐️ Show your support

Give a ⭐️ if you like this project!

(back to top)

πŸ™ Acknowledgments

  • Hat tip to anyone whose code was used.
  • Thanks for all the curated content that was provided to us.
  • Thanks to my learning and coding partners for all their support.

(back to top)

πŸ“ License

This project is MIT licensed.

(back to top)

bookstore's People

Contributors

paulsaenzsucre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

bookstore's Issues

Create Booklist component

Create a component called Booklist that composes Book components for displaying the list of books: should display the list of books (empty at this point but it should be ready for the data) with the Remove button (no functionality yet).

image

Book Component

Create a component called Book that composes a CircleProgress component for displaying a single book (receive category, title, author, chapters, currentChapter,).

image

Connect Bookstore App to Redux store

Connect the Bookstore app to the Redux store:

  • Import Redux Provider and your store in the main component of your React app.
  • Connect Bookstore app to the Redux store.
  • The default state in books reducer is an array with a few books.
  • Display them in the React components. Make sure that the list of books displays books from Redux store.

Style the Progress Stats UI

Style the progress stats user interface:

  • Style the progress stats container.
  • Style the progress separator.
  • Arrange elements inside container.

image

Style the Categories Page UI

Style the categories page UI:

  • Style the categories page container.
  • Style the check status button.
  • Style the under construction text.

image

Style the Book Card UI

Style the book card user interface:

  • Style the book card container.
  • Arrange the internal components.

image

Add Remove Book Feature

In the Booklist component, add a functionality for "Remove" button click:

  • Import Redux useDispatch.
  • Once your book object is ready to be removed from Redux store, dispatch the corresponding action.
  • Keep state immutable in the reducer.

Style the Action Bar UI

Style the action bar user interface:

  • Style the action buttons.
  • Style the button separators.
  • Style the container.

image

AddBookForm Component

Create a separate component for this form (with inputs for a title and an author [IMPORTANT in the design you can see an input for a category - please replace it with an author.]).

Image

Style the Book List UI

Style the book list user interface:

  • Style the book list container.
  • Arrange components inside the container.

image

Create Header component

Create a component called Header that composes the Navbar component for displaying the page's header.

image

Create BooksPage component

Create a component called BooksPage that composes the BookList and AddBookForm components for displaying the Books page.

image

Style the Progress Chapter UI

Style the progress chapter user interface:

  • Style the current chapter title.
  • Style the current chapter details.
  • Style the update progress button.

image

Add Check Status Feature

In your CategoriesPage component, add a functionality for: "Check status" button click:

  • Import Redux useDispatch.
  • Dispatch the corresponding action.
  • Keep state immutable in the reducer.

Style the Page Header UI

Style the page header user interface:

  • Style the header container.
  • Style the Bookstore text logo.
  • Style the Navbar
  • Style the user icon.

image

Configure the Redux Store

Configure the Redux Store (/src/redux/configureStore.js):

  • Importing the necessary methods from Redux Toolkit.
  • Combine both reducers into a root reducer by using configureStore function.

Write book's actions and reducer

Write your book's actions and reducer (in /src/redux/books/books.js) using the ducks pattern.

  • Define action types for adding and removing a book.
  • Set the initial state to be an empty array of books.
  • Export Action Creators for your actions.
  • Write your reducer and export it as default:
    • Define state changes for the actions that you created.
    • In case of unknown action - return the current state.

Refactor the App component

Add React Router and set two <Route>s and <Link>s for the app's navigation:

  • Books - the default view
  • Categories

Setup Redux-thunk on Bookstore

Instruct Redux to use thunk:

  • Add redux-thunk as a dependency.
  • import redux-thunk and insert its middleware into Redux.

Style the Book Page UI

Style the book page user interface:

  • Style the book page container.
  • Style the separator.
  • Arrange the components inside.

image

Add New Book Feature

In the AddBookForm component, add functionality for "Add new" button click:

  • Import Redux useDispatch.
  • Set title and author in the local React state (NOTE: categories and comments are NOT part of this step).
  • Take the inputs from the state then generate a unique id and add them to an object.
  • Once your new book object is ready to be submitted to Redux store, dispatch the corresponding action.
  • Keep state immutable in the reducer.

Refactor Add Book and Remove Book features

Refactor add book and remove book features to persist changes in the server:

  • Change existing Action Creators, so they return functions.
  • Make changes by using API.
  • Dispatch an action (action type that existed before refactor) that will update the state accordingly.

NOTE: Use fetch or axios with createAsyncThunk for making API calls.

Style the Add New Book Form UI

Style the add new book form user interface:

  • Style the form title.
  • Style the form inputs.
  • Style the form button.
  • Style the form.
  • Style the container.
  • Arrange elements inside container.

image

Write categories actions and reducer.

Write your categories actions and reducer (in /src/redux/categories/categories.js) using the ducks pattern:

  • Define an action type for checking the status.
  • Set the initial state to be an empty array of categories.
  • Export Action Creators for your actions.
  • Write your reducer and export it as default.
    • For the check status action return a string "Under construction".
    • In case of unknown action - return the current state.

Style the App UI

Style the App user interface:

  • Style the app container.
  • Arrange the inside components.

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.