Files
sealos/frontend
Alex Lee a13e10e8fa feat(devbox): v2 ui and code refactor (#5686)
* fix:chart tooltip

* feat: loading component

* chore: remove unused ui

* feat: devbox name runtime tooltip

* fix: list pagination auto reset bug

* feat: devbox create left side

* feat: yaml page

* fix: scrollbar color change

* feat: devbox create

* refactor: chakra to shadcn(detail related)

* fix: IDE show bug

* feat: devbox detail header

* fix: detail header position

* feat: detail sidebar

* feat: detail basic

* feat: detail live monitoring

* feat: detail network

* feat: detail layout adjust

* fix: layout fix again

* feat: detail release

* feat: deploy modal

* feat: detail adjust layout

* feat: shutdown modal and release modal

* fix: appSelectModal background image

* feat: toolbox and sshConnect drawer

* chore: remove some unused code

* chore: jb modal chakra to shadcn

* feat: deleteDevboxModal

* chore: adjust some code

* feat: template layout

* feat: template left sidebar

* feat: public template mainBody

* feat: createOrUpdate drawer

* feat: create template

* fix: react html bug

* feat: template update template

* feat: private template

* feat: private template

* feat: jetbrain ide

* feat: deploy devbox drawer

* chore: remove unused template code

* chore: remove unused icon code

* fix: little fix

* feat: create template time

* feat: create devbox template part

* chore: remove unused code

* fix: release show bug

* fix: detail height bug

* fix: detail padding bug

* fix: detail basic event style bug

* fix: some ts-lint bug

* fix: detail layout bug

* chore: remove unused code

* fix: update devbox bug

* fix: create and update devbox navigate bug

* chore: adjust file structure

* fix: ts bug

* feat: detail layout sidebar

* feat: detail page

* feat: datapciker

* fix: date-picker style adjust

* fix: idebutton rerender bug

* fix: some style adjust

* fix: detail layout style bug

* fix: date picker bug

* feat: monitor chart

* feat: refresh button

* feat: monitor page fully

* fix: list fix

* fix: bug

* fix: lower case and upper case

* fix: style fix

* fix: template card style

* fix: bug

* fix: create route bug

* fix: style adjust

* fix: adjust style

* feat: guide

* fix: adjust style

* fix: time show bug

* fix: bug

* fix: template empty show bug

* fix: bug

* style: monitor chart color

* feat: devbox list template name

* style: adjust style

* feat: create devbox port add

* fix: style adjust

* style: padding adjust

* fix: bug

* fix: style adjust

* fix: style adjust

* chore: update env file

* fix: coin logic bug

* fix: delete some unused ui

* fix: some no little bug

* fix: bug

* fix: little style bug

* fix: network show bug

* fix: style adjust

* fix: style bug

* fix: icon bug

* fix: handle back bug

* fix: template bug

* fix: toggle tag bug

* chore: adjust typo

* fix: style adjust

* feat: adjust detail style

* fix: monitor style adjust

* fix: some little bug

* chore: remove unused code

* fix: template create and update bug

* fix: template version bug

* fix: release devbox version bug

* fix: style adjust

* chore: add tailwindcss and shadcn

* fix: tailwindcss v4 update bug

* chore: add some useful ui

* fix: deal prettier and eslint bug

* chore: adjust layout.tsx

* chore: add some comment

* chore: remove unused code

* chore: remove chakra-ui

* feat: font inter->geist

* feat: list page basic

* style: some little p fix

* feat: list pagination

* fix:chart tooltip

* feat: loading component

* chore: remove unused ui

* feat: devbox name runtime tooltip

* fix: list pagination auto reset bug

* feat: devbox create left side

* feat: yaml page

* fix: scrollbar color change

* feat: devbox create

* refactor: chakra to shadcn(detail related)

* fix: IDE show bug

* feat: devbox detail header

* fix: detail header position

* feat: detail sidebar

* feat: detail basic

* feat: detail live monitoring

* feat: detail network

* feat: detail layout adjust

* fix: layout fix again

* feat: detail release

* feat: deploy modal

* feat: detail adjust layout

* feat: shutdown modal and release modal

* fix: appSelectModal background image

* feat: toolbox and sshConnect drawer

* chore: remove some unused code

* chore: jb modal chakra to shadcn

* feat: deleteDevboxModal

* chore: adjust some code

* feat: template layout

* feat: template left sidebar

* feat: public template mainBody

* feat: createOrUpdate drawer

* feat: create template

* fix: react html bug

* feat: template update template

* feat: private template

* feat: private template

* feat: jetbrain ide

* feat: deploy devbox drawer

* chore: remove unused template code

* chore: remove unused icon code

* fix: little fix

* feat: create template time

* feat: create devbox template part

* chore: remove unused code

* fix: release show bug

* fix: detail height bug

* fix: detail padding bug

* fix: detail basic event style bug

* fix: some ts-lint bug

* fix: detail layout bug

* chore: remove unused code

* fix: update devbox bug

* fix: create and update devbox navigate bug

* chore: adjust file structure

* fix: ts bug

* feat: detail layout sidebar

* feat: detail page

* feat: datapciker

* fix: date-picker style adjust

* fix: idebutton rerender bug

* fix: some style adjust

* fix: detail layout style bug

* fix: date picker bug

* feat: monitor chart

* feat: refresh button

* feat: monitor page fully

* fix: list fix

* fix: bug

* fix: lower case and upper case

* fix: style fix

* fix: template card style

* fix: bug

* fix: create route bug

* fix: style adjust

* fix: adjust style

* feat: guide

* fix: adjust style

* fix: time show bug

* fix: bug

* fix: template empty show bug

* fix: bug

* style: monitor chart color

* feat: devbox list template name

* style: adjust style

* feat: create devbox port add

* fix: style adjust

* style: padding adjust

* fix: bug

* fix: style adjust

* fix: style adjust

* chore: update env file

* fix: coin logic bug

* fix: delete some unused ui

* fix: some no little bug

* fix: bug

* fix: little style bug

* fix: network show bug

* fix: style adjust

* fix: style bug

* fix: icon bug

* fix: handle back bug

* fix: template bug

* fix: toggle tag bug

* chore: adjust typo

* fix: style adjust

* feat: adjust detail style

* fix: monitor style adjust

* fix: some little bug

* chore: remove unused code

* fix: template create and update bug

* fix: template version bug

* fix: release devbox version bug

* fix: style adjust

* chore: add network limit

* feat: hide log

* fix: style bug

* fix: yaml typo bug

* chore: document url  not hard-coding

* chore: reference path ->api-docs
2025-07-31 17:17:44 +08:00
..
2023-08-07 17:55:55 +08:00

sealos frontend

Development setup

  • It's recommended using this directory (/frontend) as root for your workspace.
  • We use pnpm for package management, you should have it installed before getting started. (Tutorial)
  • Desktop app is under desktop/ directory, sub apps are under providers/<package>/.

Install dependencies

The post install script will run automatically, and local packages should be built.

pnpm install

Generate Prisma clients for desktop app

cd desktop
pnpm gen:global && pnpm gen:region

Prepare environment variables

.env.template files are located at the workspace root directory for each app. Duplicate and rename them to .env, then fill the required configurations.

NEXT_PUBLIC_MOCK_USER is the kubeconfig mocked for development, you can copy it from your Sealos desktop. (Only one line allowed, you should escape the line breaks)

Run apps for development

You can either run apps in workspace root or in specific app's directory.

# Run desktop app
pnpm dev-desktop

# Run specific provider app
pnpm dev-app        # applaunchpad
pnpm dev-db         # dbprovider
pnpm dev-cost       # costcenter
pnpm dev-terminal   # terminal
pnpm dev-template   # template
pnpm dev-cronjob    # cronjob
pnpm dev-devbox     # devbox

# or run dev script in app's package directory
cd desktop
pnpm dev

how to add packages

cd frontend
# add remote
pnpm --filter=<path> -r add <package>
# such as:
# pnpm --filter=providers/costcenter -r add lodash
# pnpm --filter=desktop -r add lodash
# add local
pnpm --filter=<path> -r --offline add <package>
# such as:
# pnpm --filter=providers/costcenter -r --offline add sealos-desktop-sdk
# pnpm --filter=desktop -r --offline add sealos-desktop-sdk

how to build

# sealos/frontend
make image-build-<app> DOCKER_USERNAME=<your_account> IMAGE_TAG=<tag>
# such as:
# make image-build-providers/costcenter
# make image-build-desktop
# make image-build-desktop IMAGE_TAG=test DOCKER_USERNAME=sealos
# multi jobs build
make -j
  • you can use make all DOCKER_USERNAME=<your_account> to build all apps for your account.
  • you can user make all IMAGE_TAG=<tag> to build all apps and customize tag (default:dev)

how to publish image

# sealos/frontend
make image-push-<app> DOCKER_USERNAME=<your_account> IMAGE_TAG=<tag>
# such as:
# make image-push-providers/costcenter
# make image-push-desktop

# publish all
make push-images DOCKER_USERNAME=<your_account> IMAGE_TAG=<tag>

new App

Refer to other apps to add some configuration.

  1. .github/workflows/frontends.yml
  2. deploy/cloud/init.sh
  3. deploy/cloud/scripts/init.sh
  4. frontend/providers/app/deploy/manifests/appcr.yaml.tmpl
  5. frontend/providers/app/deploy/manifests/deploy.yaml
  6. frontend/providers/app/deploy/manifests/ingress.yaml.tmpl
  7. makefile

multiple namespaces

In order to support multiple namespaces, the method of obtaining 'namespace' in the backend should be replaced with the method of obtaining it from 'kubeconfig' instead of adding 'ns-' to 'user' for generation purpose.