Skip to content

Latest commit

 

History

History
134 lines (92 loc) · 4.95 KB

README.md

File metadata and controls

134 lines (92 loc) · 4.95 KB

build status documentation status Code Climate test coverage

Matekasse

logo

Keep track of your donations!

This web application is for places where people can donate to get a drink. Just create an account, donate some money and count down while drinking Mate (or some other beverage).

This code is intended to be simple, full of security problems and lacking a lot of features. Please hack on it.

Getting started

As a user

  1. Access your mete instance

mete doesn't have any kind of discoverability built in. If you know the URL of an instance, you can access it by simply pointing your browser there. Or use one of the apps:

  1. Select your account

The first screen you'll see presents a list of users. If you already have an account at this instance, go ahead and select it by tapping.

users page

If you don't, you can simply create one by pressing the 'new user' button. This opens a screen where you can fill in a username, your email and an initial account balance. (You don't need to put your email there, it's just being used for Gravatar.) After entering your details and confirming, you'll be presented your user page.

new user page

  1. Your user page

Here, you can donate for stuff by simply tapping the product. Or you can modify or delete your account.

user page

As a developer of an app

Mete currently implements version 1 of the Space-Market API. The endpoint is located at /api/v1.

Out-of-date instances of mete provide an API at / that is somewhat similar. Current installations may provide legacy support at / but please don't depend on this if you're developing a client.

Please also don't parse the HTML returned by mete or anything not in /api.

As a developer of mete

Thanks for wanting to contribute. :)

This is a relatively standard Rails application (which means that most code resides in the app folder).

If you're new to the codebase you might want to take a look at the issues labeled 'good first issue'.

Also, there are tests for most parts of the application in test if you want to take a look.

As an admin

So you want to set up an instance of mete? That's great!

Please be aware that mete doesn't currently have any configuration mechanism on the server side, so if you want to make changes to mete consider forking this repository, making your changes and rebasing regularily. (Please also open a pull request if you think your changes are vaguely useful for others.)

You can add products via a browser afterwards.

There are multiple ways to set up an instance:

using our provided Docker image

There's the image chaosdorf/mete over at Docker hub. This is built automatically on each push to master, but should still be stable enough. (We try to not break master.)

Here's a minimal example using docker-compose:

version: "3"
volumes:
  system:
  database:
services:
  db:
    image: postgres:10-alpine
    environment:
      POSTGRES_PASSWORD: mete
    volumes:
      - database:/var/lib/postgresql/data
  backend:
    environment:
      RAILS_ENV: production
    image: chaosdorf/mete
    volumes:
      - system:/app/public/system
    restart: on-failure
    depends_on:
      - db
    ports:
      - "80:80"

This is missing some stuff (eg. backups), you might want to take a look at docker-compose.yml.

(You can also build the image on your own, of course.)

the "traditional" way

You can still run mete without Docker. It needs a few dependencies (mostly Ruby) and a database (Postgres and SQLite have been tested).

sudo apt install ruby ruby-dev bundler git zlib1g-dev libsqlite3-dev sqlite3 imagemagick nodejs
git clone https://github.com/chaosdorf/mete.git
cd mete
# adjust config/database.yml
export RAILS_ENV=production
bundle install --path vendor/bundle
bundle exec rake db:migrate
bundle exec rake assets:precompile
bundle exec rails server -b [::] -p 80 # or use a reverse proxy

After an update you'll need to repeat the last five steps.