-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(readme): document README.md and improve Makefile
- Loading branch information
Showing
7 changed files
with
141 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
distribute: | ||
name: 🛩️ Deliver project | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: ⬇️ Checkout project | ||
uses: actions/checkout@v2 | ||
|
||
- name: 💽 Build OCI image | ||
run: make build/prod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,112 @@ | ||
<div align="center"> | ||
<img | ||
width="500" | ||
alt="Node Typescript Skeleton" | ||
alt="Node.js, Typescript and Express template" | ||
src="https://i.imgur.com/bpnghuI.png"> | ||
<br> | ||
<br> | ||
|
||
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/borjapazr/express-typescript-skeleton/CI?style=flat-square) | ||
![GitHub package.json version](https://img.shields.io/github/package-json/v/borjapazr/express-typescript-skeleton?style=flat-square) | ||
![GitHub](https://img.shields.io/github/license/borjapazr/express-typescript-skeleton?style=flat-square) | ||
|
||
<h4> | ||
Production-ready template for backends created with Node.js, Typescript and Express | ||
🔰🦸 Production-ready template for backends created with Node.js, Typescript and Express | ||
</h4> | ||
|
||
<a href="#about">About</a> • | ||
<a href="#installation">Installation</a> • | ||
<a href="#features">Features</a> • | ||
<a href="#wiki">Wiki</a> • | ||
<a href="#contributing">Contributing</a> • | ||
<a href="#credits">Credits</a> • | ||
<a href="#support">Support</a> • | ||
<a href="#license">License</a> | ||
<a href="#ℹ️-about">ℹ️ About</a> • | ||
<a href="#-features">📋 Features</a> • | ||
<a href="#-contributing"> 🤝 Contributing</a> • | ||
<a href="#-roadmap"> 🛣️ Roadmap</a> • | ||
<a href="#-credits">🎯 Credits</a> • | ||
<a href="#-license">🚩 License</a> | ||
|
||
</div> | ||
|
||
--- | ||
|
||
## About | ||
|
||
#TODO | ||
|
||
## Installation | ||
|
||
#TODO | ||
|
||
## Features | ||
|
||
#TODO | ||
|
||
## Wiki | ||
|
||
#TODO | ||
|
||
## Contributing | ||
|
||
#TODO | ||
|
||
## Credits | ||
|
||
#TODO | ||
|
||
## Support | ||
|
||
#TODO | ||
|
||
## License | ||
|
||
#TODO | ||
## ℹ️ 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. | ||
## 📋 Features | ||
|
||
- Built using [Typescript](https://github.com/microsoft/TypeScript) | ||
- Built using [Express Framework](https://github.com/expressjs/express): Fast, unopinionated, minimalist web framework for node. | ||
- Built using [TypeORM](https://typeorm.io/): ORM for TypeScript and JavaScript | ||
- Built using [Routing Controllers](https://github.com/typestack/routing-controllers): Allows to create controller classes with methods as actions that handle requests | ||
- JWT authentication and role based authorization using custom middleware | ||
- OpenAPI definition | ||
- Fully configured logger with [Winston](https://github.com/winstonjs/winston) and [Morgan](https://github.com/expressjs/morgan) | ||
- Unit, Integration and E2E tests using [Jest](https://github.com/facebook/jest) and [Supertest](https://github.com/visionmedia/supertest) | ||
- Linting with [ESLint](https://github.com/eslint/eslint) | ||
- Formatting with [Prettier](https://github.com/prettier/prettier) | ||
- [Spell check](https://github.com/streetsidesoftware/cspell) | ||
- Git hooks with [Husky](https://github.com/typicode/husky) and [lint-staged](https://github.com/okonet/lint-staged) | ||
- Containerised using [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/) | ||
- Path aliases support | ||
- Commit messages must meet conventional commits format | ||
- GitHub Actions | ||
- Makefile as project entrypoint | ||
- A lot of emojis 🛸 | ||
|
||
### 🐐 Makefile rules | ||
|
||
The main actions on this project are managed using a [Makefile](Makefile) as an entrypoint. | ||
|
||
- `deps`: Validate if the project dependencies are installed | ||
- `build/dev`: Build the project image for the development environment | ||
- `build/prod`: Build the project image for the production environment | ||
- `start/dev`: Start the project in development mode using Docker | ||
- `start/prod`: Start the project in production mode using Docker | ||
- `start/db`: Start database container | ||
- `test/dev`: Run the project tests using Docker | ||
- `stop/dev`: Stop dev application container | ||
- `stop/prod`: Stop prod application container | ||
- `stop/db`: Stop database container | ||
- `clean/dev`: Removes dev application container and associated resources | ||
- `clean/prod`: Removes prod application container and associated resources | ||
|
||
### ⚡ Scripts | ||
|
||
[package.json](package.json) scripts: | ||
|
||
- `dev`: Start project in development mode | ||
- `build`: Build project and generate final build | ||
- `start`: Start project in production mode | ||
- `check:types`: Check if project types are correct | ||
- `check:format`: Check if project is formatted correctly | ||
- `check:lint`: Check if project is linted correctly | ||
- `check:spelling`: Check if project is spelled correctly | ||
- `fix:format`: Fix project format issues | ||
- `fix:lint`: Fix project lint issues | ||
- `fix:staged`: Check and fix staged files | ||
- `test`: Run all tests | ||
- `test:unit`: Run unit tests | ||
- `test:int`: Run integration tests | ||
- `test:e2e`: Run e2e tests | ||
- `test:watch`: Run tests in watch mode | ||
- `test:coverage`: Run tests with coverage | ||
- `coverage:view`: Show coverage information | ||
- `commit`: Help to commit changes using conventional commits | ||
- `version`: Generate new project version | ||
|
||
## 🤝 Contributing | ||
|
||
Just fork and open a pull request. All contributions are welcome 🤗 | ||
|
||
## 🛣️ Roadmap | ||
|
||
Please, check [TODO](TODO.md) for the current roadmap. | ||
|
||
## 🎯 Credits | ||
|
||
To realise 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. | ||
|
||
## 🚩 License | ||
|
||
MIT @ [borjapazr](https://me.marsmachine.space). Please see [License](LICENSE) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 🛣️ Roadmap | ||
|
||
### Todo | ||
|
||
- [ ] Task 3 | ||
|
||
### In Progress | ||
|
||
- [ ] Task 2 | ||
|
||
### Done ✓ | ||
|
||
- [x] Task 1 |