Skip to content

jeffreyclu/periodic-table-of-sports

Repository files navigation

Periodic Table of Sports

Contents

Introduction

This project is a collaboration with the Sports team at Perkins Eastman. The Periodic Table of Sports presents over 80 differrent sports in a "periodic table" format. The table is sortable by different attributes such as Type and Cost, and filterable by attributes such as Professional or Olympic sports.

Screen Shot 2020-10-30 at 10.27.20 AM

Architecture

This project was bootstrapped with Create React App.

Area of Focus Technology
Frontend UI React
Component Styling CSS
Database Google Sheets API
Server Express

Prerequisites

In order to run this application, the following are required:

Installation Instructions

  1. Download and install Git

  2. Download and install VS Code

  3. Download and install Node.js

  4. Create a Github account, login, and fork this repo

  5. Open VS Code and navigate to a local working folder (e.g. My Documents)

  6. Open a terminal window in VS Code and navigate to the same working folder by using the cd command.

  7. In the terminal window, run the command git clone [your-repo-url] to clone your forked repo locally on your computer

  8. In the terminal window, run the command cd periodic-table-of-sports to change the working directory

  9. Open a browser, login to Google and make a copy of this sheet

  10. Click File -> Publish to the Web. Ensure that Entire Document and Web Page are selected and click Publish.

  11. Click File -> Share and then enable sharing for Anyone with the link.

  12. Open a new tab and login to the Google Developer Console.

  13. In the console, create a New Project and name it periodic-table-of-sports.

  14. Once the project is created, click Credentials on the side bar. Near the top of the screen click Create Credentials and select API Key. Copy the API Key and Click Close for now.

  15. Near the top click ENABLE APIS AND SERVICES. Search for Google Sheets API and then enable the service. Once it's enabled, go back to the main dashboard.

  16. In VS Code, create a new file called .env in the periodic-table-of-sportsfolder. This environment file will hold the links to your Google Sheet as well as your Google Developer API Key. For security purposes, the spreadhseet links or API Key will never be published to github as long as the .env file is included in the .gitignore folder.

  17. Copy and paste the following into the .env file:

    REACT_APP_SPREADSHEET_LINK=https://sheets.googleapis.com/v4/spreadsheets/[your-google-sheet-id]/values/Levels?key=[your-google-developer-API-key]
    
  18. In the .env file, replace [your-google-sheet-id] with the Sheet ID from your Google Sheet URL (see screenshot below) and replace [your-google-developer-API-key] with the API key generated in step 12. Save and close the .env file. Sheet ID Screenshot

  19. In the terminal window, run the command npm install to install all required packages.

  20. In the terminal window, run the command npm start to start the application in Development mode.

  21. Visit http://localhost:3000 to view the app.

  22. Make changes to src/components/app/app.js and watch the changes live in the browser.

  23. To build and serve the app, run the command npm run server to build and serve the application in Production mode.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run serve

Builds and serves the static files in the build folder using a simple express.js server. The app will be available at http://localhost.

npm run eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

npm run build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

Working Example

https://jstable.herokuapp.com/

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •