Well, it's not a very original idea, isn't it?
During one of the last few courses of our Bachelor’s Degree, two colleagues of mine (Luca Ferrera, Daniele Paliotta) and I decided to develop a platform that would have allowed us to play with some interesting stuff, like Ruby on Rails, Vue.js, Google API and so on, and mix them to give birth to a not-so-original webapp. Seriously, the idea could give the reader the impression we’re not so fancy… and that’s exactly right.
We had the wish to deploy it to Heroku, but then we discovered that our laziness was waaaay worse than what we thought, so you have to proceed with a manual installation. First of all, clone the repo we open-sourced on Github and make sure you satisfy the following requirements:
- ruby v2.5.1 (or higher)
- rails v5.2.0 (or higher)
- yarn v1.7.0 (or higher)
Once you’re done, you can move inside the repository and launch
yarn install on both the root directory and the
src/ directory. Now it’s time to install the gems the application needs to run appropriately: just use
bundle install in the
src/ directory and let bundler do all the tough work for ya.
We also included a
Makefile to ease the management of databases and to run a bunch of specific tasks.
Run the app
Once you’re done with the whole setup, you can start the server and the webpacker using
foreman start1. We tested the application respectively on Xubuntu 18.04, LXLE Linux and MacOS, but it should also work for other Unix-like environments, even on Windows Subsystem for Linux. It has not been tested on a Windows platform.
Go to localhost:3000 to enjoy the magic!
We tested the ecosystem using cucumber, in particular one gem that is specific for Rails, and you can reproduce them with the
rake cucumber command. Since our app heavily relies on the exchange of JSON messages, we made large use of httparty2.
Here follows a list of very useful gems we used throughout the development of Landmark Challenge and their respective scope:
- devise_token_auth: user and admin authentication based on token (and not on session like in standard devise)
- omniauth: simple integration for OAuth providers (Google and Github)
- mailcatcher: an SMTP server used in development to work with emails
- colorize: a friendly gem to make console output more human-readable
- httparty, cucumber-rails, database_cleaner: for acceptance tests described above
Thank God APIs exist. What was the world like before? Here they are:
- Sendgrid: to send formatted emails to the users subscribed to the service
- Google Maps: to show the user where landmarks are geographically located
- Google Cloud Vision: to recognize in a reasonable amount of time a specific monument or landmark