All Projects → roschaefer → rundfunk-mitbestimmen

roschaefer / rundfunk-mitbestimmen

Licence: MIT License
How should your broadcasting fees be spent? Publish your support and improve the program.

Programming Languages

ruby
36898 projects - #4 most used programming language
javascript
184084 projects - #8 most used programming language
Handlebars
879 projects
PLpgSQL
1095 projects
HTML
75241 projects
Gherkin
971 projects

Projects that are alternatives of or similar to rundfunk-mitbestimmen

openaustralia-parser
Parser component for OpenAustralia.org
Stars: ✭ 28 (-26.32%)
Mutual labels:  democracy
soketi
Just another simple, fast, and resilient open-source WebSockets server. 📣
Stars: ✭ 2,202 (+5694.74%)
Mutual labels:  broadcasting
go-observer
Go package for simplifying channel-based broadcasting of events from multiple publishers to multiple observers
Stars: ✭ 66 (+73.68%)
Mutual labels:  broadcasting
overscan
A live coding environment for live streaming video
Stars: ✭ 36 (-5.26%)
Mutual labels:  broadcasting
MatrixLib
Lightweight header-only matrix library (C++) for numerical optimization and machine learning. Contact me if there is an exciting opportunity.
Stars: ✭ 35 (-7.89%)
Mutual labels:  broadcasting
dewdle
A remote video-feed drawing tool (telestrator) for streaming and broadcast environments.
Stars: ✭ 29 (-23.68%)
Mutual labels:  broadcasting
elections-api
Serving JSON for all elections since 1992
Stars: ✭ 16 (-57.89%)
Mutual labels:  democracy
Matrix
Easy-to-use Scientific Computing library in/for C++ available for Linux and Windows.
Stars: ✭ 20 (-47.37%)
Mutual labels:  broadcasting
WhoCanIVoteFor
🗳 The source for https://whocanivotefor.co.uk/
Stars: ✭ 35 (-7.89%)
Mutual labels:  democracy
TensorCast.jl
It slices, it dices, it splices!
Stars: ✭ 106 (+178.95%)
Mutual labels:  broadcasting
deadsfu
Dead-simple WebRTC broadcasting. From the browser, or your application. Cloud-native and scalable.
Stars: ✭ 23 (-39.47%)
Mutual labels:  broadcasting
meirim
Meirim is an open-source smart city application that facilitates transparency in urban planning.
Stars: ✭ 39 (+2.63%)
Mutual labels:  democracy
adhocracy4
The core library for the e-participation projects by Liquid Democracy
Stars: ✭ 81 (+113.16%)
Mutual labels:  democracy
quadratic-voting
Real-time Quadratic Voting dashboard to encourage mathematically optimal voting in democratic communities.
Stars: ✭ 74 (+94.74%)
Mutual labels:  democracy
TrumpWillTriumph
You are running for president of the United States of America. To become president, you must conquer at least 25 of the 50 states. Each state can be conquered by winning a unique challenge.
Stars: ✭ 13 (-65.79%)
Mutual labels:  democracy
obplayer
📻 OBPlayer Streaming Automation Playout with CAP EAS Alerting
Stars: ✭ 93 (+144.74%)
Mutual labels:  broadcasting
echo-server
Echo Server is a Docker-ready, multi-scalable Node.js application used to host your own Socket.IO server for Laravel Broadcasting.
Stars: ✭ 32 (-15.79%)
Mutual labels:  broadcasting
voting
A simulator for voting systems.
Stars: ✭ 24 (-36.84%)
Mutual labels:  democracy
KnzkLive
No ads, Unlimited, Open-Source Live Streaming Service.
Stars: ✭ 46 (+21.05%)
Mutual labels:  broadcasting
mappool-generator
A Mappool Generator for osu! Tournament Livestreams
Stars: ✭ 20 (-47.37%)
Mutual labels:  broadcasting

rundfunk-mitbestimmen

Build Status

Problem

Public broadcasting in Germany receives €8,000,000,000 (eight billion euros) annually, yet it is subject to no public feedback, ranking, or even debate on what constitutes value or quality.

Solution

On rundfunk-mitbestimmen.de you can say how your €17.50 per month should be spent. It is a proof of concept how digital democracy can work for publicly funded media and it is a win-win situation for both sides: More influence for the audience. More data for broadcasters.

Community

Rundfunk mitbestimmen is maintained by the community. We have regular meetings, run online pair-programmings and tutorials in our online learner community at Agile Ventures. You can join our Slack here and then find us in our channel #rundfunk-mitbestimmen. Here is the Youtube Playlist of our recent meetings or pair-programmings:

Community pair-programming/meeting

Directory Layout

This repository contains three important folders:

  1. frontend (EmberJS)
  2. backend (Ruby on Rails)
  3. features (Cucumber/Capybara)

Backend

The backend is responsible to store the data. Who wants to pay for which broadcast and how much? Users are related to broadcasts via impressions in the database. The response on the impression model can be either negative, neutral and positive and indicates whether a user wants to give money to a broadcast. If the response is positive, the amount further specifies how much to pay for a broadcast. So, the sum of all amounts per user must not exceed the monthly fee of 17,50€ per month.

ER diagram

Frontend

