Online Bookstore

Online Bookstore is a web application built using React, Ant Design for styling, and React Context for state management. It simulates an e-commerce platform for buying and browsing books.

Features

  • React Router: Utilizes React Router for managing different pages and routes within the application.
  • Ant Design: Uses Ant Design for UI components and styling to create an attractive and user-friendly online bookstore.
  • React Context: Implements React Context API for state management, including the shopping cart and user authentication (optional).
  • API Integration: Integrates the Google Books API to fetch book data for the online bookstore.
  • Home Page: Displays a list of featured books with the ability to view details and add them to the cart.
  • Book Listing Page: Lists books with filters (e.g., by genre, author, or price range), supporting filtering and sorting.
  • Book Details Page: Provides detailed information about a book, including title, author, description, and purchase link.
  • Shopping Cart: Allows users to add books for purchase, view and update cart items, and proceed to checkout.
  • User Authentication (Optional): Enables user account creation, login, and cart saving for future visits.
  • Search Functionality: Includes a search bar to search for books by title, author, or keywords.
  • Error Handling: Implements error handling for failed API requests and invalid searches.
  • Loading Indicators: Displays loading indicators during API requests for a smooth user experience.

Setup and Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/online-bookstore.git
  2. Navigate to the project directory:

    cd online-bookstore
  3. Install dependencies:

    npm install
  4. Start the development server:

    npm run dev

The application should now be running locally at http://localhost:5173/.

Usage

  1. Open your web browser and navigate to http://localhost:5173/ to access the Online Bookstore.

  2. Browse and interact with the various features of the application, including searching for books, adding them to the cart, and checking out.

API Integration

The application uses the Google Books API for fetching book data. Make sure to set up the necessary API keys or credentials if required. You can find the API documentation here.

Project Structure

The project is organized as follows:

  • src/: Contains the source code for the application.
  • public/: Contains static assets.
  • package.json: Lists project dependencies and scripts.
  • ...

Acknowledgments

Contact

For any questions or feedback, please contact Abdulmujeeb Ahmad.