Skip to content
  • Promote Your Product

Getting Started ​

Environment Requirements ​

  • Node.js: >= 20.19.0 || >= 22.12.0 || >= 24.0.0
  • pnpm: >= 9.9.0 (recommended package manager)
  • IDE: VS Code (recommended to install Volar extension)

Install Dependencies ​

bash
# Clone the project
git clone <repository-url>
cd zhontai-ui-admin-app

# Install dependencies
pnpm install

Development Server ​

H5 Mode (Default) ​

bash
# Start H5 development server
pnpm dev

App Mode ​

bash
# Start App development mode
pnpm dev:app

# Android App
pnpm dev:app-android

# iOS App
pnpm dev:app-ios

Mini Program Mode ​

bash
# WeChat Mini Program
pnpm dev:mp-weixin

# Alipay Mini Program
pnpm dev:mp-alipay

# Baidu Mini Program
pnpm dev:mp-baidu

# Toutiao Mini Program
pnpm dev:mp-toutiao

# QQ Mini Program
pnpm dev:mp-qq

# Lark Mini Program
pnpm dev:mp-lark

# Kuaishou Mini Program
pnpm dev:mp-kuaishou

Multi-environment Mode ​

H5 mode supports multi-environment configuration:

bash
# Development environment
pnpm dev:h5:development

# Staging environment
pnpm dev:h5:staging

# Production environment
pnpm dev:h5:production

Production Build ​

bash
# H5 Build
pnpm build:h5

# App Build
pnpm build:app

# WeChat Mini Program Build
pnpm build:mp-weixin

# Other platform builds...

API Code Generation ​

This project uses alova's code generation feature to auto-generate API interface code from Swagger documentation:

bash
# Generate API interface code
pnpm alova-gen

Generation configuration is in alova.config.ts, supporting multiple Swagger sources:

  • Admin API: src/api/admin
  • Dev API: src/api/dev
  • Demo API: src/api/demo

Code Quality ​

bash
# ESLint check
pnpm lint

# Auto-fix
pnpm lint:fix

Type Check ​

bash
# TypeScript type checking
pnpm type-check

Documentation Development ​

bash
# Start documentation dev server
pnpm docs:dev

# Build documentation
pnpm docs:build

# Preview documentation
pnpm docs:preview

FAQ ​

Node.js version not met ​

Please upgrade Node.js to the specified version. It's recommended to use nvm or fnm for Node.js version management.

pnpm not installed ​

bash
# Install pnpm
npm install -g pnpm

# Verify version
pnpm -v

Dependency installation failed ​

Try clearing cache and reinstalling:

bash
# Clear cache
pnpm store prune

# Reinstall
rm -rf node_modules pnpm-lock.yaml
pnpm install