Skip to content

A payment infastructure that helps businesses handle crypto transactions

License

Notifications You must be signed in to change notification settings

princecodes247/KamePay--Backend

Repository files navigation

Isabi API🛡️

Development

We would use node version 14.9.0

The first time, you will need to run

npm install

Then just start the server with

npm run start

It uses nodemon for livereloading :peace-fingers:

API Validation

By using celebrate, the req.body schema becomes cleary defined at route level, so even frontend devs can read what an API endpoint expects without needing to write documentation that can get outdated quickly.

route.post(
  '/signup',
  celebrate({
    body: Joi.object({
      name: Joi.string().required(),
      email: Joi.string().required(),
      password: Joi.string().required(),
    }),
  }),
  controller.signup
);

Example error

{
  "errors": {
    "message": "child \"email\" fails because [\"email\" is required]"
  }
}

Read more about celebrate here and the Joi validation API

Setup

  • Error Handling
  • Change Authentication to HTTP-only cookies
  • Unit tests examples
  • Setup Events
  • Basic Service setup
  • Basic Controller setup
  • CRUD service class to extend with Pagination functionality
  • Decide route name convention
  • Create models array
  • Rewrite Subscribers
  • Add agenda dashboard
  • Continuous integration with CircleCI 😍
  • Deploys script and docs for Heroku, Render
  • Integration test with newman 😉

Roadmap

  • Setup
  • Create user services and accompanying tests
  • Create game service
  • [x]

API Documentation

Postman would be used for the API Documentation. I'll search for an integration and implement it

'no-underscore-dangle': ['error', { allow: ['_place'] }],s

About

A payment infastructure that helps businesses handle crypto transactions

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published