Skip to content

A sample app instructing how to create a custom leaderboard using fundraising data from your organization or campaign

Notifications You must be signed in to change notification settings

classy-org/custom-leaderboard-sample-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom Leaderboard

This is a sample application that demonstrates how to create a custom leaderboard with your Classy data. It should be used purely as instructional material rather than a production-ready application. A great support article further outlines and walks through what this application achieves.

Please refer to Classy's developer documentation for more information about how to work with our product.

This application shell makes use of a Node backend layer to handle requests between the application and Classy's API as well as a React frontend to create a Client for the data retrieved from the customer's Classy account.

You can find the backend layer in the /server folder and the frontend part of the application in the /client folder.

Server: Node Server

The Server folder leverages the Express framework as well as Nodemon to simplify development.

Client: React SPA

The Client folder contains the React SPA to display the data retrieved from Classy's API by the backend.

Setup / Local Development

  1. Ensure you have NVM installed.
  2. Ensure you have yarn installed.
  3. Copy the environment variables from .template.env to a new .env file in the root of the server directory, adding in the values that correlate with your organization, campaign, and authentication credentials.
  4. Run the following commands from the root of this app to set up the project:
$ nvm use
$ yarn install:all
$ yarn start:local

nvm use will assure that you are using the latest stable version of Node. yarn install:all will install all of the dependencies the root application and subdirectories need to run. yarn start:local will run both the server and client applications in parallel.

NOTE: React's strict mode can cause double renders and, thus, duplicate requests to the backend. For local development, you may want to remove the React.StrictMode wrapper around the React app in index.tsx.

Troubleshooting NVM / Yarn Versions

If you encounter issues with yarn following the nvm use command, you may need to reinstall yarn for the new node version:

$ npm install -g yarn

About

A sample app instructing how to create a custom leaderboard using fundraising data from your organization or campaign

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published