{"id":13808524,"url":"https://github.com/roschaefer/rundfunk-mitbestimmen","last_synced_at":"2025-05-08T23:10:09.004Z","repository":{"id":51302557,"uuid":"65456346","full_name":"roschaefer/rundfunk-mitbestimmen","owner":"roschaefer","description":"How should your broadcasting fees be spent? Publish your support and improve the program.","archived":false,"fork":false,"pushed_at":"2021-05-17T02:13:36.000Z","size":14279,"stargazers_count":39,"open_issues_count":107,"forks_count":30,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-08T23:10:02.758Z","etag":null,"topics":["broadcasting","data-visualization","democracy"],"latest_commit_sha":null,"homepage":"https://rundfunk-mitbestimmen.de/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roschaefer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-11T09:20:10.000Z","updated_at":"2023-12-19T17:39:14.000Z","dependencies_parsed_at":"2022-09-17T10:21:39.495Z","dependency_job_id":null,"html_url":"https://github.com/roschaefer/rundfunk-mitbestimmen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roschaefer%2Frundfunk-mitbestimmen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roschaefer%2Frundfunk-mitbestimmen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roschaefer%2Frundfunk-mitbestimmen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roschaefer%2Frundfunk-mitbestimmen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roschaefer","download_url":"https://codeload.github.com/roschaefer/rundfunk-mitbestimmen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253160776,"owners_count":21863630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["broadcasting","data-visualization","democracy"],"created_at":"2024-08-04T01:01:45.206Z","updated_at":"2025-05-08T23:10:08.972Z","avatar_url":"https://github.com/roschaefer.png","language":"Ruby","funding_links":[],"categories":["Software"],"sub_categories":["Software-Development"],"readme":"# rundfunk-mitbestimmen\n\n[![Build\nStatus](https://travis-ci.org/roschaefer/rundfunk-mitbestimmen.svg?branch=master)](https://travis-ci.org/roschaefer/rundfunk-mitbestimmen)\n\n### Problem\n\n**Public broadcasting in Germany receives *€8,000,000,000* (eight billion\neuros) annually, yet it is subject to no public feedback, ranking, or\neven debate on what constitutes value or quality.**\n\n### Solution\n**On [rundfunk-mitbestimmen.de](http://rundfunk-mitbestimmen.de/) you can\nsay how your €17.50 per month should be spent. It is a proof of concept how\ndigital democracy can work for publicly funded media and it is a win-win situation\nfor both sides: More influence for the audience. More data for broadcasters.**\n\n## Community\n\nRundfunk mitbestimmen is maintained by the community. We have regular meetings, run online pair-programmings and tutorials in our [online learner community at Agile Ventures](https://www.agileventures.org/projects/rundfunk-mitbestimmen). You can [join our Slack here](https://www.agileventures.org/users/sign_up) and then find us in our channel [#rundfunk-mitbestimmen](https://agileventures.slack.com/app_redirect?channel=rundfunk-mitbestimmen). Here is the Youtube Playlist of our recent meetings or pair-programmings:\n\n\n[![Community pair-programming/meeting](https://img.youtube.com/vi/D_g6UHMC8NU/sddefault.jpg)](https://www.youtube.com/embed/videoseries?list=PL1CiawkXA01MwjAVBzV0fRjpbl454SCbl)\n\n\n## Directory Layout\n\nThis repository contains three important folders:\n\n1. [frontend](https://github.com/roschaefer/rundfunk-mitbestimmen/tree/master/frontend) (EmberJS)\n2. [backend](https://github.com/roschaefer/rundfunk-mitbestimmen/tree/master/backend) (Ruby on Rails)\n3. [features](https://github.com/roschaefer/rundfunk-mitbestimmen/tree/master/features) (Cucumber/Capybara)\n\n\n### Backend\n\nThe backend is responsible to store the data. Who wants to pay for which\nbroadcast and how much? Users are related to broadcasts via `impressions` in the\ndatabase. The `response` on the impression model can be either `negative`,\n`neutral` and `positive` and indicates whether a user wants to give money to a\nbroadcast. If the `response` is positive, the `amount` further specifies how\nmuch to pay for a broadcast. So, the sum of all amounts per user must not exceed\nthe monthly fee of 17,50€ per month.\n\n![ER diagram](/documentation/images/er.png)\n\n### Frontend\n\nThe frontend should be as easy to use as possible. The user can\nlogin and register, fetch a set of not yet voted broadcasts, decide about\nbroadcasts, assign money and see the public statistics. Most of these\nactions will send requests to the backend. The frontend should be comfortable to\nuse, e.g. by default amounts are evenly distributed with the option to set the\namount explicitly.\n\n![Process diagram](/documentation/images/process.png)\n\n### Features\n\nWe do full stack testing with Cucumber and Capybara. We specify the\nrequirements as user stories in our Github issues and implement them as cucumber\nfeatures. The cucumber features are a good starting for you to understand the\ncurrent behaviour and the reasoning behind it.\n\nHere is our model how to write tests. The cucumber tests are at the top. As they\ntest the entire stack, cucumber tests tend to be rather slow in execution but\nin return they deliver some confidence that the system works.\n![Testing pyramid](/documentation/images/testing-pyramid.png)\n\n## Installation and Usage with Docker\n\nMake sure you have `docker` and `docker-compose` installed:\n```sh\n$ docker --version\nDocker version 18.05.0-ce, build f150324782\n$ docker-compose --version\ndocker-compose version 1.22.0, build unknown\n```\n\nClone the repository:\n```sh\ngit clone https://github.com/roschaefer/rundfunk-mitbestimmen.git\n```\n\nYou can setup the development environment with:\n\n```sh\ncd rundfunk-mitbestimmen\ndocker-compose up\n```\n\nThis can take a while...\nAs soon as this is finished, create the database and run migrations with:\n```sh\ndocker-compose run --rm backend rails db:create db:migrate\n```\n\nApp is running on [localhost:4200](http://localhost:4200/)\n\nIf you want, you can create some seed data\n```sh\ndocker-compose run --rm backend rails db:seed\n```\n\nRun frontend tests:\n```sh\ndocker-compose run --rm frontend ember test\n```\n\nRun backend tests:\n```sh\ndocker-compose run --rm backend bin/rspec\n```\n\nFor fullstack testing, use the provided [docker-compose override](https://docs.docker.com/compose/extends/#example-use-case):\n```sh\ndocker-compose -f docker-compose.yml -f docker-compose.fullstack-testing.yml up\n```\nWhen all containers are up, run the cucumber tests in the `fullstack` service with:\n```sh\ndocker-compose run --rm fullstack bundle exec cucumber\n```\n## Local Installation\n\nMake sure that you have a recent version of [node](https://nodejs.org/en/),\n[yarn](https://yarnpkg.com/en/), [EmberJS](https://www.emberjs.com/),\n[ruby](https://www.ruby-lang.org/en/), [Redis](https://redis.io/)\nand [postgresql](https://www.postgresql.org/) installed before you proceed. E.g.\nwe have the following versions:\n\n```sh\n$ node --version\nv10.4.1\n$ yarn --version\n1.7.0\n$ ember --version\nember-cli: 3.1.4\nnode: 10.4.1\nos: linux x64\n\n$ ruby --version\nruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]\n$ psql --version\npsql (PostgreSQL) 9.6.5\n$ redis-server -v\nRedis server v=5.0.1\n```\n\n### Clone the repository:\n```sh\ngit clone https://github.com/roschaefer/rundfunk-mitbestimmen.git\n```\n\n### Install dependencies and run migrations:\n1. Install dependencies for full stack testing\n```sh\ncd rundfunk-mitbestimmen\nbundle\n```\n\n2. Install frontend dependencies\n```sh\ncd frontend\nyarn install\n```\n\n3. Install backend dependencies\n```sh\ncd ../backend\nbundle\n```\n4. Setup the database\n\n**(OPTIONAL):** Customize the file `backend/config/database.yml` to match your local database configuration.\n\nNow make sure that postgresql database is running\n```sh\n[linux]$ sudo systemctl start postgresql\n[macos]$ brew services start postgresql\n```\nCreate the databases and run the migrations:\n```sh\nrails db:create db:migrate\n```\n\n5. If you want, you can create some seed data\n\nYou need to have redis running\n```sh\n[linux]$ sudo systemctl start redis\n[macos]$ brew services start redis\n```\nThen you can seed the data\n```\ncd backend\nrails db:seed\ncd ..\n```\n\n## Usage\n\nStart the backend and sidekiq:\n```sh\ncd backend \u0026\u0026 rails s\n```\n```sh\ncd backend \u0026\u0026 bundle exec sidekiq\n```\n\nOpen another terminal and start the frontend:\n```sh\ncd frontend \u0026\u0026 ember server\n```\n\nApp is running on [localhost:4200](http://localhost:4200/)\n\n## Full stack testing\n\nRun the frontend server:\n```sh\ncd frontend \u0026\u0026 ember server --environment=fullstack\n```\n\nOpen two more terminals and run the backend server and sidekiq:\n```sh\ncd backend \u0026\u0026 rails server --environment=fullstack\n```\n```sh\ncd backend \u0026\u0026 bundle exec sidekiq\n```\n\nOpen yet another terminal and run the tests:\n```sh\nbundle exec cucumber\n```\n\nThese environments serve the purpose to\n\n1. Stub out external services in the frontend, e.g. authentication\n   via Auth0.\n2. Use a separate test database in the backend, which will be cleaned after each\n   test run.\n\nIf you want to run chrome or firefox instead of headless chrome, you can set an\nenvironment variable:\n```sh\nbundle exec cucumber DRIVER=chrome\n```\nor\n```sh\nbundle exec cucumber DRIVER=firefox\n```\n\n### Frontend tests\n\n```sh\ncd frontend \u0026\u0026 ember test --server\n```\n\n### Backend tests\n\n```sh\ncd backend \u0026\u0026 bin/rspec\n```\n\n## Guidelines\n\n[See our detailed contribution guidelines :mag:](/CONTRIBUTING.md)\n\n\nWe use this [project board](https://github.com/roschaefer/rundfunk-mitbestimmen/projects/1) 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.\nAdditionally, issues are tagged with `backend` and `frontend` depending on where code needs to be changed.\n\n### Auth0\n\nDon't be afraid of our identity provider [Auth0](https://auth0.com/). In\ndevelopment environment your login will reach the \"rundfunk-testing\" instance\nof Auth0. This will not pollute the Auth0 instance used in production.\n\n### Workflow for Behaviour Driven Development with Cucumber:\n\n1. Fork it :fork_and_knife:\n2. Pick an issue from the [backlog](https://github.com/roschaefer/rundfunk-mitbestimmen/projects/1)\n3. Create your feature branch: `git checkout -b [issue number]_my_new_feature_branch`\n4. Create`features/[site of change]/your.feature` and copy+paste the feature description from GitHub\n5. Boot both frontend and backend as described in the [section about testing](https://github.com/roschaefer/rundfunk-mitbestimmen#full-stack-testing)\n6. Run `bundle exec cucumber`\n7. Append the terminal output to `features/step_definitions/steps.rb` and write expectations\n8. Run `bundle exec cucumber` - tests should fail\n9. Implement the feature\n10. Run `bundle exec cucumber` - tests should pass\n11. Commit your changes: `git commit -am 'Add some feature'`\n12. Push to the branch: `git push origin -u [issue number]_my_new_feature_branch`\n13. Submit a pull request :heart:\n\n\n## Deployment\n\nOur [build server Travis CI](https://travis-ci.org/roschaefer/rundfunk-mitbestimmen) takes care about automatic deployment.\nApproximately 15 minutes after your pull request was merged into master, you should see the changes in production.\n\n\n## Useful Links\n\n* [ember.js](http://emberjs.com/)\n* [ember-cli](http://ember-cli.com/)\n* Development Browser Extensions\n  * [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)\n  * [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)\n\n\n## License\n\nSee the [LICENSE](LICENSE.md) file for license rights and limitations\n(MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froschaefer%2Frundfunk-mitbestimmen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froschaefer%2Frundfunk-mitbestimmen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froschaefer%2Frundfunk-mitbestimmen/lists"}