# vai
vai is a toolkit for building web applications with React. Helps you deal with everything, and you can focus on business logic.

## Setup

```shell
# 1. Create an empty folder, install vai locally.
$ npm i vai
# 2. Init project files.
$ npx vai init

# Start dev server
$ npm start

# Build
$ npm run build

# Test
$ npm test

# Preview of production environment
$ npm run preview

# See bundle size analyse
$ npm run analyse

# Bundle to one file
$ npm run bundle

# Start docs server
$ npm run docs

# Format all sources code
$ npm run format
```

## File Structure

```text
.
├── .temp                     # Gitignored. Temporary file folder.
├── coverage                  # Gitignored. Code coverage folder.
├── dist                      # Gitignored. Dist folder, auto generated by `npm run build`. Can be changed by `distDir` in config.
├── tests                     # Tests folder.
├── src                       # Source files folder.
│   ├── pages                 # Page files.
│   ├── layouts               # Layout files.
│   ├── components            # Component files.
│   └── utils                 # Util files.
│── vai.config.ts             # Config file.
└── ...other-files            # Auto generated by `npx vai init`.
```

## Inspired

- [next.js](https://github.com/zeit/next.js)
- [umi](https://github.com/umijs/umi)
- [rekit](https://github.com/supnate/rekit)

## Q&A