All Projects → railslove → rcvr-api

railslove / rcvr-api

Licence: AGPL-3.0 license
Recover Cologne Api, kneipen kontakt tracer. recover provides localities a privacy-compliant, safe, and easy way for their guests to check in. See https://www.recoverapp.de/ for more details.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to rcvr-api

rcvr-app
recover provides localities a privacy-compliant, safe, and easy way for their guests to check in. See https://www.recoverapp.de/ for more details.
Stars: ✭ 43 (+207.14%)
Mutual labels:  corona, recover, coronavirus-tracking, covid19, contact-tracing, rcvr
Api
API for Current cases and more stuff about COVID-19 and Influenza
Stars: ✭ 2,323 (+16492.86%)
Mutual labels:  corona, coronavirus-tracking, covid19
coronainfobd
Real-time corona-virus tracker of Bangladesh 🇧🇩 which includes latest updates, data visualization, public awareness from WHO and some advice to aware people. 🥰❤
Stars: ✭ 46 (+228.57%)
Mutual labels:  corona, coronavirus-tracking, covid19
COVID19
A web app to display the live graphical state-wise reported corona cases in India so far. It also shows the latest news for COVID-19. Stay Home, Stay Safe!
Stars: ✭ 122 (+771.43%)
Mutual labels:  corona, coronavirus-tracking, covid19
corona-jena
Erfassung und Visualisierung der Corona-Fallzahlen für Thüringen.
Stars: ✭ 13 (-7.14%)
Mutual labels:  corona, coronavirus-tracking, covid19
COVID-19-DETECTION
Detect Covid-19 with Chest X-Ray Data
Stars: ✭ 43 (+207.14%)
Mutual labels:  corona, coronavirus-tracking, covid19
CoronaVirusOutbreakAPI
A tiny and small program to crawler and analyze outbreak of COVID-19 in world and every country using PHP.
Stars: ✭ 20 (+42.86%)
Mutual labels:  corona, coronavirus-tracking, covid19
covid-19
A web application to display Coronavirus Diseases (COVID19) statistics from different countries.
Stars: ✭ 28 (+100%)
Mutual labels:  corona, covid19
covid19-timeseries
Covid19 timeseries data store
Stars: ✭ 38 (+171.43%)
Mutual labels:  corona, covid19
COVID-19-STAT
A web application to keep track of COVID-19 numbers & growth across the world
Stars: ✭ 19 (+35.71%)
Mutual labels:  corona, coronavirus-tracking
coviddata
Daily COVID-19 statistics by country, region, and city
Stars: ✭ 49 (+250%)
Mutual labels:  coronavirus-tracking, covid19
covid-19
An app made with Flutter to track COVID-19 case counts.
Stars: ✭ 47 (+235.71%)
Mutual labels:  coronavirus-tracking, covid19
ctt
Corona Tracker Tracker Dashboard for the German Corona-Tracing-app
Stars: ✭ 15 (+7.14%)
Mutual labels:  coronavirus-tracking, covid19
covid19-cli
A CLI for getting covid-19 coronavirus status of your district or state or country at lightning speed right on your terminal built using https://api.covid19india.org.
Stars: ✭ 19 (+35.71%)
Mutual labels:  coronavirus-tracking, covid19
CoronaCord
Discord bot that displays the latest coronavirus statistics. Currently serving over 5,000 communities on Discord.
Stars: ✭ 23 (+64.29%)
Mutual labels:  coronavirus-tracking, covid19
Covid-19 Ampel
Covid-19_Ampel | Zeigt neben der 7-Tage-Inzidenz weitere Infos zu einer Region.
Stars: ✭ 33 (+135.71%)
Mutual labels:  corona, covid19
covidtrackerapiwrapper
CovidSharp is a crossplatform C# API wrapper for the Coronavirus tracking API (https://github.com/ExpDev07/coronavirus-tracker-api)
Stars: ✭ 11 (-21.43%)
Mutual labels:  coronavirus-tracking, covid19
dka
Statistische Analyse und Visualisierung der täglichen Diagnoseschlüssel der deutschen COVID-19 Tracing-App (Corona-Warn-App).
Stars: ✭ 93 (+564.29%)
Mutual labels:  corona, covid19
cli-corona
📈 Track COVID-19 (2019 novel Coronavirus) statistics via the command line.
Stars: ✭ 14 (+0%)
Mutual labels:  corona, covid19
covid-br
COVID dashboard status from Brazil.
Stars: ✭ 28 (+100%)
Mutual labels:  corona, covid19

