This is an mock-up audible item page built during the Hack Reactor immersive's Front End Capstone project. This project is designed to maintain all original functionality and mimic the style of audible item page. This component of the project - Publisher's Summary Service - displayes the publisher's summary and copyright information for a given book.
- https://github.com/huang-pei-mei/title-service
- https://github.com/huang-pei-mei/reviews-service
- https://github.com/huang-pei-mei/price-service
- https://github.com/huang-pei-mei/FEC-Agg.Review
Designed and built the Publisher's Review Service. Coordinated and deployed entire team’s modules on proxy server in AWS EC2 instance. Utilized agile workflow practices on a 4 -person remote team.
An nvmrc
file is included if using nvm
Node 6.13.0.
The database folder includes two helper functions which generates random data and populates the generated data into the database. The first helper function which generates random data and save the generated data into the database is located in database/populateData.js file. The mongo db setup file which specifies the database schema is located in database/index.js file
The App componet which includes RenderDom is located in client/src/index.js file. Using the following url /api/summary/${bookId}
the app component fetches publisher's summary and copyright information for a given book from the server to be rendered.
The server with two endpoints are located in server/index.js. The first endpoint is /api/summary/:bookId
This takes a random book id and returns an object with the following data {id: Number, summary: String, short_summary: String, copyright: String}.
The second endpont/api/summaries/:bookIds
will accept array of book ids and returns an array of objects with the following data for each of the book ids {id: Number, summary: String, short_summary: String, copyright: String}
Additional endpoints for further editing services are provided below: /api/summary/:bookId -- retrieves the record associated with the given book ID. /api/summary/new -- creates a new record (body of the request should include a complete record. The ID number must be included, and this should not match a pre-existing record) /api/summary/update/:bookId -- updates the record associated with the given book ID /api/summary/delete/:bookId -- deletes the record associated with the given book ID
Clone the repository from github into your local machine to make edits. Code is available to view on github at https://github.com/huang-pei-mei/FEC-Publishers-Summary. Once you clone the repository, from within the root directory:
npm install This will install the main react front end and server side dependencies.
Make sure to install Mongo DB and then from the root directory:
npm run database/populateData Seed the database
npm run react-dev Builds the app for production to the public folder. It correctly bundles React in production mode and optimizes the build for the best performance.
Make sure nodemon is installed on your system and then from the root directory:
npm run start Runs the app in the development mode. Open http://localhost:1220 to view it in the browser.
JavaScript React Node/Express Mongo Db Webpack Babel Jest Enzyme SuperTest AWS (EC2, S3)
The MIT License (MIT) http://www.opensource.org/licenses/mit-license.php