{"id":43235477,"url":"https://github.com/batjko/api-boilerplate","last_synced_at":"2026-02-01T10:38:01.345Z","repository":{"id":37072318,"uuid":"175910122","full_name":"batjko/api-boilerplate","owner":"batjko","description":"There are many node service boilerplates, but this one is mine.","archived":false,"fork":false,"pushed_at":"2026-01-22T08:04:05.000Z","size":1495,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-22T22:59:48.132Z","etag":null,"topics":["api-boilerplate","api-rest","ava","boilerplate","fastify","flowtype","nodejs","pino"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/batjko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-03-16T01:01:11.000Z","updated_at":"2026-01-22T08:04:08.000Z","dependencies_parsed_at":"2024-06-20T05:19:25.147Z","dependency_job_id":"95754515-651c-4e4b-b117-b61a78fc17a6","html_url":"https://github.com/batjko/api-boilerplate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/batjko/api-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batjko%2Fapi-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batjko%2Fapi-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batjko%2Fapi-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batjko%2Fapi-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/batjko","download_url":"https://codeload.github.com/batjko/api-boilerplate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batjko%2Fapi-boilerplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28976334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T09:57:52.632Z","status":"ssl_error","status_checked_at":"2026-02-01T09:57:49.143Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-boilerplate","api-rest","ava","boilerplate","fastify","flowtype","nodejs","pino"],"created_at":"2026-02-01T10:38:01.278Z","updated_at":"2026-02-01T10:38:01.337Z","avatar_url":"https://github.com/batjko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pat's API boilerplate\n\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com) ![CI Status](https://travis-ci.org/batjko/api-boilerplate.svg?branch=master 'CI Status')\n\n## Shit included:\n\n1. **Fastify** as the API server (fast and comes with **Pino** out of the box)\n2. **AVA** and **supertest** for testing\n3. **Flow** for totally optional type annotations\n4. **Standardjs** and **Prettier** for never-think-of-it-again code formatting\n\n## Design\n\nThe thing is designed to be simple but extendable.\n\nFor example:\n\n- Fastify makes the service very lightweight and fast. Just add routes under the `/routes` folder and `app.register(myRoute)` them in `app.js` or whatever.\n\n\u003e An example route is the `/healthCheck` one, which also has an integration test (see below), and can be used to report service health to some monitoring solution.\n\n- `config.js` holds all app-level configuration the rest of the app could use. The whole config object can be overridden at launch/deployment time using a `CONFIG` environment variable.\n\n- Write some bloody tests, man. Ava is super simple and I have added examples for unit and integration tests.\n\n\u003e `npm run test` for unit tests\n\u003e `npm run test:int` for integration tests\n\n- The built-in logger is doing a few convenience tasks, but is really just a thin wrapper around pino. It outputs logs in JSON, ready for ELK or other centralised monitoring.\n\nThat's it.\nNow go build your shit.\n\n## Todo:\n\n- [x] Dockerfile and docker-compose config\n- [ ] K8s service definitions\n- [x] Some CI config\n- [ ] Migrate from Flow to Typescript?\n- [x] Replace Koa with Fastify\n- [ ] Add Serverless config for Lambda deployment\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbatjko%2Fapi-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbatjko%2Fapi-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbatjko%2Fapi-boilerplate/lists"}