rcvr.app

Backend for the recoverapp.de. You can find the client app here github.com/railslove/rcvr-app – a product by Railslove

Recoverapp: Backlog

Intro

Due to COVID-19, many localities, like bars and restaurants, must keep track of their guest. So, in the case of infection, the public health department can trace contact persons using this data.

The German government suggested a very old-school way on how to achieve this. Owners should put a printed document on each table, and guests have to write down their data with a pen, visible to everyone.

We know we can do better. Those lists are annoying for everyone, and especially a big privacy concern.

With recover, guests scan a QR Code with their phone and enter their contact details, which will be encrypted on their device and stored on our server. Only the business owner can decrypt this data, and only when the public health department requests it.

How does recoverapp.de work?

When an owner signs up, a key pair will be generated on their device. The owner needs to safely store the private key by saving it inside a password manager or writing it on a piece of paper and putting it in a physical safe. This private key is required to decrypt the data of the guests.

The public part of this key pair is embedded inside the QR Code, together with a unique identifier for each table.

When the public health department requests data for a specific time range from an owner, we will send them the guest's encrypted data from this period. The owner can then decrypt this data using his private key and send it to the public health department.

When a guest checks in, a random ID will be saved on the guest's device. recover will provide a public feed of all check-in IDs in danger of a COVID-19 infection. The IDs can be public because they cannot be traced back to a person. Only the guest's device knows if one of the stored IDs is also inside this public feed. If this is the case, we can notify the guest of the potential infection.

Background

recover was initially developed during one weekend. We noticed the urgency and needs of business owners and wanted to provide a solution. A special thanks goes to everyone who helped and consulted us to achieve our goal in this short amount of time.

Development Setup

To get a development environment up and running ensure your development system has the following components:

  • docker
  • docker-compose
  • ruby 2.7
  • bundler (for ruby)
  • basic C build tools (base-devel, build-essential or whatever your system calls these)
  • eventually: postgres development headers

Then execute:

bundler
echo "DATABASE_URL=postgres://postgres:[email protected]:5432/rcvr_api_development" >> .env.local
docker-compose up -d # will start database in the background
rails db:setup RAILS_ENV=development
rails server

The example above uses a docker-compose file to locally run redis and postgres, but it is not required. Alternatively use your own setup.

Install rcvr-app frontend: https://github.com/railslove/rcvr-app

Create a frontend entry in your postgres database:

docker-compose exec postgres psql -U postgres
postgres=# \connect rcvr_api_development
rcvr_api_development=# insert into frontends (name, url) values('App-Local', 'http://localhost:3333');

Your port might vary depending on your set up (see rcvr-app README).

You should also update the frontend .env.local to match your backends local url:

NEXT_PUBLIC_API_BASE=http://api.localhost:3000

for local development the http://api. prefix is mandatory

Deployment

  • origin/master deploys to production on push
  • All pushed branches will create a preview deployment

Secrets

We do not use rails credentials in favor of dotenv. You can find the variables that you might want to set in the .env file.

Stripe

Dont forget to set all four stripe related environment variables (see .env). For trying out payment related things you might want to setup webhooks to work locally with stripe (similar to ngrok), if your server runs on localhost:3000:

stripe listen --forward-to localhost:3000/stripe-webhooks

And to trigger test events:

stripe trigger customer.subscription.updated

Known challenges

Change of active storage record_id to :uuid type

In the process some models primary keys were changed to type :uuid. As a result the foreign key relation for active storage (record_id) was changed accordingly.

When we added another active storage relation to a non uuid model (Affiliate), we ran into a runtime exception in Rails Admin because we were trying to link a bigint to a uuid.

This means models with active storage relations must use :uuid as id (Example: Affiliate).

License

rcvr.api is open-source and free software released under the GNU AGPL (GNU Affero General Public License v3.0). We, Railslove GmbH, are committed to ensuring that it will remain a free and open-source project.


Made with 💚 in Cologne

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].