Search For and Save Your Favorite Books With the Google Book Search.
The Google Book Search app enables the user to search for books based on any topic, title, author or combination thereof, using Google Books API Search
. Users can search, save, recall and delete their favorite books either as their own notes or as a specific book found by the Google Books API search.
This program was developed by Steven Bowler for the purpose of gaining experience developing a full-stack app employing best-practices for executing the Model-View-Control (MVC) software development pattern. Additionally, the project provides this programmer the opportunity develop skills in creating and deploying a functional full-stack app on Heroku, integrating SocketIO,ExpressJS,Mongoose and Axios, @hapi/joi, bcryptjs, body-parser, concurrently, cors, dotenv, express, jsonwebtoken. Enjoy
.
Program uses Socket.io to message each of the sessions the total number of users currently on-line as either Guest or logged-in as Member and show the number of users on-line on the Navbar. The number of users shown is updated with each user action, so if a user drops their session, the Navbar will update once each user of the other sessions performs an update in the form of Search, show Saved, Save, Login or Logout.
See program documentation in JSDOC format.
Link to the repository here.
Requires dotenv to be installed and a .env
file must be stored in the root directory for the app. The .env
file must contain the app owner's MongoDB URL with embedded username and password. To use the same user database in development, testing and production then, it is critically important that the TOKEN_SECRET shown below be exactly the same string.
MONGODB_URI=your_mongodb_url_with_embedded_username_password
TOKEN_SECRET = any_random_string_but_always_use_same_string
To deploy to Heroku then following git push heroku master
command, and before accessing the app page, will be necesary to set the two environmental variables with these commands from the Heroku CLI:
heroku config:set --app=mernshell MONGODB_URI=your_mongodb_url_with_embedded_username_password
heroku config:set --app=mernshell TOKEN_SECRET=any_random_string_but_always_use_same_string
Directory structure is as follows:
.
│
├── client
│ └── public
│ └── src
│ ├── components
│ │ └── various
│ └── pages
│ │ └── Book.js
│ │ └── Search.js
│ │ └── Save.js
│ │ └── GoogleDetail.js
│ │ └── Detail.js
│ └── utils
│ └── API.js
│
├── controller
│ └── booksController.js
│ └── userController.js
│
├── docs
│
├── jsdoc.json
│
├── models
│ └── index.js
│ └── Book.js
│ └── Note.js
│
├── node_modules
│
├── package.json
│
├── privateRoutesAuth.js
│
├── routes
│ └── api
│ └── index.js
│ └── books.js
│ └── users.js
│
├── server.js
│
├── validation.js
│
Connect Repo with Heroku Video
Program is deployed to Heroku. Program uses concurrently, so locally runs server on port 5000 and react app on port 3000.
This project was bootstrapped with Create React App.