mfilenko / form3-payments

Form3 Payments API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Form3 Payments Service

Form3 service that provides a RESTful API to a payment system.

TL;DR

First start:

$ make compose

This will set up necessary infrastructure (database and networking) and bring up the service.

Use your favourite REST client to query the service on port 80 according to the Swagger specification.

For further control:

$ make {stop|start}

Teardown:

$ make decompose

Further improvements

I tried to keep it really simple and minimalistic because it supposed to be a µ-service. In case the project is intended to grow into something monolithic I would, for example, group handlers into separate packages, etc.

What I would do next:
  • Move out sample data from tests' code into separate text files
  • Better error handling, for example, through using JSON Schema for input validation
  • Embed Swagger UI as a static asset
  • Authentication & authorisation (using JWT, for example)
  • Versioning
  • Status endpoint for health check and monitoring (something like /healthz)
  • Pagination (for large responses)
  • Caching
  • Tune server timeouts if necessary

About

Form3 Payments API


Languages

Language:Go 88.6%Language:PLpgSQL 4.8%Language:Makefile 3.4%Language:Dockerfile 3.2%