new version of foodsharing in vue.js and quasar frontend framework
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
config
scripts
src
templates
test/unit
.babelrc
.editorconfig
.eslintignore
.eslintrc.js
.gitignore
.stylintrc
.travis.yml
LICENSE
README.md
crowdin.yml
docker-compose.yml
dockerfile
package.json
yarn.lock
yarn.sh

README.md

foodsharing light

A mobile-friendly frontend for foodsharing.de. Focused on the tasks you need to do now!

Build Status codecov Greenkeeper badge

Build Setup

# 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

Backends

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.

main foodsharing site

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.

foodsharing-django-api

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.

API docs

If you want to develop the frontend, you can get an API documentation at foodsharing light swagger documentation.

Developing on production backend

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!

Testing

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)

Deploying in production

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 :-)