borjapazr / express-typescript-skeleton

πŸ”°πŸ¦Έ Template to start developing a REST API with Node.js (Express), TypeScript, Ts.ED, ESLint, Prettier, Husky, Prisma, etc.
https://express-typescript-skeleton.bpaz.dev/api/docs
MIT License
507 stars 62 forks source link
best-practices ddd docker docker-compose dockerfile eslint express hacktoberfest hexagonal-architecture jest jwt makefile nodejs pm2 prettier prisma supertest tsconfig-paths tsed typescript
Node.js, Typescript and Express template

![GitHub package.json version](https://img.shields.io/github/package-json/v/borjapazr/express-typescript-skeleton?style=flat-square) ![GitHub CI Workflow Status](https://img.shields.io/github/actions/workflow/status/borjapazr/express-typescript-skeleton/ci.yml?branch=main&style=flat-square&logo=github&label=CI) ![GitHub CD Workflow Status](https://img.shields.io/github/actions/workflow/status/borjapazr/express-typescript-skeleton/cd.yml?branch=main&style=flat-square&logo=github&label=CD) ![GitHub LICENSE](https://img.shields.io/github/license/borjapazr/express-typescript-skeleton?style=flat-square)

πŸ”°πŸ¦Έ Production-ready template for backends created with Node.js, Typescript and Express

ℹ️ About β€’ πŸ“‹ Features β€’ 🀝 Contributing β€’ πŸ›£οΈ Roadmap β€’ 🎯 Credits β€’ 🚩 License

ℹ️ About

The main goal of this project is to provide a base template for the generation of a production-ready REST API made with Node.js, Express and Typescript. The idea is to avoid having to configure all the tools involved in a project every time it is started and thus be able to focus on the definition and implementation of the business logic.

πŸ“£ This is an opinionated template. The architecture of the code base and the configuration of the different tools used has been based on best practices and personal preferences.

πŸš€ Quick start

πŸ“‹ Features

🐐 Makefile rules

The main actions on this project are managed using a Makefile as an entrypoint.

Usage: make TARGET [ARGUMENTS]

Targets:
  build/docker              Build Docker image of the application
  clean/docker              Clean all container resources
  help                      Show this help
  install                   Install the project
  logs                      Show logs for all or c=<name> containers
  requirements              Check if the requirements are satisfied
  start                     Start application in development mode
  start/docker              Start application in a Docker container
  start/docker/cache        Start cache container
  start/docker/db           Start database container
  stop/docker               Stop application running in a Docker container
  stop/docker/cache         Stop cache container
  stop/docker/db            Stop database container

⚑ Scripts

package.json scripts:

🀝 Contributing

Just fork and open a pull request. All contributions are welcome πŸ€—

πŸ›£οΈ Roadmap

Please, check TODO for the current roadmap.

🎯 Credits

To implement this project I have based myself on many similar projects. There were countless of them and I gave them all a star.

πŸ™ Thank you very much for these wonderful creations.

⭐ Stargazers

Stargazers repo roster for @borjapazr/express-typescript-skeleton

🚩 License

MIT @ borjapazr. Please see License for more information.