- Decisions are already made
- Configurations are already written
- CI / CD pipelines are running
- Development environment is configured
- CLI adds new routes
- Frontend is available
- Deployment is ready
- 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) 😉
Documentation can be found in the wiki
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
- 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
- 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
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
- CLI to create, extend and manage API resources
- Auto generated code documentation
- Integration with Prisma seeders
- Back office template
- 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 ! 😉
LeChatErrant - creator and maintainer