Skip to content

YXShang97/GoHiking

Repository files navigation

GoHiking ⛺

GoHiking Screenshot

Live Version: https://gohiking2-882a8fb449f2.herokuapp.com/

This is a project to learn and practice full-stack web development. Project originated from Colt Steele's course.

Built with: HTML5 CSS3 JavaScript Node MongoDB Git Bootstrap Render

Features ⭐

1. Interactive Map

  • Display hiking trail clusters on map.
  • Convenient for users explore new destinations around them.

InteractiveMap Screenshot

2. User Authentication and Authorization

  • Safeguard your GoHiking experience with secure user authentication to protect your profile and ensure a trusted community.
  • Strictly limit Create/Edit/Delete permissions to ensure a safe and respectful environment for all users.

Auth Screenshot

3. Create/Edit/Delete Hiking Trail

  • Collect and display latest and detailed information of hiking trails.

CRUD Screenshot

4. Rating Hiking Trail

  • Allow users to post reviews for the trail and rate it.

Rate Screenshot

(back to top)

Getting Started & Running App 🚀

Prerequisites

1. Node.js & NPM

Install Node.js with NPM from its website.

Once installed, check Node version:

node --version

Check npm version:

npm --version

2. MongoDB

Install MongoDB and MongoDB Shell (mongosh) from its website.

3. Cloudinary API Key

Cloudinary is used for image storage. Sign up for an free-tier account to receive an API key.

4. Mapbox API Key

Mapbox is used for a cluster map and individual campground maps. Sign up for an free-tier account to receive an API key.

(back to top)

Installation

1. Clone the repo

git clone https://github.com/YXShang97/GoHiking.git

2. Install NPM packages in project directory

cd GoHiking
npm install

If vulnerabilities are found when packages are installed, run:

npm audit fix

3. Create environment variables

In home directory, create .env file with the below environment variables and input your API keys an MongoDB URL if using MongoDB Atlas.

# Cloudinary credentials
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_KEY=
CLOUDINARY_SECRET=

# Mapbox credentials
MAPBOX_TOKEN=

# MongoDB credentials
DB_URL=

# Secret key
SECRET=

4. Create initial database user

Start the app and open the default (http://localhost:3000) to register an initial user.

nodemon app.js

Open MongoDB Shell (mongosh) and run the following commands to retrieve the user's ObjectID

use hiking-trail
db.users.find()

5. Seed database

Copy the user's ObjectID from above and paste into seeds/index.js under author so all of your seeded hikingtrails have an author.

node seeds/index.js

6. Running App

nodemon app.js

(back to top)

Acknowlegements 🙌

Big thanks to Colt Steele in putting in the time and effort to creating such a robust web dev course.

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published