The frontend should be as easy to use as possible. The user can login and register, fetch a set of not yet voted broadcasts, decide about broadcasts, assign money and see the public statistics. Most of these actions will send requests to the backend. The frontend should be comfortable to use, e.g. by default amounts are evenly distributed with the option to set the amount explicitly.

Process diagram

Features

We do full stack testing with Cucumber and Capybara. We specify the requirements as user stories in our Github issues and implement them as cucumber features. The cucumber features are a good starting for you to understand the current behaviour and the reasoning behind it.

Here is our model how to write tests. The cucumber tests are at the top. As they test the entire stack, cucumber tests tend to be rather slow in execution but in return they deliver some confidence that the system works. Testing pyramid

Installation and Usage with Docker

Make sure you have docker and docker-compose installed:

$ docker --version
Docker version 18.05.0-ce, build f150324782
$ docker-compose --version
docker-compose version 1.22.0, build unknown

Clone the repository:

git clone https://github.com/roschaefer/rundfunk-mitbestimmen.git

You can setup the development environment with:

cd rundfunk-mitbestimmen
docker-compose up

This can take a while... As soon as this is finished, create the database and run migrations with:

docker-compose run --rm backend rails db:create db:migrate

App is running on localhost:4200

If you want, you can create some seed data

docker-compose run --rm backend rails db:seed

Run frontend tests:

docker-compose run --rm frontend ember test

Run backend tests:

docker-compose run --rm backend bin/rspec

For fullstack testing, use the provided docker-compose override:

docker-compose -f docker-compose.yml -f docker-compose.fullstack-testing.yml up

When all containers are up, run the cucumber tests in the fullstack service with:

docker-compose run --rm fullstack bundle exec cucumber

Local Installation

Make sure that you have a recent version of node, yarn, EmberJS, ruby, Redis and postgresql installed before you proceed. E.g. we have the following versions:

$ node --version
v10.4.1
$ yarn --version
1.7.0
$ ember --version
ember-cli: 3.1.4
node: 10.4.1
os: linux x64

$ ruby --version
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
$ psql --version
psql (PostgreSQL) 9.6.5
$ redis-server -v
Redis server v=5.0.1

Clone the repository:

git clone https://github.com/roschaefer/rundfunk-mitbestimmen.git

Install dependencies and run migrations:

  1. Install dependencies for full stack testing
cd rundfunk-mitbestimmen
bundle
  1. Install frontend dependencies
cd frontend
yarn install
  1. Install backend dependencies
cd ../backend
bundle
  1. Setup the database

(OPTIONAL): Customize the file backend/config/database.yml to match your local database configuration.

Now make sure that postgresql database is running

[linux]$ sudo systemctl start postgresql
[macos]$ brew services start postgresql

Create the databases and run the migrations:

rails db:create db:migrate
  1. If you want, you can create some seed data

You need to have redis running

[linux]$ sudo systemctl start redis
[macos]$ brew services start redis

Then you can seed the data

cd backend
rails db:seed
cd ..

Usage

Start the backend and sidekiq:

cd backend && rails s
cd backend && bundle exec sidekiq

Open another terminal and start the frontend:

cd frontend && ember server

App is running on localhost:4200

Full stack testing

Run the frontend server:

cd frontend && ember server --environment=fullstack

Open two more terminals and run the backend server and sidekiq:

cd backend && rails server --environment=fullstack
cd backend && bundle exec sidekiq

Open yet another terminal and run the tests:

bundle exec cucumber

These environments serve the purpose to

  1. Stub out external services in the frontend, e.g. authentication via Auth0.
  2. Use a separate test database in the backend, which will be cleaned after each test run.

If you want to run chrome or firefox instead of headless chrome, you can set an environment variable:

bundle exec cucumber DRIVER=chrome

or

bundle exec cucumber DRIVER=firefox

Frontend tests

cd frontend && ember test --server

Backend tests

cd backend && bin/rspec

Guidelines

See our detailed contribution guidelines 🔍

We use this project board as our central issue tracker. Issues are ordered by priority and you can filter for good first issue if you are interested in a beginner-friendly task. Additionally, issues are tagged with backend and frontend depending on where code needs to be changed.

Auth0

Don't be afraid of our identity provider Auth0. In development environment your login will reach the "rundfunk-testing" instance of Auth0. This will not pollute the Auth0 instance used in production.

Workflow for Behaviour Driven Development with Cucumber:

  1. Fork it 🍴
  2. Pick an issue from the backlog
  3. Create your feature branch: git checkout -b [issue number]_my_new_feature_branch
  4. Createfeatures/[site of change]/your.feature and copy+paste the feature description from GitHub
  5. Boot both frontend and backend as described in the section about testing
  6. Run bundle exec cucumber
  7. Append the terminal output to features/step_definitions/steps.rb and write expectations
  8. Run bundle exec cucumber - tests should fail
  9. Implement the feature
  10. Run bundle exec cucumber - tests should pass
  11. Commit your changes: git commit -am 'Add some feature'
  12. Push to the branch: git push origin -u [issue number]_my_new_feature_branch
  13. Submit a pull request ❤️

Deployment

Our build server Travis CI takes care about automatic deployment. Approximately 15 minutes after your pull request was merged into master, you should see the changes in production.

Useful Links

License

See the LICENSE file for license rights and limitations (MIT).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].