Files
Art-gallery/.cursor/rules/dev-first-workflow.mdc
Danila KhodjaefandCursor a2263ca186 Document gallery loading markers, WebGL recovery, and movement filtering.
Update basics.md for the new loading indicators, 3D WebGL context-loss recovery, and the corrected movement-visibility rule (span overlap plus any catalogued artist). Refresh remaining docs and config for the current dev-first workflow and npm script names.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 12:36:34 +03:00

44 lines
1.7 KiB
Plaintext

---
description: Default to dev for all changes; prod only when explicitly requested
alwaysApply: true
---
# Development-first workflow
**Default target is always development** unless the user explicitly names **prod** / **production**.
## What "dev" means
| Layer | Dev default |
|-------|-------------|
| Code | Edit in this repo; run `npm run dev:web` on the dev PC |
| Database | `gallery_dev` via root `.env` (`DB_NAME=gallery_dev`) |
| Data / images | `data/images/` in the repo |
| Public URL | https://devgallery.mysuperlab.netcraze.pro |
| Migrations / seeds / scripts | `npm run dev:migrate`, `npm run dev:seed`, etc. against **dev** |
## Production is scheduled, not daily
Prod (`gallery_prod`, TrueNAS Docker, https://gallery.mysuperlab.netcraze.pro) is updated **roughly weekly** (or when the user explicitly asks for prod):
1. Validate on dev
2. `npm run dev:db:backup` → `npm run devtoprod:db:restore` (if DB/data changed)
3. `npm run devtoprod:images` (if images changed)
4. `npm run prod:docker:publish` (if code changed)
5. Restart **gallery-web** on TrueNAS
Do **not** edit `infra/docker/.env.prod`, run `db:restore:prod`, `images:sync-to-prod`, or `docker:publish` unless the user clearly targets prod.
## When the user says "fix", "change", or "modify"
- Assume **dev** code, **dev** DB, and **dev** data paths
- Test against devgallery or localhost
- Mention prod steps only as optional follow-up for the next release
## When the user says "prod" or "production"
- Use `gallery_prod`, `infra/docker/.env.prod`, TrueNAS compose, and prod deploy docs
- Require explicit confirmation before destructive prod operations (`db:restore:prod`, etc.)
Full operator guide: `Documentation/environments.md`