This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Vue 3 + TypeScript + Vite mobile H5 application for a music/digital classroom system (音乐数字课堂). It's built with Naive UI component library and uses Pinia for state management. The app is a PWA (Progressive Web App) with offline capabilities.
# Development server (port 5005)
npm run dev
npm start
# Production build (includes type check)
npm run build
# Development build (no type check)
npm run build:dev
# Preview production build
npm run serve
# Lint and fix files
npm run lint
# Generate component/page templates via plop
npm run generate
createWebHashHistory with base path /classroomsrc/router/index.tssrc/router/router-guards.ts handle auth, title updates, and cache clearinggetAuthForAdmin() token handlingLocated in src/store/modules/:
users.ts - User authentication, token, profile infoprepareLessons.ts - Lesson preparation statecatchData.ts - Cached datadesignSetting.ts - UI settingsumi-request (configured in src/utils/request.ts)Defined in vite.config.ts and tsconfig.json:
@ → src/@common → src/common/@components → src/components/@store → src/store/@views → src/views//attend-class - Main classroom teaching interface with tools (whiteboard, pen, metronome, timer, roll call)/prepare-lessons - Lesson preparation with courseware, resources, training presets/notation - Music score editor/xiaoku-* - Music library, AI practice features/content-* - Content information (instruments, musicians, music theory)/natural-resources - Resource library/data-module - Data/statistics viewsrc/components/layout/ - Main layout with sidebar navigation (TSX components)src/components/card-type/ - Various card types (video player, etc.)src/components/ (CSelect, CDatePicker, CBreadcrumb)postcss-px2rem with remUnit: 16lib-flexible for responsive font sizingvite-plugin-pwa configured with registerType: 'prompt'App.tsxsrc/styles/index.less.module.less patternsrc/main.ts - App bootstrap, mounts Naive UI, Pinia, Routersrc/plugins/naive.ts - Naive UI setup with global $message, $loadingBar injectionsrc/utils/rem.ts - Mobile responsive base sizingsrc/utils/storage.ts - Local storage wrapper with expiration supportsrc/utils/cipher.ts - AES encryption utilities