Skip to content

A web application that streamlines rock climbing competitions by automating scoring and verification processes

License

Notifications You must be signed in to change notification settings

ganeshsankaran/Climb

Repository files navigation

Climb!

Project summary

One-sentence description of the project

Climb! is a web application that improves the climbing competition experience by automating the scoring and verification process involved.

Additional information about the project

Target Audience: Competitive climbers

Main Functionality

For the minimum viable product:

  • Competitors can create a competition
  • Competitors can join a competition
  • Competitors can log routes
  • Competitors can view top climbs

For the final sprint:

  • Competitors can have their logged routes verified
  • Competitors can view their past logged routes for a competition
  • Competitors can view their tentative final score

Installation

Prerequisites

  • Git (v2.21.1)
  • Heroku (v7.38.0)
  • Node (v12.14.1)
  • PostgreSQL (v12.1)

Dependencies

  • React (v6.13.4): Allows for the creation of web components for the frontend
  • React Router (v6.13.4): Allows for routing of pages in the frontend
  • React Router DOM (v6.13.4): Allows for routing of pages in the frontend
  • Axios (v6.13.4): Allows for creating and handling API requests to the backend

Installation Steps

Database

  1. Navigate to the resources tab under your Heroku application and look for Heroku Postgres in the Add-ons search bar. Provision Postgres for your application with the Hobby Dev plan.

  2. You can access the database from terminal with the following command (make sure you are logged into Heroku):

heroku pg:psql -a your-application-name
  1. We have provided our schema in database.sql. Copy-paste this inside the Heroku Postgres terminal.

  2. Once this is complete, copy over the config.example.js file into a new file named config.js and alter the fields to match the database configurations (username, host, database, port, password) on Heroku. These can be found by clicking on the Heroku Postgres option under Add-ons, then selecting Database Credentials under the Settings tab. Without this step, the Node.js server will not know what database to query.

Backend

Testing the web application on localhost:

  1. Navigate to the backend subdirectory:
cd backend
  1. Start the web server (this installs necessary dependencies as well):
npm start

Deploying the web application on Heroku:

  1. Configure the Heroku deployment:
cd ..
heroku login
heroku git:remote -a your-application-name
  1. Push the web application to Heroku:
git subtree push --prefix backend heroku master

Frontend

Testing the web application on localhost:

  1. Navigate to the frontend subdirectory:
cd frontend
  1. Install necessary dependencies:
npm install
  1. Start the web server:
npm start

Deploying the web application on Heroku:

  1. Configure the Heroku deployment:
cd ..
heroku login
heroku git:remote -a your-application-name
  1. Push the web application to Heroku:
git subtree push --prefix frontend heroku master

Testing

Mocha.js

  1. Install Mocha.js dependancies.
npm install mocha
npm install chai
npm install chai-http
  1. Navigate to backend directory.
cd backend
  1. Run tests.
    a. Unit tests.
mocha test/unit

Functionality

Here are our frontend and backend in production.

  • Navigate to the homepage.
  • Click on "Get Started" or "Sign Up" on the navigation bar and create an account. If you already have an account, click on "Log In" and log in.
  • Click on "Competitions" to create or join a competition.
  • Click on "Create Competition" and create a competition. If your competition already exists, click on "Join Competition" and join the competition.
  • Click on "Log Routes" and log routes for a given competition and route number. You must have two witnesses whose usernames must be submitted with your logged route. You now see all of your logged climbs for your current competition.
  • Click on "View Score" and view the top 3 climbs and your tentative final score for your current competition.
  • Click on "Log Out" on the navigation bar.

Known Problems

  • Restarting the backend Heroku dyno from an API call causes a delay of several seconds
  • There is a very slight delay in showing top 3 table in "View Score"

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

See LICENSE.txt

About

A web application that streamlines rock climbing competitions by automating scoring and verification processes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published