This is the code that backs the website ff7.run.
The code in this repos is divided into 3 sections:
shared
code that lives in projects/shared
. The data model, main run
logic, and data live here.frontend
code that lives in the repo root. It is implemented using angular.
The most interesting bits live in src/app
.backend
code that lives in functions
. The backend is implemented using
Firebase functions. All writing to the database is done here. The front end
only sees read-only views.To develop, you'll need to install:
Once installed, install the Typescript, Angular, and Firebase CLI utilities:
npm install -g typescript
npm install -g @angular/cli
npm install -g firebase-tools
You'll also need to instal npm depedancies for the frontend and backend:
npm install
(cd projects/shared; npm install)
(cd functions; npm install)
Data is stored in projects/shared/src/lib
in JSON5 format. The files are
converted to json for consumption by the frontend and backend using:
(cd projects/shared; npm run convert-data)
First build the backend and start the firebase emulators:
(cd functions; npm run build) && firebase emulators:start
Once that's started, start the angular dev server:
ng serve
The app will now be running at http://localhost:4200/
. The app will automatically
reload if you change any of the source files.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
Run ng lint
as well as npm run fmt:check
before pushing code/sending a pull request.