The main aim of this project is to list and map spots (places of interest and activities) of a region, such as the city of Yverdon-les-Bains (Switzerland).
This project is composed by a Ruby on Rails 6.0+ application with a responsive mobile part and an administration Web part.
The application is currently deployed on Heroku. To access the administration Web part, please use the following link. The application is tested through unit and system tests with Travis CI to run the tests and Coveralls to check the coverage of the tests.
Here are the main characteristics of the application:
- The administration Web part of the application allows to manage spots, categories of spots, lambda users and admin users. The administration Web part of the application was developed with Active Admin.
- The non-administration Web part of the application was developed to be responsive with Bulma. This part has several functionalities:
- Spots can be previewed through a list with images that are stored on Amazon S3 and a Leaflet map. Moreover, it is possible to select spots of a specific category, such as the gastronomy category and to read more details about a specific spot by selecting it in the list or in the map.
- Anybody has the possibility to create a user account with a pseudo, email and password and login in order to suggest new places of interest and activities through a form.
- The application is entirely multilingual (interfaces and database). Currently two languages are proposed: English (default language) and French.
- Ruby 2.6.5
- PostgreSQL 12.2+
- PostGIS 3.0+
- Yarn 1.22+
- Git to access and manage the code
- Chrome to run system tests
Tip: Use rbenv or RVM with Ubuntu for instance.
Here are the main steps to quickly set up the machine in order to locally run this application:
- Install Ruby with ruby-build for instance, PostgreSQL, PostGIS, Yarn, Git and Chrome
- Download the code from this page or by the command line
git clone https://github.com/saraheig/spot.git - Install the dependencies with Yarn with
cd spotand thenyarn install - Install bundler with
gem install bundler - Install the Ruby gems with
bundle install - Start PostgreSQL with
sudo service postgresql start - Create the database with
rails db:create(If necessary, create a user withsudo -u postgres createuser --superuser YourName) - Connect to the database spot_development and enable PostGIS with
psql -d spot_developmentand thenCREATE EXTENSION postgis; - Migrate the database with
rails db:migrate - Populate the database with
rails db:seed - Launch the application with
rails serverand open a browser at http://localhost:3000 or http://localhost:3000/admin (Email: admin@example.com - Password: password) for instance
- To locally execute the tests, run
rails testandrails test:system. - To write or modify code, the Atom text editor can for instance be used.
- To access to the local database, run
rails console. - Here is the model of the database: Conceptual model.
June 2020 / MAS-RAD formation