raytraina / pokeseepokedo

Pokésee Pokédo, a demo companion app for Pokémon GO from Summer 2016

Home Page:https://pokeseepokedo.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pokésee Pokédo

👉 VIEW DEMO 👈

Pokésee Pokédo is a companion application for Pokémon GO which allows users to plan an optimized route for catching Pokémon, while visiting local points of interest and having fun with friends. Users enter a start point, an end point, desired activity, and desired departure time and the app returns the ideal route to take based on Google Maps data. As the user traverses zir path, Pokémon can be marked as “caught" and added to zir collection of Pokémon, which can later be accessed from the user’s profile page.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for further development, exploration and testing.

Prerequisites

Before you begin, be sure to install all requirements within a virtual environment. To learn more about Python's virtualenv tool, read the documentation.

Initiate a virtualenv:

$ virtualenv venv

Source the virtualenv:

$ source venv/bin/activate

Install requirements:

(venv)$ pip install -r requirements.txt

Create a Postgres database named pokeseedo, build the model, and seed the data:

(venv)$ createdb pokeseedo
(venv)$ python model.py
(venv)$ python seed.py

Then, run the application with python server.py:

(venv)$ python server.py
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
 * Restarting with stat

You should see similar success messages in the console. If you have any issues getting up and running, please contact the author on Twitter @designsbytraina, or via email.

Running Demo

Once it is up and running on your local machine, continue to run the demo freely, paying particular attention to the below pages.

Let's GO

Users can enter a start and end point, desired activity, and departure time for zir Pokémon catching trip. Upon submission, an AJAX request is made to the server, where a query is made to the database for seed data and returns JSON to the front-end.

homepage

The parsed JSON is then passed to the Google Maps API where latitude/longitude objects are created and processed as either waypoints or markers on the map.

rendered map

Walking directions are rendered below the map.

Gotta Catch 'Em All

By clicking on any returned Pokémon, an info window displays with some details about it, including nature, type, height and weight. Within this window, users can mark Pokémon as caught by clicking the "gotcha" button.

pokemon information

On click, the Pokémon ID is added to the user's session and zie is brought to a page which displays all Pokémon caught.

caught page

Join In

Users can save caught Pokémon when logged in or logged out, but the only way to save those Pokémon to zir user profile is to create an account.

registration page

Registration is handled by submitting an AJAX post request to the server, where the data is processed, a new user is created, and is then added to the database.

Running Tests

The development of this application includes testing features interactively before implementation. Integration tests for all endpoints have also been included and details for running are below.

Integration Testing

Endpoints defined in Flask can be tested by running the test file:

$ (venv) python test_server.py

Test Coverage

The current percentage of test coverage can be calculated using these steps, as long as the python coverage module has already been installed. For more details on installation and usage, read the documentation.

To begin, simply run coverage on the test file:

$ (venv) coverage run test_server.py
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
 * Restarting with stat

Now it is possible to access the report in the console with:

$ (venv) coverage report -m
Name              Stmts   Miss   Cover
----------------------------------------
model.py           75      3      96%
server.py          99      43     57%
test_server.py     66      3      95%

Note: The above figures represent the test coverage as of September 6, 2016.

It is also possible to view in alternate formats. Please refer to the coverage documentation for more options.

General Information

Technologies Used

Authors

Rachel Traina-Grandon | @designsbytraina

Future Development

No future development or maintenance for this application is scheduled.

Deployment

This application has been deployed on Heroku.

Permissions

Contact the author for permissions.

Acknowledgments
  • Tomas Gonzalez
  • Colin Rigby
  • Hackbright Academy

About

Pokésee Pokédo, a demo companion app for Pokémon GO from Summer 2016

https://pokeseepokedo.herokuapp.com/


Languages

Language:HTML 50.6%Language:Python 48.1%Language:CSS 1.3%