Backend application for creating and managing places/POIs (or in german "Orte"), formatted text and assets like images, audio and video on a web-based map. Additionally relations between places can be set. Output is a public available API w/JSON or exportable as CSV/JSON/GeoJSON data. It has also some extra features like visualising relations between places and a map to go feature (see below).
Based on Ruby on Rails 6.1, Ruby 3, MySQL/MariaDB, jQuery, Leaflet and Foundation 6.
Contributions to this application are appreciated (see below).
This application uses Nominatim, a search engine for OpenStreetMap data to look up address and geolocation data. By implementing this application you should respect the Nominatim Usage Policy!
ORTE Backend ist basically a backend which provides JSON and GeoJSON export of its layers and map. Since version 0.7 offers a "map to go" feature, where user can generate a static, Nuxt.js based website from their single layer (and its places) and place this site on their webspace. So you can get your frontend website and all defined data directly out of the application.
Basic steps for a local installation on your machine:
- Ruby 3.3+, RVM, Rubygems
- MySQL/Maria DB
- ffmpeg (for the video feature), ImageMagick (for the image feature)
- Redis
Additional requirements for production
- Webserver (e.g. Apache or NGINX)
- Passenger stand-alone
$ git clone [email protected]:a-thousand-channels/ORTE-backend.git
$ gem install bundler
$ bundle install
$ sudo mysql -u root
> CREATE USER 'orte'@'localhost' IDENTIFIED BY 'orte00';
> GRANT ALL PRIVILEGES ON *.* TO 'orte'@'localhost';
> CREATE DATABASE orte CHARACTER SET utf8 COLLATE utf8_general_ci;
> CREATE DATABASE orte_test CHARACTER SET utf8 COLLATE utf8_general_ci;
> exit;
$ bundle exec rails db:schema:load
$ bundle exec rails db:seed
Some settings (like email settings or database setup) you'll need for productive installation on a server are stored in the credential file.
Edit the credential file with
$ EDITOR=vim bundle exec rails credentials:edit
All used and needed variables are explained in the credentials.yml.default file.
To use this in different environments, with development and installations for staging or production server you can use the multi-environment credentials that came with Rails 6.1.
To create/edit a specific credential file for staging use:
$ EDITOR=vim bundle exec rails credentials:edit --environment staging
For details on this technique please read this good explainer about credentials in Rails 6.1
Also edit settings.yml to define your custom server address.
As a default at ORTE, satellite imagery is used as a base layer. This imagery is available only up to level 18. If you want to have satellite imagery on a higher zoom level (19-21), where you can more clearly see details on streets, places and buildings, than you have to define an additional satellite imagery provider. ORTE has as a preset for Mapbox satellite imagery, but to use it, you need to have a Mapbox account and to generate a Mapbox API Token. (Of course this completely optional, and you switch on user level or permant on map level to a OSM base map.)
You can define your mapbox token in the credentials (token[:mapbox])
$ bundle exec rails s
$ RAILS_ENV=test bundle exec rails db:migrate
$ RAILS_ENV=test COVERAGE=true bundle exec rspec spec
Project by A thousand channels, initiated by Ulf Treger with kind support by and in collaboration with:
- Pragma Shift, Hamburg, for initial code donation,
- Treffentotal 2018, Hamburg (first use public case with a map at map.treffentotal.de, which gets its geolocations from ORTE backend via JSON),
- Participants of workshops of city/data/explosion at Kunst- und Kulturverein Spedition, Bremen,
- Members of the working group "Queer narratives, mappped" 💖 for acceptance testing, ideas and requests for improving the user interface and the maps.
- Sandbostel Camp Memorial for the public submission interface and to Sefux for coding it.
- There is a fork by Leerstandsmeldungen with PostgreSQL and Pundit Gem for a more sophisticated model of authorization and roles.
Feedback, bug reports and code contributions are most welcome.
Send Feedback to [email protected]
Please file bug reports and feature request to our Github Repository at https://github.com/a-thousand-channels/ORTE-backend
For code contributions, please fork this repo, make a branch, commit your code & create a pull request.
All contributors shall respect the Contributor Covenant Code of Conduct
This project is licensed under a GNU General Public Licence v3