A web application that allows a user to search for books. A user can save the book details to their profile, or remove them by a click of a button. This application is created using a MERN stack, which means I use a MongoDB database, Express.js to communicate with the browser, React to create the front-end, and Node to create the backend. The search data comes from a Google REST API, but the gathered data uses GraphQL API endpoints to communicate with the MongoDB database. User-authorization is handled by JSON Web Tokens and saved to the browser through local storage.
This app makes use of a few node modules to make the development easier, including: Express, Mongoose, Apollo-Server-Express, Bcrypt, jsonwebtoken and graphql. This app makes use of:
- Node.js and Express.js to create a single RESTful API for google books api
- Apollo-Server-Express and GraphQL to make GraphQL API endpoints
- Queries and Mutations to interact with the database from front-end
- typeDefs and Resolvers to recieve data from front-end on the back-end and communicate with the database
- MongoDB (noSQL) and Mongoose OMT for the database
- JWT for authorization of logged in users
- Bcrypt for encrypting password information
To install Node.js, follow the documentation Node.js
To install MongoDB, follow the documentation MongoDB
To install necessary dependencies, run the following command:
npm run install
Access the webpage by going to the deployed site: Book-Search-Engine. Test account: email: test@test.com password: !t3stmyPw0rd
If you want to run this on a local server, set the path to the Book-Search-Engine folder in the terminal. Run the entire app by typing npm run develop
. Go to http://localhost:3000 to accesss the app and http://localhost:3001/graphql to acess the GraphQL endpoint.
This project is licensed under the terms of the MIT License.
I am the sole author of this repo (with help from UoR activities) and I am not currently looking for contributors.
If you have any questions about the repo, open an issue or contact me directly at Gaitherdb@gmail.com. You can find more of my work at Gaitherdb.