From 0bfbd5809099e0aaed47d0a37a55952638d38060 Mon Sep 17 00:00:00 2001 From: Maxim Date: Thu, 11 Dec 2025 18:14:01 +0300 Subject: [PATCH] change logic to back --- AGENTS.md | 37 +++++ API.md | 52 +++++++ package-lock.json | 280 ++++++++++++++++++++++++++++++++++ package.json | 1 + src/components/Randomizer.vue | 220 +++++++++++++++++--------- src/stores/randomData.ts | 112 ++++++++++++++ 6 files changed, 630 insertions(+), 72 deletions(-) create mode 100644 AGENTS.md create mode 100644 API.md create mode 100644 src/stores/randomData.ts diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..7b467cd --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,37 @@ +# Repository Guidelines + +## Project Structure & Module Organization +- `src/main.ts` bootstraps the Vue app, mounts `App.vue`, and registers Pinia + router. +- `src/App.vue` hosts the layout shell; global theme styles live in `src/assets/main.css`. +- `src/pages` holds route-level views (e.g., `HomePage.vue`), wired in `src/router/index.ts`. +- `src/components` contains shareable UI (`Randomizer.vue`); aim to keep these presentational. +- `src/stores` stores state and side effects (e.g., `randomData.ts` for `/api/randomize` and localStorage prefs); static datasets sit in `src/data`. +- `public` serves static assets as-is; `vite.config.ts` configures aliases (`@` → `src`) and plugins. + +## Build, Test, and Development Commands +- `npm run dev` — start Vite dev server with hot reload. +- `npm run build` — type-check via `vue-tsc`, then produce the production bundle. +- `npm run build-only` — production bundle without type-check (useful for quick iteration). +- `npm run preview` — serve the built assets locally to verify production output. +- `npm run type-check` — standalone TS/SFC type validation. + +## Coding Style & Naming Conventions +- Vue 3 + TypeScript with `