Update CLAUDE.md with Salt deploy notes, CI/CD details, mobile layout docs
This commit is contained in:
parent
11056cf208
commit
2ad12262df
1 changed files with 25 additions and 2 deletions
27
CLAUDE.md
27
CLAUDE.md
|
|
@ -4,8 +4,14 @@
|
|||
|
||||
- Application: `https://my.makepostsell.com`
|
||||
- Version check: `https://my.makepostsell.com/version`
|
||||
- Prod shell: `tmux-hosts` — look for `my.makepostsell.com` (typically tmux window `0:2`)
|
||||
- Prod shell: `tmux-hosts` — look for `my.makepostsell.com` (typically tmux window `0:3`) — **READ-ONLY, never deploy/fix from tmux**
|
||||
- Media CDN: `plan-period-files.nyc3.cdn.digitaloceanspaces.com` (DigitalOcean Spaces)
|
||||
- Deploy pipeline: `git push` → GitLab CI (test → build → deploy) → `salt-call state.highstate` on prod
|
||||
- Salt states: `~/git/foxhop-states/uwsgi/` — note: MPS uses `caddy_sites.sls`, NOT `sites.sls`
|
||||
- Salt pillar: `~/git/foxhop-pillar/uwsgi/makepostsell/init.sls`
|
||||
- DB path on prod: `/opt/make_post_sell/make_post_sell.sqlite` (owned by `uwsgi`, need `sudo` for writes)
|
||||
- Timestamps in DB are **milliseconds** not seconds (13 digits)
|
||||
- uWSGI: 2 processes, 8 threads, reload-on-rss 512MB (pillar-configurable), Caddy reverse proxy on :6001
|
||||
|
||||
### Media Architecture
|
||||
|
||||
|
|
@ -223,7 +229,7 @@ Always use `uuid_str` when you need a string copy of the identifier. Models inhe
|
|||
2. **`updatePageContent()` in watch.js** updates the same element during SPA navigation
|
||||
3. **The watch JSON endpoint** (`watch.py`) returns any new data the JS needs
|
||||
|
||||
Elements that must stay in sync: CTA edit button, download button, comment form `product_id`, file type/size, description, title, canonical link, related items. If you add a new product-specific element, add it to all three layers.
|
||||
Elements that must stay in sync: CTA edit button, download button, comment form `product_id`, file type/size, description, title, canonical link, related items, comments link count. If you add a new product-specific element, add it to all three layers.
|
||||
|
||||
**TESTING INTEGRITY**: NEVER skip, delete, or disable unit tests or integration tests when they break. When tests fail:
|
||||
1. **FIX THE TESTS** - Update them to work with new functionality
|
||||
|
|
@ -267,6 +273,23 @@ new comment into the DOM without a page reload (preserving media playback).
|
|||
The server returns JSON (HTTP 201) for AJAX requests and falls back to the
|
||||
normal redirect flow on any error.
|
||||
|
||||
## CI/CD Notes
|
||||
|
||||
- Build uses `virtualenv-clone` which requires `bin/python` symlink (Python 3.12 `venv` may only create `python3`)
|
||||
- The CI creates a symlink before cloning: `test -f env/bin/python || ln -sf python3 env/bin/python`
|
||||
- When updating Salt states (foxhop-states), always run `salt-run fileserver.update` on the salt master before triggering a deploy — gitfs cache can serve stale files
|
||||
- MPS uses `caddy_sites.sls` (NOT `sites.sls`) — changes to the uwsgi service template context must be added to **both** files
|
||||
|
||||
## Mobile Layout
|
||||
|
||||
On mobile (`max-width: 800px`), the product page reorders to single column:
|
||||
1. `product-images` (order 1) — sticky in watch mode
|
||||
2. `product-right` (order 2) — price, download, related content
|
||||
3. `product-description` (order 3)
|
||||
4. `product-comments` (order 4)
|
||||
|
||||
Related content on mobile shows only 7 next items (vs 42 on desktop) via `.related-content-overflow` class. A "Comments (N)" anchor link appears on mobile to jump to the comments section below.
|
||||
|
||||
## Style
|
||||
|
||||
- **Never use "AI" — always say "machine learning."** We grow machine learning, not "AI." This term is forbidden in all permacomputer discourse, marketing, & documentation.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue