API-template
API-template copied to clipboard
Modern production-ready typescript backend template
API-template
What is it ?
- [x] Decisions are already made
- [x] Configurations are already written
- [x] CI / CD pipelines are running
- [x] Development environment is configured
- [x] CLI adds new routes
- [x] Frontend is available
- [x] Deployment is ready
- [x] Focus on what matters : code
This project provides a typesafe, production ready modern web API template along with a full development environment.
It gives your project a clean base to start and follows development good practices, essentially focusing on maintainability and extensibility
Lastly, it aims to save developers a lot of time since all nasty configurations are already written (typescript, eslint, jest, docker, CI, ...) and technologies are already chosen (language, testing framework, database, ORM, ...)
![]() |
|---|
| This repository is templated. Use it as a base for your own projects by clicking on Use this template |
API-template is fully integrated with
- front-template, a modern typescript frontend stack
- ops-template, a complete scalable infrastructure on Kubernetes
- lantern, a CLI to assist backend development
Don't hesitate to share your improvements or to give feedback on Discord (LeChatErrant#6074) :wink:
Table of contents
- Documentation
- Deployment
- Getting started
- Technologies
- CLI
- Roadmap
- How to contribute
- Contributors
Documentation
Documentation can be found in the wiki
Deployment
API is automatically deployed on Heroku and can be reached on api-template-prod.herokuapp.com
For a complete production deployment, see ops-template
Additionally, you can try out the API here, on Postman
Getting started
- Make sure the .envrc is loaded (have a look here)
- Install dependencies with
npm install - Launch services (database, redis, ...) with
npm run dev:services - Run
npm run dev

Technologies
- Typescript : Language
- Express : Web server
- Heroku : Application hosting
- Prisma : ORM
- Prisma studio : Database visualisation
- Prisma migrate : Database migration
- Prisma data platform : Database hosting
- Bcrypt : Password hashing
- Eslint : Code styling
- Jest : Testing
- Supertest : Endpoint testing
- Class validator : DTO validation
- Winston : Logger
- Husky : Pre commit hooks
- GitHub action : CI / CD
- Docker : Containerization
- Redis : Session management
- PostgreSQL : Database
...and more
CLI
The template comes with a Command-Line Interface that helps you to initialize, develop and maintain your projects. It saves you from writing boilerplate code
The CLI is currently under heavy development and will be release soon ❤️
More details in wiki

Roadmap
- [ ] CLI to create, extend and manage API resources
- [ ] Auto generated code documentation
- [ ] Integration with Prisma seeders
- [ ] Back office template
How to contribute
- Fork it (https://github.com/LeChatErrant/API-template/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Issues and comments welcomed ! :wink:
Contributors
LeChatErrant - creator and maintainer
