Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/SwiftCommerce/AddressManager
A Vapor micro-service to store address information
https://github.com/SwiftCommerce/AddressManager
Last synced: 4 months ago
JSON representation
A Vapor micro-service to store address information
- Host: GitHub
- URL: https://github.com/SwiftCommerce/AddressManager
- Owner: SwiftCommerce
- License: mit
- Created: 2019-03-06T18:32:39.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-29T12:53:17.000Z (almost 6 years ago)
- Last Synced: 2024-07-05T16:10:37.453Z (8 months ago)
- Language: Swift
- Size: 210 KB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Address Manager
Address Manager is a micro-service built with [Vapor](https://vapor.codes/), 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](https://brew.sh/) is a great way to do that:
```sh
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:
```mysql
ALTER USER root IDENTIFIED BY 'password';
CREATE DATABASE address_manager;
```#### SmartyStreet API
The default address validator and parser uses the [SmartyStreet API](https://smartystreets.com) 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](https://documenter.getpostman.com/view/1912959/S17jWrqA).
# License
The Address Manager service is under the [MIT License agreement](https://github.com/SwiftCommerce/AddressManager/blob/master/LICENSE).