A mobile-friendly frontend for foodsharing.de. Focused on the tasks you need to do now!
# install quasar globally
$ npm install -g quasar-cli
# install dependencies
$ npm install
# ... alternatively using yarn
$ yarn
# serve with hot reload at localhost:8080
$ quasar dev
# build for production with minification
$ quasar build
# lint code
$ quasar lint
Two backends are required for this project.
In the future we may offer a public developer deployment of the two backends for if you are just doing frontend development.
This is not currently open source. Please join yunity slack in #foodsharing-dev channel to request access.
It is hosted at gitlab.com/foodsharing-dev.
Once you have access follow the docker setup instructions there.
Open source Django RESTful API available at github.com/foodsharing-dev/foodsharing-django-api.
Point it at the database inside the docker container, see the example local settings for MySQL configuration.
If you want to develop the frontend, you can get an API documentation at foodsharing light swagger documentation.
Set the environment variables before running quasar dev
like this:
FOODSHARING_BACKEND=https://foodsharing.de API_BACKEND=https://beta.light.foodsharing.de quasar dev
This will access your data on foodsharing.de, so be careful!
We use chai for assertions, here is the full list of available matchers.
You can run the tests with:
# one off test run
$ npm run test
# run tests and re-run on change
$ npm run test:watch
Currently it will start Firefox as well as chrome to run the tests in, you can avoid it showing the UI by installing xvfb and ensuring xvfb-run
is available on your path, then:
# one off test run
$ npm run test:xvfb
# run tests and re-run on change
$ npm run test:watch:xvfb
When you use chromium and don't have chrome installed, you may need to set the CHROME_BIN=chromium
environment variable (e.g. in your .bashrc)
Currently, deployment runs manually.
The run scripts/deploy.sh
from root folder to deploy to live foodsharing site.
For sure, you need to have to have SSH keys setup to access production :-)