Skip to content

Race bib generator for the Totally Spaced Out Virtual 10K - benefiting the SAFE Austin Children's Shelter.

License

Notifications You must be signed in to change notification settings

ahtraddis/totallyspacedout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

'Totally Spaced Out' Virtual 10K - Race Bib Generator

A print-at-home race bib generator in the time of COVID-19.

About This

The 43rd Annual Austin-American Statesman Cap10K scheduled for April 5, 2020 was cancelled due to the coronavirus, but Coach Gary came up with a brilliant idea: to organize a safe, alternative virtual race that our running team members – spaced at least 6 feet apart – could run or walk wherever they are.

But what's a race without an official bib number to wear and celebrate in your selfies at the virtual finish line?

So we built this bib generator site just a few days before the event, and invited the whole community to participate. The event raised over $6,000 for the SAFE Austin Children's Shelter.

We hope this success will inspire similar efforts on behalf of those in need in your community, too.

Built with

Getting Started

The code in this repo is built around a specific event but can be easily modified to support a virtual race or similar event of your own.

By default, the web app:

  • generates a printable bib (PNG) with unique bib number, participant name, and city
  • outputs an award certificate (PDF) when the event is complete
  • logs bib entries in a Firebase Realtime Database
  • displays an animated slider listing random participants

Prerequisites

Installation

  1. Set up a free Firebase account and start a new Firebase project.
  2. Create a new Firebase Realtime Database and set up rules.
  3. Install the Firebase CLI.
  4. Set up Firebase Hosting.
  5. Clone this repo.
git clone https://github.com/ahtraddis/totallyspacedout.git
  1. Install NPM packages
npm install

Customization

  1. Edit the defaults and firebaseConfig objects in App.js to suit your event and Firebase configuration:
const defaults = {
    name: "YOUR DEFAULT NAME",
    city: "YOUR DEFAULT CITY",
    missionText: "YOUR SLOGAN OR MISSION STATEMENT",
    missionSubText: "www.yoursiteurl.com",
    baseFilename: "YourBibFilenamePrefix_",
    awardBaseFilename: "YourAwardCertificateFilename",
    tosUrl: "https://www.yoursiteurl.com/terms",
    privacyPolicyUrl: "https://yoursiteurl.com/privacy",
  };
...
const firebaseConfig = {
    apiKey: "YOUR-API-KEY",
    authDomain: "YOUR-AUTH-DOMAIN",
    databaseURL: "YOUR-DATABASE-URL",
    projectId: "YOUR-PROJECT-ID",
    storageBucket: "YOUR-STORAGE-BUCKET",
    messagingSenderId: "YOUR-SENDER-ID",
    appId: "YOUR-APP-ID",
    measurementId: "YOUR-MEASUREMENT-ID"
  };
  1. Edit the following functions to modify the bib and award certificate layouts:
  • createBibGroup() - generates a standard race bib outline
  • createTextGroup() - generates bib number, name, and city fields
  • createTextGroup2() - generates mission statement and site URL
  • addImages() - adds logo images and thumbnails to canvas
  • addAwardElements() - generates the award certificate PDF

See the Fabric.js docs for usage info.

  1. Edit the HTML body, substituting your own event info, links, and images.

Build

yarn build

Deploy

firebase deploy

Roadmap

This was created in just a few days, so next steps will be to clean up and abstract things to make it more easily reuseable for ongoing events. Let us know your ideas and needs and we'll try to incorporate them.

Status Milestone ETA
Abstract text, graphics and layouts via configurable templates
Add support for ongoing team/community events with the same participant base

License

This project is licensed under the MIT License - see the LICENSE file for details.

If you appreciate and benefit from this project, please consider making a tax-deductible donation to SAFE Austin via the Team FX Donate page.

Contact

Eric Schwartz - eric@whyanext.com

Project Link: https://github.com/ahtraddis/totallyspacedout

Acknowledgements


This project was bootstrapped with Create React App.

About

Race bib generator for the Totally Spaced Out Virtual 10K - benefiting the SAFE Austin Children's Shelter.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published