BOOKSHELVES
Full stack web application for managing collections of books.
Table of contents
Demo
Here is a working live demo: https://my-bookshelves.com/
Technologies
- Development
- Production / Hosting
Setup
-
Clone this repository to your local machine
$ git clone https://github.com/petruborta/mern-bookshelves
-
Go to MongoDB site and create a free account
-
Create a cluster and within this cluster create a database with 2 collections named
books
andusers
-
Add a record to
users
collection following the user schema frommodels/User.js
-
Connect the application to cluster by clicking the
CONNECT
button, selectingConnect your application
option and copying the given link -
In project's main folder create a
.env
file with the following content and replaceYOUR_ATLAS_URI
with the link from the previous step,secret
with any string you want andYOUR_ID
with your user ID from step 4
PORT=5000
ATLAS_URI=YOUR_ATLAS_URI
rootAdminID=YOUR_ID
secretOrKey=secret
- Also create
keys.js
file inconfig
folder and add the following code to it
module.exports = {
ATLAS_URI: process.env.ATLAS_URI,
rootAdminID: process.env.rootAdminID,
secretOrKey: process.env.secretOrKey
};
-
Go to Google Cloud Platform, add new project that uses Books API and create credentials to use enabled API
-
Once you've got the credentials, in
client
folder create a.env
file and replaceYOUR_GOOGLE_BOOKS_API_KEY
with your actual key's valueREACT_APP_BOOKS_API_KEY=YOUR_GOOGLE_BOOKS_API_KEY
-
Change working directory
cd client
and runsudo npm install
to install all the dependencies -
Go back to project's main folder
cd ..
and runsudo npm install
to install all the dependencies -
Use the command
npm run dev
to see the project live
Status
Project is: in progress - "suggest a book" feature needs to be implemented and then the app can be extended with even more features
Inspiration
Followed this tutorial to implement user authentication via passport and JWTs.
Contact
Created by @petruborta - feel free to contact me!