2.0 KiB
2.0 KiB
Tech Context — Strava Frontend
Stack
- Vue 3 (3.5) + TypeScript 5.8 (strict mode,
noEmit) - Vite 5 (dev server, bundler) with
@vitejs/plugin-vue5 and@intlify/unplugin-vue-i18n/vite - Pinia 3 — state management (options-style stores; vue ≥3.3 required)
- vue-router 4 — history-mode routing
- vue-i18n 9 — i18n (composition mode, default/fallback
ru) - Vuestic UI 1.9 — component library (+
@vuestic/tailwind) - Tailwind CSS 3.4 + PostCSS + autoprefixer — utilities/styling
- Sass — global styles
- Axios 1.6 — HTTP client
- Chart.js 4 +
vue-chartjs5 (+ zoom/geo/adapter-moment plugins) — charts - vue-yandex-maps — Yandex Maps integration
Tooling
- ESLint 9 flat config (
eslint.config.mjs) withvue,typescript-eslint8,prettierplugins - Prettier 3 — formatting
- Husky + lint-staged — pre-commit lint of
src/**/*.{ts,js,vue} - vue-tsc 2 — type checking at build
Scripts (package.json)
yarn dev— Vite dev serveryarn build—vue-tsc --noEmit && vite buildyarn lint— eslint --fix over srcyarn format— prettier --writeyarn build:ci/yarn start:ci— CI build + static serve
Environment
- API host is a hardcoded constant
HOSTinsrc/main.ts(no.env-driven base URL). Yandex Maps API key and GTM keys are hardcoded / env-driven (VITE_APP_GTM_ENABLED,VITE_APP_GTM_KEY). - Locales:
br, cn, es, gb, ir, ru(defaultru). - Deploy: Dockerfile (node:22,
yarn install --frozen-lockfile) +nginx.conf;run.shlocal runner. - Dev environment requires Node ≥18.19 (vite 5); Docker uses node:22 (eslint 9 transitives need ≥20).
Constraints
- No test framework configured (no vitest/jest/cypress). Verification =
yarn lint+yarn build. - Backend API contract:
/api/v0/*, JWT Bearer auth, error envelope may be{ code, message, detail }(see backendapp/web/errors.py). - Keep
vue-tscclean — build fails on type errors.