Giter VIP home page Giter VIP logo

frontend_ai_react's Introduction

UmiJS Boilerplate

UmiJS Boilerplate is a frontend template that includes HTML, CSS, and JS to build websites using ReactJS.

Getting started

Open your preferred command line tool and run follow some steps below:

  1. ....
  2. cd vn-travelmart-fe.
  3. yarn or npm install automatically to install plugins required for the build script based in package.json file.
  4. yarn start or npm start to preview and development, then run url http://localhost:8000 in your browser.
  5. yarn build or npm build to build app.
  • Install latest node.js: https://nodejs.org​
  • Install latest yarn package manager: https://yarnpkg.com/​
  • Install node modules by running terminal command yarn install
  • Run the app yarn start
  • For build production files use yarn build (build to /dist/ folder)

Project structure

vn-travelmart-fe/
├── config/
│   ├── config.js (config umijs)
│   ├── config.route.js (routes)
│   ├── defaultSettings.js
│   └── ...
│
├── src/
│   ├── assets
│   ├── components
│   ├── layouts
│   │   ├── login
│   │   ├── main
│   │   ├── public
│   │   ├── index.js
│   │   └── ...
│   │
│   ├── locales
│   ├── models
│   │   ├── global.js
│   │   ├── menu.js
│   │   ├── setting.js
│   │   ├── user.js
│   │   └── ...
│   ├── pages
│   │   ├── booking
│   │   ├── category
│   │   ├── customers
│   │   ├── dashboard
│   │   ├── login
│   │   ├── operating
│   │   ├── supplier
│   │   ├── system
│   │   ├── tours
│   │   └── ...
│   │
│   ├── services
│   │   ├── login.js
│   │   ├── menu.js
│   │   ├── user.js
│   │   └── ...
│   │
│   ├── ultis
│   │   ├── Authorized.js
│   │   ├── Helper.js
│   │   ├── utlis.js
│   │   ├── variables.js
│   │   └── ...
│   │
│   ├── wrappers
│   │   ├── auth.js
│   │   └── ...
│   │
└── package.js

SASS structure

There is a main SCSS-file global.scss.

The global.scss imports all partials.

This is how the sass-folder looks like:

$ tree
.
styles
├── Antd
│   ├── import
│   |   └── …
│   ├── antd.cleanui.scss
│   └── …
├── Bootstrap
│   ├── import
│   |   └── …
│   ├── bootstrap.cleanui
│   └── …
└── …

Convert local to Utc

Helper.getDateTime({
  value: Helper.setDate({
    ...setDateData,
    originValue: `date`,
  }),
  format: 'YYYY-MM-DD HH:mm:ss'
  isUTC: true,
})

Convert Utc to local

Helper.getDateTime({
  value: `date`,
  format: 'YYYY-MM-DD HH:mm:ss'
  isUTC: false
})

Covert Number to array

Array.from({ length: `number` }, (v, i) => i)

Set permission menu

{
  title: 'Dashboard',
  key: 'dashboardAlpha',
  url: ['/dashboard'],
  con: 'icon icon-dashboard',
  permission: ['ROLES_ADD'],
  multiple: false
},

Set permission routes

{
  path: '/roles',
  component: './roles',
  wrappers: [ '@/wrappers/auth'],
  authority: ['ROLES],
}

Set Permission Button

subject: name function
action: action of function
<Button color="success" icon="plus" subject="roles" action="add">
  Add
</Button>

QUERY BUILD WEB-APP DOCKER

sudo docker-compose stop

sudo docker-compose run --rm web yarn
sudo docker-compose run --rm web yarn build

sudo docker-compose up -d

GIT

  • git commit -m"add fall detection" --no-verify

frontend_ai_react's People

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.