|
| 1 | +# Shieldmaiden |
| 2 | + |
| 3 | +D&D combat tracker web app built with Vue 2 + Quasar 1 + Firebase. |
| 4 | + |
| 5 | +## Tech Stack |
| 6 | + |
| 7 | +- **Framework**: Vue 2.7 + Quasar 1 (SSR mode) |
| 8 | +- **Build**: Webpack 4 via `@quasar/app ~2.4.3` |
| 9 | +- **Backend**: Firebase v8 (namespaced API — do NOT migrate to modular v10+ API) |
| 10 | +- **State**: Vuex with modules in `src/store/modules/` |
| 11 | +- **Node**: >= 24, npm >= 10.2.4 |
| 12 | + |
| 13 | +## Dev Commands |
| 14 | + |
| 15 | +```bash |
| 16 | +npm run ssr # Start dev server (SSR mode) |
| 17 | +npm run build # quasar build -m ssr |
| 18 | +npm run lint # ESLint |
| 19 | +``` |
| 20 | + |
| 21 | +## File Editing Rules |
| 22 | + |
| 23 | +- **Always use the `Edit` or `Write` tools** to modify files — never use Bash, `sed`, `awk`, `python`, or `node` for file editing |
| 24 | +- If the `Edit` tool fails due to whitespace mismatches, investigate the exact characters with `cat -A` and adjust the match — do not fall back to shell scripts |
| 25 | + |
| 26 | +## Vue Component Rules |
| 27 | + |
| 28 | +- `computed`, `data`, `methods`, `watch`, `props` and all other component options can only appear **once** per Vue component — JavaScript silently discards the first when two keys share the same name. Always merge into a single block rather than adding a second one. |
| 29 | + |
| 30 | +## Key Constraints |
| 31 | + |
| 32 | +- **Firebase v8 namespaced API** is used across 63+ files — do not switch to modular API |
| 33 | +- Vue 2 / Quasar 1 ecosystem locks transitive deps (postcss 7, webpack 4, etc.) |
| 34 | +- Many audit vulnerabilities are unfixable without framework migration — do not attempt to fix them |
| 35 | +- `package.json` uses `overrides` to force-update transitive deps |
| 36 | + |
| 37 | +## Project Structure |
| 38 | + |
| 39 | +``` |
| 40 | +src/ |
| 41 | + boot/ # Quasar boot files (plugins, firebase-auth, etc.) |
| 42 | + components/ # Vue components |
| 43 | + layouts/ # App layouts |
| 44 | + views/ # Page-level views |
| 45 | + store/ # Vuex store |
| 46 | + modules/ |
| 47 | + userContent/ # User data (campaigns, encounters, players, etc.) |
| 48 | + content/ # API content (spells, monsters, items, conditions) |
| 49 | + services/ # Firebase service layer (one file per resource) |
| 50 | + utils/ |
| 51 | + generalFunctions.js # Shared utility functions |
| 52 | + generalConstants.js # Shared constants |
| 53 | +``` |
| 54 | + |
| 55 | +## Patterns |
| 56 | + |
| 57 | +- Services in `src/services/` handle Firebase reads/writes |
| 58 | +- Vuex modules dispatch to services and cache results in state |
| 59 | +- Extension communication uses `window.postMessage` bridge (not `chrome.runtime` directly) |
| 60 | +- Utility functions go in `src/utils/generalFunctions.js` |
| 61 | + |
| 62 | +## Planning Artifacts |
| 63 | +Feature specs live in `.planning/`. |
| 64 | +- Always check `.planning/` for an existing spec before investigating or implementing anything |
| 65 | +- When writing a spec, always write it to `.planning/<feature-name>.md` |
| 66 | +- Never begin implementation without a spec file present in `.planning/` |
| 67 | + |
| 68 | + |
| 69 | +## Git Workflow |
| 70 | + |
| 71 | +We use **Git Flow**. Follow these rules strictly: |
| 72 | + |
| 73 | +### Branch Structure |
| 74 | +- `main` — production releases only |
| 75 | +- `develop` — integration branch |
| 76 | +- `feature/*` — new features, branched from `develop` |
| 77 | +- `release/*` — release preparation, branched from `develop` |
| 78 | +- `hotfix/*` — urgent production fixes, branched from `main` |
| 79 | + |
| 80 | +### Merging Rules |
| 81 | +- **Features**: open a PR from `feature/*` → `develop` |
| 82 | +- **Releases**: merge `release/*` → `main` AND `develop` (no PR required) |
| 83 | +- **Hotfixes**: merge `hotfix/*` → `main` AND `develop` (no PR required) |
| 84 | +- Never merge features directly to `main` |
| 85 | + |
| 86 | +### Tags |
| 87 | +- Tag every merge to `main` with the version number (e.g. `2.39.2`) |
| 88 | + |
| 89 | +### Commits & PRs |
| 90 | +- Do NOT add Claude as a co-author in commits or PR descriptions |
0 commit comments