# Tech Context — Strava Frontend ## Stack - **Vue 3** (3.5) + **TypeScript** 5.8 (strict mode, `noEmit`) - **Vite** 5 (dev server, bundler) with `@vitejs/plugin-vue` 5 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-chartjs` 5 (+ zoom/geo/adapter-moment plugins) — charts - **vue-yandex-maps** — Yandex Maps integration ## Tooling - **ESLint** 9 flat config (`eslint.config.mjs`) with `vue`, `typescript-eslint` 8, `prettier` plugins - **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 server - `yarn build` — `vue-tsc --noEmit && vite build` - `yarn lint` — eslint --fix over src - `yarn format` — prettier --write - `yarn build:ci` / `yarn start:ci` — CI build + static serve ## Environment - API host is a hardcoded constant `HOST` in `src/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` (default `ru`). - Deploy: Dockerfile (**node:22**, `yarn install --frozen-lockfile`) + `nginx.conf`; `run.sh` local 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 backend `app/web/errors.py`). - Keep `vue-tsc` clean — build fails on type errors.