mirror of
https://github.com/rustfs/console.git
synced 2026-08-28 19:47:21 +08:00
722dccb3c4687d4389e11539dc214baa18631594
- Add test coverage check as mandatory pre-commit requirement - Expand Testing Guidelines with detailed test update requirements - Include test review in Quick Fix Command workflow - Ensure all code changes include corresponding test updates
RustFS Console
A modern web management console for RustFS distributed file system.
Features
- Vue 3 + Nuxt 4 + TypeScript + Tailwind CSS v4
- shadcn-vue components with dark mode
- i18n support (English, Chinese, Turkish)
- Responsive design
- S3-compatible API with AWS signing
- Real-time monitoring dashboard
Quick Start
Prerequisites
- Node.js >= 22.0.0
- pnpm >= 10.27.0 (managed via corepack or mise)
- RustFS backend running
Installation
git clone https://github.com/rustfs/console.git
cd console
pnpm install
Development
pnpm dev
Server starts at http://localhost:3000.
Environment (Optional)
Create .env:
APP_NAME=RustFS
BASE_URL=/rustfs/console/
API_BASE_URL=http://localhost:9000/rustfs/admin/v3
SERVER_HOST=http://localhost:9000
S3_REGION=us-east-1
S3_ENDPOINT=http://localhost:9000
Configuration is auto-detected from server config, localStorage, or browser host.
Production Build
pnpm build
pnpm preview
Project Structure
├── components/ # Vue components
├── composables/ # Reusable logic
├── pages/ # Nuxt routes
├── lib/ # API clients, utilities
├── store/ # Pinia stores
├── tests/ # Test files
└── utils/ # Utility functions
Development
Code Quality
pnpm type-check # TypeScript checking
pnpm lint # Linting
pnpm lint:fix # Auto-fix formatting
Testing
pnpm test # Run tests
pnpm test:run # CI mode
pnpm test:coverage # With coverage
See tests/README.md for details.
Coding Standards
- Component files: kebab-case (
bucket-selector.vue) - Component usage: StudlyCase (
<BucketSelector />) - Composables: camelCase with
useprefix (useBucket.ts) - TypeScript: Strict mode, avoid
any - Comments: English only
Contributing
Workflow
- Fork and clone
- Create feature branch:
git checkout -b feature/amazing-feature - Make changes following coding standards
- Test:
pnpm type-check && pnpm lint && pnpm test:run - Commit:
git commit -m 'feat: add amazing feature'(English only) - Push and create PR
Pre-Commit Checklist
Before committing, run all checks:
# Quick check (lint, type-check, tests, build)
pnpm run check
# Full check (includes security audit)
pnpm run pre-commit
Or manually:
- ✅
pnpm lintpasses - ✅
pnpm type-checkpasses - ✅
pnpm test:runpasses - ✅
pnpm buildsucceeds - ✅
pnpm audit --audit-level=moderatepasses - ✅ No debug code (
console.log) - ✅ Self-reviewed
- ✅ Commit messages in English
Tip: Run pnpm run check before every commit to catch issues early.
Commit Convention
Follow Conventional Commits:
feat: New featuresfix: Bug fixesdocs: Documentationstyle: Formattingrefactor: Code refactoringtest: Testschore: Build/tool changes
All commit messages must be in English.
Deployment
Build
pnpm build
Output: .output/public (static files)
Docker
FROM node:22-alpine AS builder
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN corepack enable && corepack prepare pnpm@10.27.0 --activate
RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm build
FROM nginx:alpine
COPY --from=builder /app/.output/public /usr/share/nginx/html
EXPOSE 80
License
Apache License 2.0 - see LICENSE
Description
A modern, responsive web management console for RustFS distributed file system, built with Vue 3 + Nuxt 4 + TypeScript + Tailwind CSS v4 and TypeScript.
Readme
Apache-2.0
37 MiB
Languages
TypeScript
90.3%
JavaScript
9.4%
CSS
0.3%