GithubHelp home page GithubHelp logo

vuongwphamj / typescript-clean-architecture Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dannielhugo/typescript-clean-architecture

0.0 1.0 0.0 5.02 MB

This is just an experiment on creating a Clean Architecture based Application in Typescript

License: MIT License

JavaScript 4.97% TypeScript 95.03%

typescript-clean-architecture's Introduction

Typescript Clean Architecture Example

CircleCI

⚠️ This is still under development!

This is a simple implementation of an account management using typescript and Uncle Bob's Clean Architecture concepts.

I used awilix to develop a Dependency Injection in this project.

It still under development, so things might (and will) change along the way.

Folder structure

.
├── src
|   ├── application           - Application files. The core of clean architecture
|   |   ├── business          - Business logic goes here
|   |   └── entities          - Some interfaces and classes that defines our app.
|   |       ├── repositories  - Contracts between business and deliveries
|   |       ├── types         - Application custom types and interfaces
|   |       └── services      - Features that can be shared through the application
|   ├── delivery              - Here is located all delivery options
|   |   └── api               - API delivery. Here comes all API related logic
|   |       ├── config        - Config folder
|   |       ├── controllers   - Here lies all controllers
|   |       ├── middlewares   - Express middlewares goes here
|   |       ├── routes        - Express routes
|   |       ├── plugins       - API External plugins, like Lodash
|   |       ├── schemas       - JSON Schema definitions for input validation
|   |       ├── index.ts      - API entrypoint
|   |       └── app.ts        - Here is where all things are glued together
|   └── external              - Some external dependencies, like databases, libraries, etc
|       └── repositories      - Contract implementations
├── test                      - Application tests
└── build                     - Compiled javascript files

Delivery Options

For now there is only one delivery option, which is being exposed as an API for account management.

Installing and Running

  • Using yarn
$ yarn install
$ yarn start
  • Using npm
$ npm install
$ npm start

Testing

Simply run npm test or yarn test

typescript-clean-architecture's People

Contributors

dannielhugo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.