Skip to content

REST api, built on top of Parse Server on Docker. Allows creation of Clients, Providers and Shippings. And is integrated with Xubio

License

Notifications You must be signed in to change notification settings

nayracoop/courier-admin-api

Repository files navigation

Courier Admin API (built on top of Parse Server)

Parse Server with cloud functions. Has Docker support to run it with a containerized Mongo database and Parse Dashboard.

It's ment to be used in conjunction with the Courier Admin Dashboard.

Configuration

Configuration values, either to run the API with Docker or locally (E.g.: for ease of debug) must be placed in a .env file. You may use .env-example as base.

.env file is used by dotenv module to fill Node environment variables and with placeholders in the docker-compose.yml file.

Keys for different ports are included for Mongo, Parse Server and Parse Dashboard to be used on Docker containers. *_PORT references the port inside the container and *_LOCAL_PORT on the host machine.

Syncronization with Xubio

Xubio is an online commercial management tool. New records created for Clients and Providers on the Courier Admin Dashboard are automatically syncronized with Xubio, by using Parse Server's Cloud Functions. Creation of budgets and purchase orders are also supported using Cloud Functions, stored in the cloud folder

To configure it:

  • You'd need a PLUS or + subscription to use Xubio's API.
  • Once there, get your API keys from the integrations page
  • Client_id and Secret_id are to be used on their corresponding .env keys: XUBIO_CLIENT_ID and XUBIO_SECRET respectivelly. Check .env-example for an .env base.

Parse Server

The API is built on top of Parse Server. You may find example configuration values for your .env file as PARSE_SERVER_* keys in the .env-example.

Parse Dashboard

docker-compose.yml includes a Parse Dashboard entry. You may find example configuration values for your .env file as PARSE_DASHBOARD_* keys in the .env-example.

Values from PARSE_USER1 and PARSE_USER1_PASSWORD from your .env file, are used to create user and password respectivelly to access Parse Dashboard.

Mongo DB

Database is configured using MONGODB_URI key and DB_* keys. Please check .env-example for examples.

UPS

Communication with UPS was planified but not implemented and it's not in our immediate plans to continue with it. UPS_ keys for that integration still remain in the .env-example.

Development

Install

  • Clone and run npm install
  • Clone, configure and run the Courier Admin Dashboard to have a working client for the API.

Use

  • In the configuration entry above you'll find details on how to complete your .env file.
  • Serve with nodemon using npm run dev

Database migrations

  • Migrations can be placed in /tasks/migrations folder. To run them using Jake (and to run the initial migration, which works as example/template, and creates users), you may run npm run migrations

Use with Docker Compose

  • If you've got Docker and the docker-compose CLI installed, you may run docker-compose up to get a working API, Parse Server, Parse Dashboard and Mongo DB running. For more details check the docker-compose.yml file and the docker-compose documentation.

License

license GNU General Public License v3.0 GNU General Public License v3.0

About

REST api, built on top of Parse Server on Docker. Allows creation of Clients, Providers and Shippings. And is integrated with Xubio

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published