Code Monkey home page Code Monkey logo

clairvolex's Introduction

# Book Search API and React App

## Overview

This repository is structured as a monorepo containing both the backend API and the frontend React application.

### Project Structure

- **Backend (Book Search API)**: Located in the `backend` folder.
- **Frontend (React App)**: Located in the `ui` folder.

## Demo

A live demo of the application is available at: [https://clairvolex.onrender.com/](https://clairvolex.onrender.com/)

**Note**: The server is hosted on a free tier, which incurs a cold start time of approximately 50 seconds.

## Backend (Book Search API)

The Book Search API allows users to search for books based on various criteria such as title, author, published date range, genre, and availability. 

### Endpoints

- **/books**: Supports `GET` and `POST` requests to retrieve a list of books based on search criteria.

### Search Criteria

- **Title**: Partial or full match.
- **Author**: Partial or full match.
- **Published Date Range**: Optional.
- **Genre**: Optional.
- **Sort Order**: By title, author, or publication date.
- **Pagination**: Page number and size.
- **Availability**: Filter by in-stock books only.

### Implementation Details

- All business logic is implemented within the route files due to time constraints.
- JWT authorization is not included but can be implemented using middleware.
- Database: MySQL
- ORM: Objection.js
- Migrations and seed data: Knex.js

### Running the Backend

Navigate to the `backend` folder and run the following commands:

```sh
npm install
npm start

Frontend (React App)

The React application provides a user interface to search for books using the Book Search API.

Features

  • Search by title, author, and genre.
  • Filter by availability.
  • Pagination and sorting options.

Running the Frontend

Navigate to the ui folder and run the following commands:

npm install
npm start

Testing and Coverage

Test cases and coverage reports are available for both the frontend and backend.

View Test Coverage

Notes

  • This project does not include controllers and services due to time constraints. All business logic is written inside route files.
  • JWT authorization is not implemented but can be added using middleware.

Contact

For any questions or issues, please contact the project maintainers on Email - [email protected] or WA (+91) 9830407236


This `README.md` file provides a comprehensive overview of your project, including the structure, demo link, implementation details, and instructions for running the frontend and backend. It also highlights the testing and coverage information for both the UI and API.

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.