Coder Social home page Coder Social logo

addressmanager's Introduction

Address Manager

Address Manager is a micro-service built with Vapor, a server-side Swift framework. It is designed for storing and validating international address data.

Setup

Start by forking and cloning the Address Manager repository. There are a few prerequisites you will need before you can run it.

MySQL

The AddressManager project uses a MySQL database to store the address information. You can change this to Postgres (or any other database) if you want, but we won't be covering that now.

If you haen't installed MySQL yet, do that now. If you are running macOS, Homebrew is a great way to do that:

brew install mysql
brew services start mysql
mysql -u root

In the MySQL command prompt, we will set the password for MySQL and create the databse that AddressManager connects to:

ALTER USER root IDENTIFIED BY 'password';
CREATE DATABASE address_manager;

SmartyStreet API

The default address validator and parser uses the SmartyStreet API to get location information based on the address passed to the service. If you want to use the validator/parser, you will need an API ID and token for the API. Otherwise you can implement your own validator.

Once you have the API keys, you can assign them to the SMARTY_STREET_API_TOKEN and SMARTY_STREET_API_ID environment variables. If you signed up for the internation address API, you can set the ADDRESS_SUPPORT_INTERNATIONAL variable to true to enable international validation and parsing.

Done

You're all setup! You should be able to run the service without issues now!

API Documentation

The REST API documentation has been generated from the Postman collection in the repository and has been published here.

License

The Address Manager service is under the MIT License agreement.

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.