Giter Club home page Giter Club logo

ctf's Introduction

Ctf

Struct Folders BE

Root : Src

Src

  • common: chứa các folder dùng chung cho dự án (utils, constants, types, baseException ....)
  • modules: chưa các logic của từng features (Controllers,Services,Dto, nếu được có thể thêm Repository, Helpers)
  • routes: quản lý các apis (router) của từng Features
  • app.ts : nơi config các middlewares globals
  • main.ts/server.ts: nơi start server

Common:

  • utils: nơi chứa các functions có thể sử dụng chung cho tất cả mọi nơi (Role: phải là class AUtils - DateUtils..)
  • baseException: nơi handle error quản lý response erorr trả về cho client, phụ trách log lỗi khi hệ thống gặp sự cố
  • types: nơi custom type của thư viện hoặc các type sử dụng global (Như Env)
  • configs: nơi chứa file quản lý các biến env (Class Config)

modules/Tên Feauture (ví dụ auth)

  • [Feauture]Controller (nơi handle khi request, response, đây là nơi code gắn gọn nhất chỉ handle lỗi trước khi đưa cho service xử lý).
  • [Feauture]Service : nơi xử lý trực tiếp nhưng logic phức tạp ,nếu không có file Repository thì đây cũng là nơi xử lý việc cập nhật database.
  • [Feauture]Dto: Là nơi xử lý dữ liệu trả về cho người dùng, và kiểm soát dữ liệu client request
  • [Feauture]Repository(optional) : nơi xử lý trực tiếp query database, khi service xử lý xong

routes:

  • [Feature]Router: Nơi quản lý các routes của features đó
  • index.ts nơi combine các routers

=> Dùng TSC để build projects

This workspace has been generated by Nx, a Smart, fast and extensible build system.

Understand this workspace

Run nx graph to see a diagram of the dependencies of the projects.

Remote caching

Run npx nx connect-to-nx-cloud to enable remote caching and make CI faster.

Further help

Visit the Nx Documentation to learn more.

ctf's People

Contributors

duypham14063003 avatar

Watchers

 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.