<script setup> + TypeScript (strict) + Vite 6 + Element Plus + Pinia + Vue Router 4src/main.ts — mounts Element Plus, router, and Pinia (with pinia-plugin-persistedstate)orval.config.ts — reads http://localhost:8090/v3/api-docs, writes to src/api/endpoints/ and src/api/models/getItems(), getOrders(), etc., each returning { methodName: () => Promise<T> }src/api/endpoints/ are Orval-generated — run npm run api:gen to regeneratesrc/util/axios-instance.ts (session-based, withCredentials: true, no Bearer token, 401 redirect via router)ResultPageResultItemVO, ResultUserProfileVO)src/router/index.ts — flat list with requiresAuth / requiresAdmin / requiresVerified / noAuth meta guards, all lazy-loaded
/home, /item/:id, /search, /publish, /my/items, /my/orders, /order/:id, /messages, /messages/:userId, /profile, /profile/password/admin/review/user, /admin/review/item, /admin/users, /admin/categoriesuseUserStore (auth, non-persisted — session-based) and useMetaStore (site config, persisted), both re-exported from src/store/index.tswithCredentials: true) — login() in store sets flat state; logout() clears state@/ → ./src/ (configured in both vite.config.ts and tsconfig.app.json)src/components/ImageUploader.vue (el-upload wrapper) and EmptyState.vue (empty placeholder)| Command | What it does |
|---|---|
npm run dev |
Start Vite dev server (proxies /api → http://localhost:8090, strips /api prefix) |
npm run build |
vue-tsc -b then vite build (typecheck must pass first) |
npm run preview |
Preview production build |
npm run api:gen |
Regenerate Orval API code (requires backend at localhost:8090/v3/api-docs) |
prettier --write after codegen). No ESLint. No test framework.noUnusedLocals, noUnusedParameters, erasableSyntaxOnly all on.work.md was used as the implementation plan and is now fully implemented (phases 1–7). Keep as historical reference.src/api/endpoints/ are Orval-generated from http://localhost:8090/v3/api-docs. Re-run npm run api:gen when the backend spec changes.dist/ is gitignored. The large index chunk (Element Plus) can be split via build.rollupOptions.output.manualChunks if needed.const Xxx = () => import('@/view/Xxx.vue'). Admin views are under src/view/admin/.src/type/ was removed — all type definitions now come from src/api/models/ (Orval-generated) or are inlined in endpoint stubs.