Skip to content

usdevs/usc-website

Repository files navigation

USC Website

Development instructions

  1. Install nodeJS, npm and yarn
  2. Clone the repo and run yarn to download node_modules folder
  3. Copy the env.example file into .env at the root directory, Including in the appropriate API keys. Obtain GCal from your own generation of an API key, and ask Admins for Firebase.
  4. run yarn start to build the local development build, which is visible on localhost
  5. run yarn build to prepare the production build

Step-by-step setup guide

Windows users

Install Windows Subsystem for Linux and continue below.

Dependencies

These are some basic development tools you'll need to get started on this project. If you can, do a quick 2 minute read up on what each of them does! It'll help make sense of the steps later on.

  1. git

  2. NodeJS 10.x.x and npm

  3. yarn

Fork and clone the repository

The first steps in the fork and pull request workflow!

  1. Fork this repo!

    • Look for the "Fork" button on the top right
    • Click it!
  2. Enable Travis CI on your repo (You'll need this to merge a pull request later on)

    • Sign up in with your github account here
    • Accept the Authorization of Travis CI. You’ll be redirected to GitHub.
    • Click on your profile picture in the top right of your Travis Dashboard, click Settings and then the green Activate button, and select your forked repository..
  3. Clone your fork of the repo to your local machine

    • replace "USERNAME" with your Github username and run:
    • git clone https://github.com/USERNAME/usc-website.git

Set up the API keys

The USC website interacts with the USC Google Calendar and Firebase. These interactions require authentication through some secret API keys.

  1. Copy the env.example file into .env in the usc-website/ directory

    • cp .env.example .env
  2. Google Calendar

  3. Firebase

    • Ask admins nicely for an API key.
    • Copy the API key into the .env file!

Development and build servers

For most part, you'll be testing the changes you make on a development server on your local machine (your laptop, PC, etc) and any changes you make will be reflected immediately.

  1. Development

    • yarn start
  2. Build

    • yarn build

Resources for Getting Started Contributing