Vue 3 (<script setup>, Composition API) + TypeScript 5.8 + Vite 6 + Element Plus 2.13 + Pinia 3 + Vue Router 4 + Axios. No preprocessor (plain CSS + scoped styles). No test framework. No ESLint. npm (lockfile v3). Node >=18.
| Command | What it does |
|---|---|
npm run dev |
Vite dev server (proxies /api → http://localhost:8080, strips prefix) |
npm run build |
vue-tsc -b && vite build — type-check must pass before build |
npm run preview |
Vite preview of built output |
npm run api:gen |
Runs Orval — requires backend at localhost:8080 with /v3/api-docs |
Format only with npx prettier --write . (no config file, uses Prettier defaults).
src/api/ is auto-generated by Orval. Never hand-edit files under src/api/ or src/api/models/. Edit the OpenAPI spec (backend) instead, then re-run npm run api:gen.@/ path alias maps to ./src/ (configured in both tsconfig and vite).npm run build runs vue-tsc -b first — unused locals/params (noUnusedLocals, noUnusedParameters) cause build failure.erasableSyntaxOnly: true — no enums, no namespaces, no constructor parameter properties.pinia-plugin-persistedstate — both stores (meta, user) have persist: true (localStorage). Auth token is persisted there, not manually in localStorage./login.src/main.ts → creates Vue app, installs Pinia → Router → ElementPlus → mounts #app.requiresAdmin: true gates admin routes via beforeEach guard.getAuthController, getUserController) use custom Axios instance from src/util/axios-instance.ts.LoginView (auth), UserView (admin CRUD), HomeView, AboutView.UserLayout (public, horizontal nav), AdminLayout (sidebar + header).| Remote | URL | Push allowed? |
|---|---|---|
gogs |
git@git.anyi.space:gdit/lt_ui.git |
Yes — team repo, always push here |
origin |
git@git.anyi.space:yangyi/ui_template.git |
No — personal fork, never push |
Always use git push gogs. Never push to origin.