Snippet is an app built in Fellowship with NSW Education Centre for Education Statistics and Evaluation in 2017-18.
Snippet allows educators to view or publish insights about program applications in NSW schools.
This repository contains a web application client that is exported to an internal application at NSW Education.
- Node 6.11.5
- npm
5.6.0
- yarn
1.5.1
- firebase-tools
^3.16.0
- MongoDB
^3.0.0
We recommend using nvm to manage Node versions.
View Readme.
Serverless Functions that support the demo environment.
In the real environment. only the client app is deployed to Department of Education cloud services. Here the client app also uses APIs provided by the Department.
As Functions is a project aid only, documentation is not provided.
Ok ok ok!
The client application can be run along with a mock api that does not require a database.
- Navigate to
./client
cd client
- The first time, install dependencies:
yarn install
- Run the mock API:
yarn api
- Open a second terminal window and run the app:
yarn dev
You can develop using the mock API described above or by using the Serverless environment connected to a MongoDB instance.
Install a MongoDB database called "Snippet" and then run a third terminal window for the database:
mongod
You can run Function containers individually or use Firebase to run all of the containers at the once:
firebase serve --only functions,hosting
To work on the client app, you will need to launch a development session. Alternatively built files are served in combination with firebase serve
from ./client/build
cd client
yarn dev
Todo: this documentation section could be improved.
Deploy to the demo environment happens from CI off tag creation.
To tag a release for deployment:
git tag `date "+release-%Y%m%d%H%M%S"` && git push --tags
To rollback a release:
git checkout -b release-20160101
git tag `date "+release-%Y%m%d%H%M%S"` && git push --tags
For help on setting up the repo locally, building, testing, and contributing please see Contibuting.
All developers who wish to contribute through code or issues, take a look at the Code of Conduct.
MIT.