This is a solution for the Timetracking Challenge from mywork.
The solution was built with Ruby on Rails and it uses SQLite for its relational database.
- Ruby 2.5.1
- Rails 5.2.2
- latitude: number
- longitude: number
- created_at: date
- comments: text
- latitude: number
- longitude: number
- radius: number
The models were tested using the Rails TestCase
You can run the test running the commands
rails test test/models/timetracking_test.rb
and
rails test test/models/geofence_test.rb
To style the app, Bootstrap was used.
Google maps API is a very complete API and it was used to display maps and get locations coords. I was also used to calculate if a timetracking is inside a geofence.
Before you run the app, replace 'MY_API_KEY' on app/views/shared/_maps.html.erb
To run the application follow the steps:
- clone the repo
git clone
- enter the project directory
cd timetracking-challenge
- install the dependencies
bundle install
- execute the migrations
rails db:migrate
- start the server
rails s
- access the ap in http://localhost:3000/timetracking