shanghaikid 77ff792a92 fix: login input error introduced by data refactor 2 일 전
..
public e842dddf10 update icons 1 년 전
src 77ff792a92 fix: login input error introduced by data refactor 2 일 전
.env.development c9ce9db33f migration to vite/vitest (#111) 2 년 전
.env.production c9ce9db33f migration to vite/vitest (#111) 2 년 전
.prettierrc 64338ffa2d add prettier and format code 3 년 전
README.md c9ce9db33f migration to vite/vitest (#111) 2 년 전
index.html 4bcf9ba29a update ui fonts 4 달 전
package.json 0e5e1e5980 feat: support 3k+ collections (#847) 1 주 전
tsconfig.json d4ee55e70b fix tsconfig 1 개월 전
vite.config.mts 4b011d7b8a fix electron 2 주 전
vitest.config.ts c9ce9db33f migration to vite/vitest (#111) 2 년 전
yarn.lock 0e5e1e5980 feat: support 3k+ collections (#847) 1 주 전

README.md

Attu client

How to run

  1. yarn install
  2. yarn start

Folder Structure

└── public                    # Static resources
└── src
  ├── assets                  # Put images here
  ├── components              # Components
  ├── consts                  # Constant values
  ├── context                 # React context
  ├── hooks                   # React hooks
  ├── http                    # Http request api. And we have http interceptor in GlobalEffect.tsx file
  ├── i18n                    # Language i18n
  ├── pages                   # All pages, business components and types.
  ├── plugins                 # All import plugins.
  ├── router                  # React router, control the page auth.
  ├── styles                  # Styles, normally we use material to control styles.
  ├── types                   # Global types
  └── utils                   # The common functoins

Fixed pacakge version

Temporarily we specify 3 packages' version for ts build.

"@material-ui/core": "4.11.4",
"@material-ui/lab": "4.0.0-alpha.58",
"react-i18next": "11.10.0",

react-i18next's useTranslation(<name>) will return a t function, which used to return string and string{} type. But in latest version it only return string and cause typecheck error.

@material-ui/core change TablePagination(from '@material-ui/core/TablePagination') type in latest version. We specified a former version to prevent error here.

In future we will fix all type issues and remove specified package version usage.

How to name the file

We use Camel-Case to name the file.

In components / pages folder, we need subfolder to wrapper all related files.

Global Effect

We get global data or take global side effect in components/layout/GlobalEffect

Http request

We support user to define HOST_URL when docker run and it will write the env-config.js in public folder.

We use class getter to define our client fields like _field, because of our server response fields may be changed.

Helper Folder

Like utils / consts / utils / hooks , we dont want put all functions or data in one file like index.ts because of maintainability.

So when we need to create new file , treat the file like Class then name it.