Git Product home page Git Product logo

four-square's Introduction

Four Square

Web application that uses the Foursquare API to get venues based on location, preferences.

Features Implemented

  • Get the user location and show a list of available venues.
  • Decide which venues and details are relevant to the user.
  • Give the user the ability to adjust some search parameters (e.g. location, radius, venue types)
  • Locating User Location based on GeoLocation API, which can be used for receommnding places based on current location.
  • Location AutoComplete(Maps API) Feature enabled on Location field, for better UX.
  • In the Venue Details Page, the following venue details are dispalyed
    • Places similiar to venue
    • Photo of the venue
    • Google Map Location (Static Image)
    • Address of the Venue
    • Description or Website of the Venue, based on API Response
    • Stats such as Tips Count, Likes Count etc

Priority was given to code quality & architecture in general, so that implementing a new API Call or adding a new UI Component shouldn't require much additional work. After all the idea was to develop an application using FourSquare API within 5 hours. The core functional work was completed in 5 hours. As I had the freedom to develop UI/UX, I spent extra hours to shape up the UX/UI.

Here are the features I initially intended to do, but didn't do due to time constraint.

  • User Login/Registration
  • PWA - I started with manifest.json & App Icons, but dint proceed further. Reason: Priority! ๐Ÿ™‚
  • UI Testing - using Cypress.io.
  • API Testing - I've made use of Try it now option in FourSquare API which was helping in testing the JSON Response, so I've not written any API Test cases for API Testing.

Demo Videos

Light House Reports

To check the quality, performance, a11y, best practices of the application, I've used Light House. My Target was 80+ score in each area; I've achieved 90+ in all areas except PWA.

Landing Page Report

Lighthouse score: 93/100 Lighthouse score: 100/100 Lighthouse score: 94/100 Lighthouse score: 89/100 Lighthouse score: 73/100

Search-Venues Report

Lighthouse score: 96/100 Lighthouse score: 100/100 Lighthouse score: 94/100 Lighthouse score: 89/100 Lighthouse score: 73/100

Search Results Reprot

Lighthouse score: 98/100 Lighthouse score: 100/100 Lighthouse score: 94/100 Lighthouse score: 89/100 Lighthouse score: 73/100

Venue Details Report

Lighthouse score: 99/100 Lighthouse score: 100/100 Lighthouse score: 94/100 Lighthouse score: 89/100 Lighthouse score: 73/100

Overall for the time spent, I think I've produced a decent MVP to start with. ๐Ÿ™‚

Installation & Pre-requisites

1. Installation

npm install

2. Setup API Keys

Rename variables.env.sample to variables.env and update the following keys.

MAP_KEY=<Insert API Key from Google Maps>
FOUR_SQUARE_CLIENT_ID=<Insert Client Id from FourSquare>
FOUR_SQUARE_CLIENT_SECRET=<Insert Client Secret from FourSquare>

Skipping this step would cause a Type Error while rendering the pug templates.

How to run the application

npm run dev

FourSquare Endpoints Used

I've used Regular(Free Developer Version) Endpoints instead of Premium due to the cost involved.

Other APIs Used

Technology Stack

  • Front-End
    • ES6+, Sass(CSS Preprocessor), Pug Templates,
  • Back-End
    • Node, ExpressJS
  • Task Runners, Build Process & Development Workflow
    • Webpack, Prettier
  • Source Control
    • GitHub
  • IDE & Dev Tools
    • VS Code
    • LightHouse
    • Chrome Dev Tools
  • Deployment & Hosting
  • Icons Credits

FAQ

The Google Maps API key isn't working

You might have hit a limit with the API key โ€” if this is the case you need to sign up for your own API key over at https://developers.google.com/maps/documentation/javascript/usage. You will need to enable static maps for your API key.

Once you have the API key, simply place it in your variables.env file and restart.

Four Square API Quota Exceeded!

This application runs using basic version of FourSquare API for developers, which restricts the number of premium calls. If you encounter this error, Create a new set of CLIENT_ID & CLIENT_SECRET keys from Foursquare and try again.

Why not a fancy framework (React/Vue/Angular)?

Introducing React, Redux, ReduxThunk, MiddleWare would be a overkill. So Proceeded with simple ES6 using pug templates.

four-square's People

Contributors

dependabot[bot] avatar thiruppathi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

dineshviswanath

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.