/ats-adapter-template

A template to base ATS Adapters off of.

Primary LanguageTypeScript

build

GoodTime ATS Adapter Template

A boilerplate for those looking to implement the ATS Adapter API.

The query parameters and the headers are not commented in this Adapter template. Plase check the API docs to learn more about them, since it's easier for us to maintain all the comments in one place.

Do note that the ATS Adapter API docs is the source of truth, not this adapter template! Please make sure that the template is up to date with the API docs. We will try our best to keep the two in sync, but being only human 😞 , we might miss a couple of things here and there. If you notice that this Adapter template is not in sync with the API docs, feel free to either let us know or submit a pull request--we prefer the latter.

If you have a suggestion or you're needing to make significant changes to the Adapter template, please bring it up to us (ping us on Slack, submit a PR, file an Issue, send us an email) so we know about your issues. This way, we can start thinking about ways to update the Adapter template to be as frictionless as possible.

What to implement

Under src > api, there are entities such as application, candidate, email-note, etc. Implement the methods in the various controllers for them. Observe that you can use nestjs service to make organizing and testing your code easy.

Note that the logger is available via dependency injection. See application.controller.ts for an example on how to use it.

Libraries

  • Typescript environment for building better Javascript
    • Clean Code guideline for writing great Typescript
  • Nest is a framework for building efficient, scalable Node.js server-side applications
  • Jest is a delightful JavaScript Testing Framework with a focus on simplicity.

Pre-reqs

  • Install Node v12.15.0 and NPM v6.12.0 on your machine.
  • Set GOODTIME_NPM_TOKEN env variable to a Github developer token with read package permission. This is needed to authenticate with Github's package server.

Running Locally

  • Run in command line:
    $ npm i
    $ npm run dev

Linting

  • Check types and run ESLint with:
    $ npm run lint

Testing

  • Run tests in command line:
    $ npm run test

Deploying in Production

  • Make sure correct version of node & npm are installed in your prod environment.
  • Set the NODE_ENV variable in your production environment to production
  • Set PORT to the port you want the webserver to listen on. Default is 3000.
  • To build:
    $ npm ci --only=production
    $ npm run build:clean && npm run build
  • To run:
    $ npm run prod

Commit Format

Pre-commit hooks are setup to enforce formatting in code as well as in commit messages.

  • Example commit message. subject: message
    feat: cors implmentation
    
  • Approved subjects
    build, chore, ci, docs, feat, fix, improvement, perf, refactor, revert, style, test
    

Most of the time you'll be using feat, fix, chore, refactor, or test