My wife loved the idea of the San Jose Sharks puck scavenger hunt, and I was looking for an excuse to try out React Native, so I built a little app where we could create our own scavenger hunt.
Here's what the app looks like when you're on the scavenger hunt
To setup the scavenger hunt I put iBeacons on the pucks before hiding them, and then I used the admin interface in the app to save the GPS coordinates of each puck.
(Admin) Hiding a puck | (Admin) Overview |
---|---|
The backend server used for storing puck locations is built with Node.js and uses PostgreSQL as the database
- Running a local PostgreSQL w/ docker-compose
-
Prerequisites: You'll need to have docker-compose installed
-
cd
into theserver
directory -
Start the local PostgreSQL instance by running
docker-compose up
, and then wait for PostgreSQL to start -
First time setup only: In a new shell, run the following command to setup the database schema and load some mock data
docker cp db_setup.sql server_postgres_1:/home/db_setup.sql && docker exec -e PGPASSWORD=postgres server_postgres_1 psql -U postgres -f /home/db_setup.sql postgres
-
- Running the API server locally
- Prerequisites: You'll need to have Node.js 7+ and Yarn installed
cd
into theserver
directory- First time setup only: Run
yarn
to install dependencies - Run
yarn run app
to start the API server onlocalhost:8080
- Prerequisites: You'll need to have Node.js 7+, Yarn and Xcode installed
cd
into thePuckHunt
directory- Run
yarn run app