tactilenews / 100eyes

Dialogtechnologie für den Pivot to People invented by tactile.news GmbH
MIT License
10 stars 1 forks source link
dialog journalism

100eyes

100eyes is the first open source solution for dialog-driven journalism in Germany. In the editorial office, 100eyes enables newsrooms to reach as many people as possible where they would most like to be reached - via Telegram messenger or e-mail.

100eyes is a lean tool that improves journalistic routine: editors can ask questions and get answers from more people faster. The user interface offers two core functions to journalists:

  1. Maintain a community

  2. Start research: With just one click, journalists can send questions to their community, evaluate all answers collectively and store new information from the answers of their contributors in a structured way.

Demo

Behind the 100eyes project are Astrid Csuraji and Dr. Jakob Vicari, who are driving journalistic innovation. If you would like to learn more or are interested in using 100eyes for a journalistic project, please contact us at https://tactile.news/.

Installation

Development

For development purposes, you can set up 100eyes using Docker. To perform the following steps, Docker (including Docker Compose) must be installed on your computer. You can find installation instructions for this in the Docker Documentation. You will also need git to clone this repository.

  1. Clone the repository

    Clone this repository. You can either use a git client with a graphical interface or use git directly from the command line:

    $ git clone https://github.com/tactilenews/100eyes.git
  2. Building containers

    Change to the 100eyes directory and build the Docker containers using Docker Compose:

    $ cd ~/100eyes
    $ docker compose build
  3. Configuration

    100eyes is based on some services, e.g. for sending and receiving e-mails and Telegram messages. You can set sensitive information such as API keys or passwords using environment variables. To do this, it is best to copy the template provided for this purpose:

    $ cp .env.template .env

    Edit the new .env file and add API keys and other secrets there. This file .env is ignored by git.

  4. Create, migrate, seed database

    The database is not set up in the steps above because it is a one-time task, whereas building and starting the services should be reproducible. Setup the database with:

    $ docker compose run app rails db:setup
  5. Start container

    You can start all containers with a single command. 100eyes can then be viewed in your browser at http://localhost:3000.

    $ docker compose up

Run the tests

In Github Actions, we run the tests with the local environment because setting up the containers and running them there is more expensive in terms of time. You can run the tests in the containers, if you don't want to get set up locally with:

$ docker compose exec app bundle exec rspec

NOTE: You should expect the spec/jobs/signal_adapter to have failures since we recorded VCR cassettes from a local env not a containerized one.

Messengers

To test out webhooks for Postmark, Telegram or Threema you could use ngrok or a similar tool like localtunnel. We recommend localtunnel as it is free and open-source software.

We're using our own fork of the threema gem. If you want to make changes to the gem locally, clone the repository and configure bundler like this:

# in the folder where you cloned `threema` repository
bundle config local.threema .

Telegram

To test out Telegram webhooks, you need to first set the webhook. You can do this like so:

Telegram.bots_config
{ <key>: <Telegram::Bot::Client> }
bot = Telegram.bots[<key_of_bot>]
bot.set_webhook(url: 'https://<localtunnel>/telegram/<route-to-telegram-bot>')

See this blog post for more information.

Testing

To run tests in a Docker container, you can run:

$ docker compose exec -it app bash
$ RAILS_ENV=test rspec

Production

100eyes is a relatively simple Ruby on Rails (RoR) application and consists of the application server and a background worker to receive incoming Telegram messages.

Funding

The Medieninnovationszentrum Babelsberg supported the development of additional modules.

License

100eyes is developed by tactile.news and is licensed under the MIT license. The development of 100eyes was funded by the Prototype Fund from the Bundesministerium für Bildung und Forschung.