Coder Social home page Coder Social logo

mylibrary's Introduction

MyLibrary is a modern and user-friendly library management web application built with React.js, Vite, Tailwind CSS, and powered by the Google API for fetching book data. It also incorporates Auth0 for secure authentication and session management, Font Awesome icons for styling, Axios for API calls, React Infinite Scroll for lazy loading, Toastify for notification messages, and react-autocomplete for search suggestions.

Tech Stack ๐Ÿ› ๏ธ

  • Vite - Fast React.js build tool.
  • React.js - JavaScript library for building user interfaces.
  • Tailwind CSS - A utility-first CSS framework for fast and customizable styling.
  • Google Books API - Used as the endpoint for book data.
  • Auth0 - Authentication and session management.
  • Font Awesome - Icon library for styling.
  • Axios - Promise-based HTTP client for API calls.
  • React Infinite Scroll - Infinite scrolling component for efficient pagination.
  • Toastify - React notification library for user feedback.
  • react-autocomplete - React component for search suggestions.
  • Vercel - Deployment platform for hosting web applications.

Features โœ…

  • An aesthetically pleasing and optimized loading animation.
  • New user signup and login, using Proper authentication and sessions (Sign in with social media, Email and mobile number verification gets extra brownie points).
  • Users can see the list of books, preferably using an actual endpoint (API) as a data source for books.
  • Instead of loading all the results on the page, perform an optimized pagination (infinite scrolling with lazy loading).
  • A well-built search bar, with suggestions (like Google Search, YouTube) that suggests and searches based on all the fields like Book name, Author name, Genre, Year of publishing, etc.
  • An exclusive way of indicating the availability of the books, and the number of available copies, along with the previously mentioned fields.
  • Users can filter and sort the list of books based on Title, Author, Subject, and Publish - date.
  • Show the count of books upon every search results and upon every filtering.
  • Implement a cart feature, upon adding books to the cart, the user will be able to check out and rent them. This should reflect in the availability and number of copies fields.

Configuration - Setting Up API Keys ๐Ÿ› ๏ธ

To use certain features of the MyLibrary project, you'll need to configure the following API keys:

  1. ๐Ÿ“š Google Books API Key: This key is required to fetch book information from Google Books API.

  2. ๐Ÿ” Auth0 Domain and Client ID: These are required for authentication and user management.

Follow these steps to set up the API keys:

1. Google Books API Key

To obtain a Google Books API Key:

  1. ๐ŸŒ Visit the Google Cloud Console.
  2. ๐Ÿ—๏ธ Create a new project if you haven't already.
  3. ๐Ÿ› ๏ธ Navigate to the "APIs & Services" > "Credentials" section.
  4. โž• Click on "Create Credentials" and select "API Key."
  5. ๐Ÿ“‹ Copy the generated API key.

2. Auth0 Domain and Client ID

To obtain Auth0 credentials:

  1. ๐ŸŒ Visit Auth0 and sign in or create an account.
  2. ๐Ÿ—๏ธ Create a new application or use an existing one.
  3. โš™๏ธ Navigate to the "Settings" of your Auth0 application.
  4. ๐Ÿ“‹ Find and copy the "Domain" and "Client ID."

3. Create a .env File

Once you have obtained the necessary API keys, create a .env file in the project root directory (if it doesn't already exist) and add the following environment variables with your API keys:

VITE_REACT_APP_GOOGLEBOOK_API_KEY=YOUR_GOOGLEBOOK_API_KEY
VITE_REACT_APP_AUTH0_DOMAIN=YOUR_AUTH0_DOMAIN
VITE_REACT_APP_AUTH0_CLIENT_ID=YOUR_AUTH0_CLIENT_ID

Replace YOUR_GOOGLEBOOK_API_KEY, YOUR_AUTH0_DOMAIN, and YOUR_AUTH0_CLIENT_ID with the respective values you obtained from Google and Auth0.

Make sure to keep your .env file secure and do not share your API keys publicly.

Now, you have successfully configured the required API keys for the MyLibrary project. You can start using these keys in your code to access Google Books API and authenticate with Auth0.


Project Dockerization ๐Ÿ“ฆ

To run RepoSavant in a Docker container, follow these steps:

  1. Clone this repository.
  2. Build the Docker image:
docker build --pull --rm -f "Dockerfile" -t mylibrary:latest
  1. Run the Docker container:
docker run --rm -d  -p 8080:8080/tcp mylibrary:latest

mylibrary's People

Contributors

dejan-teofilovic avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.