Git Product home page Git Product logo

zipcodes-distance's Introduction

Contributors Forks Stargazers Issues MIT License LinkedIn


Zip Code Distance Calculator

Sample Laravel app that calculates distances between a list of zip codes (IEL-SE-2)
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

This project is mostly just a refresher for my knowledge of Laravel. It is an assessment assigned by a potential employer with a specific set of instructions. Ultimately, it takes a list of ZIP codes entered by the user and displays the total distance between each those ZIP codes in kilometers.

(back to top)

Built With

(back to top)

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Before installing, make sure you have a full development environment installed. For Windows, I tend to prefer Laragon. It will make sure you have Apache, Nginx, MySQL, and PHP installed. Follow the instructions on their site to install it.

You will also need Node.js with npm installed as well as Composer. For Node.js, my favorite installer for Windows and WSL is nvs. Follow the instructions there to get it installed on your machine. For Composer, follow their official instructions as well.

If you already have Node.js installed, please make sure that your copy of npm is up-to-date.

  • npm
    npm install npm@latest -g

Installation

  1. Clone the repo
    git clone https://github.com/SturmB/zipcodes-distance.git
  2. Install NPM packages
    npm install
  3. Make a working copy of .env
    cp .env.example .env
  4. Modify the DB_* entries in .env to reflect your MySQL installation
  5. Run a migration
    php artisan migrate
  6. Visit the local web page based on your dev environment. If you're using Laragon, it is likely http://zipcodes-distance.local/, but it may also be http://localhost/ or some variation. Check the documentation.

(back to top)

Usage

This app is simple enough to be fairly self-explanatory. You enter ZIP codes using the input on the left (or on the top, for smaller screens) and they will appear on the list to the right (or bottom, for smaller screens). Once two or more ZIP codes have been entered, their total distances appear above the list of ZIP codes. You can keep adding more ZIP codes for as long as you like.

To start with a fresh list of ZIP codes, press the "Start Over" button below the input area. Otherwise, the ZIP code list and distance will persist until you close that browser tab/window.

(back to top)

Roadmap

  • Test for more possible errors
  • Add screenshots to documentation
  • See if ZIP code list expands as expected

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the ISC License. See LICENSE.txt for more information.

(back to top)

Contact

Your Name - @SturmB - [email protected]

Project Link: https://github.com/SturmB/zipcodes-distance

(back to top)

Acknowledgments

  • Othneil Drew for the excellent README template
  • Licenses for the excellent LICENSE template
  • This SO Answer for an excellent implementation of the Haversine formula in PHP

(back to top)

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.