Skip to content

MERN stack service to display Goodreads information - uses styled-components and popper.js

Notifications You must be signed in to change notification settings

rpt12-knightrider/sm-service

Repository files navigation

Project Name

The description and metadata module for Goodreads books. Contains a lot of book info, as well as a few interactive elements (ratings, wishlist dropdown)

Related Projects

Table of Contents

  1. Usage
  2. Custom Config - essential to getting the service running
  3. Requirements
  4. API Endpoint

Usage

For setup, please follow this pattern:

  1. npm install
  2. npm run seed - runs seeding script
  3. npm run build - compiles webpack into bundle.js
  4. npm start
  5. Navigate to localhost:3004

Custom Config

A couple elements are still hardcoded into the service, given time constraints during FEC. Two things to watch out for are:

  1. Image load - currently, in image.jsx, the image files are hardcoded to reference an S3 folder.
  2. Fetch book - in index.jsx, the book info is currently hardcoded as a fetch to the AWS service that was previously running

Requirements

An nvmrc file is included if using nvm.

  • Node 10.15.3

API Endpoint

Request:

GET books/:id
Content-type: application/json

Response:

{
  _id: unique key,
  title: string,
  author: array,
  description: string,
  ratings: {
    five: number,
    four: number,
    three: number,
    two: number,
    one: number
  },
  reviews: number,
  links: {
    kindle: string,
    amazon: string,
    stores: {
      audible: string,
      barnesAndNoble: string,
      walmart: string,
      apple: string,
      google: string,
      abebooks: string,
      bookDesository: string,
      indigo: string,
      alibris: string,
      betterWorldBooks: string,
      indieBound: string
    }
    worldcat: string
  },
  type: string,
  pages: number,
  publishDate: date,
  publisher: string,
  metadata: {
    originalTitle: string,
    isbn: number,
    isbn13: number,
    asin: string,
    language: string,
    series: {
      name: string,
      url: string
    }
  }
}

Installing Dependencies

From within the root directory:

npm install -g webpack
npm install

About

MERN stack service to display Goodreads information - uses styled-components and popper.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published