Inspiration

"What am I going to eat today?" you refresh Google Map again and again for restaurants nearby, but still can't decide, and your friends' "whatever" is not helping you to choose.

Our adorable Franklin is here to spin a wheel and decide for you!

What it does

Our cute Franklin will spin a wheel and decide a nearby restaurant to end your indecisiveness.

Franklin is also your thoughtful friend, though, who will consider your preferences when spinning the wheel. For example, if you really don't like one of Franklin's suggestions, you can click the dice to re-roll the location. But be careful, Franklin only lets you do this once!

Of course, randomness also aids you to know what you really want. While Franklin is jumping around, you will most likely figure out what you actually want to eat. :P

How we built it

Overall, Franklin decides integrated with Google Maps API, which enables us to fetch nearby restaurants and decide based on your preferences.

The back-end is responsible for fetching near-by eating places from Google Maps API, and send the result to the front end. We also used parallelism and concurrency to quicken our request to the Google map server, here's an example:

async def findplaces(lat, lng):
        async with aiohttp.ClientSession() as session:
                url = 'https://maps.googleapis.com/maps/api/place/nearbysearch/json'
                params = {
                        'key': API_KEY,
                        'location': f'{lat},{lng}',
                        'rankby': 'distance',
                        'type': 'restaurant',
                        'opennow': 'true'

                }

By loading two requests concurrently, we improved the speed by 4 times.

The front-end uses AngularJS with in-house CSS styling and animations. It uses HTML5's canvas to draw and animate the spinner.

Share this project:
×

Updates