Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yazaldefilimone/clean-arch-express-starter
Clean architecture starter for Node with Express, TypeScript. All the tools you need to build your api rest.
https://github.com/yazaldefilimone/clean-arch-express-starter
api boilerplate bolierplate clean-architecture clean-code express jest nodejs tdd tslint typescript
Last synced: 3 months ago
JSON representation
Clean architecture starter for Node with Express, TypeScript. All the tools you need to build your api rest.
- Host: GitHub
- URL: https://github.com/yazaldefilimone/clean-arch-express-starter
- Owner: yazaldefilimone
- Created: 2022-08-07T19:40:34.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-16T18:45:24.000Z (over 2 years ago)
- Last Synced: 2023-12-22T19:30:01.947Z (about 1 year ago)
- Topics: api, boilerplate, bolierplate, clean-architecture, clean-code, express, jest, nodejs, tdd, tslint, typescript
- Language: TypeScript
- Homepage:
- Size: 504 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Clean architecture starter for Nodejs(Express.js) with TypeScript.
All the tools you need to build your API Rest.## Features
- ⚡️ Express.js 4
- ⛑ TypeScript
- 📍 DotEnv - is a zero-dependency module that loads environment variables from a `.env` file into `process.env`
- 📏 ESLint — To find and fix problems in your code
- 💖 Prettier — Code Formatter for consistent style
- 🐶 Husky — For running scripts before committing
- 🚓 Commitlint — To make sure your commit messages follow the convention
- 🚫 lint-staged — Run ESLint and Prettier against staged Git files
- ⚙️ EditorConfig - Consistent coding styles across editors and IDEs
- 🗂 Path Mapping — Import components or images using the `~/` prefix
- ‽ Either Error Handler - For error handling. (Either is designed to hold either a left or a right value but never both).## Quick Start
The best way to start with this template is using [ExpressJs Docs](https://expressjs.com/en/starter/hello-world.html).
```
# yarn
yarn create next-app -e https://github.com/yazaldefilimonepinto/clean-arch-api-starter
# npm
npx create-next-app -e https://github.com/yazaldefilimonepinto/clean-arch-api-starter
```### Development
To start the project locally, run:
```bash
npm dev
our
yarn dev
```Open `http://localhost:3003` with your api-client to tests api(exemple: `postman` or `insomnia`).
### Requirements
- Node.js >= 12.22.0
- npm our yarn### Directory Structure
- [`.husky`](.husky) — Husky configuration and hooks.
- [`tests`](./tests) — Tests source code,including domain, application, infrastructure, main and shared.
- [`src`](./src) — Application source code, including domain, application, infrastructure, main and shared.### Scripts
- `yarn/npm dev` — Starts the application in development mode at `http://localhost:3003`.
- `yarn/npm build` — Creates an optimized production build of your application.
- `yarn/npm start` — Starts the application in production mode.
- `yarn/npm lint` — Runs ESLint for all files in the `src` directory.### Path Mapping
TypeScript/Node are pre-configured with custom path mappings. To import components or files, use the `~/` prefix.
```ts
import { createUserFactory } from '~/application/factories/create-user-factory';
```## License
[MIT](https://github.com/yazaldefilimonepinto/clean-arch-api-starter/blob/main/LICENSE) © [Yazalde Filimone](https://www.linkedin.com/in/yazalde-filimone/)