On Github dimartio / dimartio.github.io
Isaac Obradors @isaacObradors, Carlos Person @carlos_person, Ignacio Contreras @igncc and Christine Doig @ch_doig
Unity Vuforia
Leaderboard
require 'sinatra/base' module Dimartio class App < Sinatra::Base set :root, File.dirname(__FILE__) set :views, 'views' require_relative 'models/init' require_relative 'routes/init' end end
Ruby powered backend
Sinatra module
module Dimartio module Routes class Buildings < Base helpers do def set_building @building = Models::Building.get params[:id] halt 404 if @building.nil? end def set_buildings @buildings = Models::Building.all end end get '/buildings' do set_buildings @buildings.map {|b| b.to_public_hash}.to_json end put '/buildings' do building = Models::Building.create params halt 500 unless building.saved? end get '/buildings/:id' do set_building @building.to_public_hash.to_json end patch '/buildings/:id' do set_building success = @building.update params halt 500 unless success end end end end
module Dimartio module Models class Building include DataMapper::Resource include Models::Mixins::TimeFields include Models::Mixins::Hashable property :description, Text property :data, Json belongs_to :user, key: true, child_key: [:user_id] belongs_to :place, key: true, child_key: [:place_id] def self.create params secure_params = { user_id: params['user_id'], place_id: params['place_id'], description: params['description'] } super secure_params end def update params secure_params = { text: params['text'] } super secure_params end def to_public_hash to_hash :user_id, :place_id, :description, :data end end end end
Markerless tracking
GPS
Revenue: Ad-Building integration
Revenue: Premium textures