Git Product home page Git Product logo

huyefen-trolle's Introduction

huyefen-trolle

Trước khi chạy cài umi version 2: yarn global add [email protected]

yarn global add umi@2.13.13
npm install -g umi@2.13.13

Tham khảo umi

Để chạy app front end

cd frontend
yarn install
yarn start

Web app sẽ được chạy ở origin: http://localhost:8080

Cấu trúc thư mục frontend

  1. config
  2. src

#config Thư mục này chứa các config cho project. Trong đó ta chỉ cần quan tâm file routes.config.js routes.config.js chứa config về route như

  • Có những route gì.
  • Ứng với route đó sẽ là page gì.
  • Khi không match route thì redirect về đâu.

#src Thư mục này có các thư mục con:

  • components: Chứa các component thường hay dùng chung, tái sử dụng.
  • assets: Chứa các hình ảnh (assets/images) hoặc mock data (assets/fakers).
  • helpers: Thư mục chứa các file phụ trợ. Các file đó chứa các hàm phụ trợ, xử lí logic nhỏ nhặt.
  • layouts: Thư mục chứa các file layouts. Layouts bản chất cũng là 1 component, nhưng nó thường là component cha to bự, wrap bên ngoài các component page, như là phần xương sườn của hệ thống. Nhiều pages có thể chung 1 layout. Ví dụ page LoginRegister cùng chung layout AuthLayout --> Tính tái sử dụng
  • pages: Thư mục chứa các file pages. Mỗi file thường ứng với một route. Đại diện cho 1 màn hình. Bản chất nó cũng là component, nhưng là component bự đại diện cho 1 màn hình, gồm nhiều component nhỏ bên trong.
  • locales: Thư mục chứa các file ngôn ngữ.
  • models: Thư mục chứa các model, liên quan đến các khái niệm như redux, redux-saga. Tạm hiểu đây là nơi viết logic gọi API đến server.
  • routes: Cùng là các component, thường dùng để xử lí logic authenticate.
  • services: Chứa các file service, là phần nằm giữa API và models. Model không gọi trực tiếp API mà thông qua service, service sẽ gọi trực tiếp API.

#src Lưu ý mỗi lần git commit

git commit -m [message] --no-verify

huyefen-trolle's People

Contributors

gotrongluan avatar phamhoangtrongkhoa avatar buivantrungg avatar dinhcong15 avatar

Stargazers

 avatar tvtam1 avatar

Watchers

 avatar tvtam1 avatar

Forkers

tvtam1 delta94

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.