Skip to content

Latest commit

 

History

History
85 lines (64 loc) · 4.99 KB

README.md

File metadata and controls

85 lines (64 loc) · 4.99 KB

Sun Voyage (API)

This is the back-end for Sun Voyage (pronounced like 'Bon Voyage'), a decoupled fullstack app.

sun-voyage.herokuapp.com

About

Welcome to Sun Voyage! Visit planets and dwarf planets in the Solar System to learn more about each, and to see what your age and weight would be in a different world. Interact with other galactic travelers by sharing your experiences and sight-seeing recommendations in the comments of each planet!

Click here to visit the live site.

Click here to visit the live backend.

And click here to view the client github repo.

You don't need an account to view planets and others' comments, but you will need one to add your own and to update your profile.

Contributors

Patricia Pan

Elyssa Winch

Yasaman Forouzesh

Technologies Used

  • Node.js (v15.5.1)
  • Express
    • Passport/Bcrypt - Authentication and password hashing
    • JWT - Create user tokens
  • Key APIs:
    • Le Soleil System - To seed database with planet information
  • Mongoose - Retrieivng and modifying database data
  • MongoDB Atlas - Database to store data

How to Install

If you'd like to set up this project on your local server:

  • Fork and clone this repository
  • Run npm i to install the dependencies listed in package.json
    • Run npm i nodemon (if not already globally installed)
  • Create an .env file, and add values to the below variables:
    • DB_CONNECTION_STRING for the link to your local or online mongo database. mongodb://localhost/<nameOfDatabase> will create a database with that name if it doesn't already exist.
    • JWT_SECRET to be any string that you'd like
  • Run the seeder file to populate your database with planets:node seeder/seeder.js
  • To view your mongo database (assuming that you already have mongo installed):
    • brew services start [email protected]
    • mongo to enter the shell
    • show dbs
    • use <nameOfDB>
    • show collections
    • db.<nameOfCollection>,find().pretty() to view all values in that collection
    • quit() to exit the shell
  • Run nodemon to start the server in port 8000 or a port of your choice

Timeline

b = backend functionalty; f = frontend functionality.

user = generic user; User = logged in user.

On... We created/implemented the following...
Fri, 2/19/21
  • Project idea
  • React components blueprint (f)
  • RESTful Route paths (b)
  • API for planet info (b)
  • User login (f, b)
  • Account creation from backend (b)
Sat, 2/20/21
  • Atlas cluster (online database, DB) (b)
  • Mongoose model schemas (b)
  • API seeder file (b)
  • Stubbing for files and components/routes (f, b)
  • Navbar partial (f)
Mon, 2/22/21
  • Atlas DB with planet data (from seeder file) (b)
  • User commenting on planets (f, b)
  • Comment editing from backend (b)
  • Navbar styling (f)
Tues, 2/23/21
  • Styling for homepage and planets display (f)
  • Comment deletion from backend (b)
  • User info on Profile page, User info conversions on Planet page
Wed, 2/24/21
  • DB refactor: Object reference Comment schema (instead of Planet subdocument) (b)
  • User commenting with new Comment schema (f, b)
  • User editing Profile (f, b)
  • 'Picture of the Day,' NASA API space photos (f)
  • About page styling, twinkling cover on homepage (f)
Thurs, 2/25/21
  • User comments display on Profile, grouped by Planet (f)
  • User deletion of comments (from Comment, User.comments, and Planet.comments) (f,b)
  • Styling for Astronomy Picture of the Day (APOD)
  • Fresh User token generation when updating Profile (f, b)
  • Deployment to the internet! (f, b)
Fri, 2/26/21
  • Styling for smaller screens (f)
  • Final Readmes!