Coder Social home page Coder Social logo

dealership-finder's Introduction

Dealership Finder

You can view on Heroku here. Note: The "Search" button doesn't work on the production environment - the environment variable containing the Google API key isn't configured correctly / compiling into the source. It does work correctly when using locally.

Installation

You'll need to rename .env.example to .env. The application uses the Google Geocoding API to determine lat/lng coordinates from a given address, so you'll need to register for the Geocoding API and copy your key into the .env file. This key should be URL restricted, as it will show in the compiled source.

git clone git@github.com:joestephens/dealership-finder.git
cd dealership-finder
npm install
npm start

To view the component library:

npx styleguidist server

Approach

I decided on create-react-app as time was restricted and I wanted to spend the time writing code, not configuring Webpack, Babel, dotenv etc.

Then when I had the basic boilerplate set up, I installed react-styleguidist. This acted as a sandbox for developing new components, with the added benefit of documentation.

Once I had coded some basic components and the Location Picker, I brought these together in a StepOne component. StepOne is responsible for the latitude/longitude state - I made it the responsibility of its parent component App to look after the state for the selected dealership, as this would later need to be passed into a StepTwo component.

All notifications to the user are handled by react-toastify - this was a time saving decision allowing me to focus on more important app functionality.

Lat/lng is logged out to the console to demonstrate capability, as the mock dealership data presented doesn't use this in any way.

To Do

  • Fix environment variable on Heroku
  • "CONTINUE TO NEXT STEP" button and behaviour
  • Tests for existing components
  • Add a map to StepOne
  • Select component
  • SelectedDealership component
  • CheckboxGroup component
  • StepTwo form and Axios post request
  • Media queries for desktop view

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.