Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dannielhugo/typescript-clean-architecture
An experiment on creating a Clean Architecture based Application in Typescript
https://github.com/dannielhugo/typescript-clean-architecture
Last synced: 12 days ago
JSON representation
An experiment on creating a Clean Architecture based Application in Typescript
- Host: GitHub
- URL: https://github.com/dannielhugo/typescript-clean-architecture
- Owner: dannielhugo
- License: mit
- Created: 2017-06-19T21:05:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-27T15:29:46.000Z (over 1 year ago)
- Last Synced: 2024-08-01T19:58:55.788Z (3 months ago)
- Language: TypeScript
- Homepage:
- Size: 5.83 MB
- Stars: 191
- Watchers: 10
- Forks: 27
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
# Typescript Clean Architecture
## Intro
Typescript + Clean architecture
:warning: This is still (and maybe will always be) under development! Any PR is greatly welcome!
This project tries to follow the rules of [Uncle Bob's Clean Architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html).
## Project structure
```
.
├── src
| ├── app - Enterprise business rules
| | ├── core - Core business rules
| | | ├── entities - Interfaces and classes that defines the app.
| | | └── definitions - Interfaces and classes complement the app.
| | └── {feat-name} - Business features
| ├── data - Interfaces adapters
| └── frameworks - Frameworks and drivers that exposes the app
└── build - Compiled javascript files
```## Install
- Clone the project
- Install dependencies:
- Using yarn
```bash
$ yarn install
```- Using npm
```bash
$ npm install
```## Running
- Running the script
This will run a single node script file and will execute pre-defined methods as an example.
- Using yarn
```bash
$ yarn start:script
```
- Using npm
```bash
$ npm run start:script
```- Running the Rest Server
This will start an express rest server at localhost:3000. You can use [this example](src/frameworks/api/Example.md) to consume endpoints.
- Using yarn
```bash
$ yarn start:api
```
- Using npm
```bash
$ npm run start:api
```## Executing tests
- Using yarn
```bash
$ yarn test
```
- Using npm
```bash
$ npm test
```