remarkbox/CLAUDE.md
russell@unturf.com f0e365fd43 Add GET /api/v1/version endpoint for deploy verification
Returns the git commit hash of the running code. CLAUDE.md
updated to check this endpoint after pushing to confirm
deployment is live.
2026-02-01 16:44:42 -05:00

2.2 KiB

Claude Code Configuration

Project Setup

IMPORTANT: Before starting any work on a repository:

  1. Check for a CLAUDE.md file in the repository root
  2. Check for a CLAUDE.md file in parent directories (we often work across repos on localhost)
  3. Read and follow all instructions in those files
  4. These project-specific instructions override default Claude Code behavior
  5. Look for conventions around commits, testing, code style, and workflows
  6. If working across multiple repositories, respect the conventions from each repo's CLAUDE.md

Commit Attribution

When creating git commits, use clean, simple commit messages:

Commit message here.

Do NOT include:

  • 🤖 Generated with [Claude Code](https://claude.com/claude-code)
  • Co-Authored-By: Claude <noreply@anthropic.com>
  • Any fake corporate entities as co-authors

Only attribute real humans as co-authors when collaborating.

Database Migrations (Alembic)

When adding new columns or modifying the database schema:

  1. Backup SQLite first: cp data/remarkbox.sqlite data/remarkbox.sqlite.bak
  2. Add the column to the model in remarkbox/models/
  3. Generate migration: alembic -c development.ini revision --autogenerate -m "description"
  4. Clean up migration: Remove extra autogenerated changes, keep only the new field
  5. Run migration: alembic -c development.ini upgrade head

Production Troubleshooting

For read-only troubleshooting on production, use tmux-hosts:

tmux-hosts

Important: This is for read-only investigation only. Do not make changes to production systems.

Deployment Status

After pushing, check if the deploy is live by hitting the version endpoint:

curl -s https://my.remarkbox.com/api/v1/version
# {"version": "5a10e15"}

Compare the returned commit hash against git rev-parse --short HEAD to confirm the latest code is deployed.

You can also check GitLab pipeline status:

# Get pipeline status via API (replace PIPELINE_ID)
curl -s "https://git.unturf.com/api/v4/projects/engineering%2Fremarkbox%2Fremarkbox/pipelines/PIPELINE_ID"

# Or view in browser:
# https://git.unturf.com/engineering/remarkbox/remarkbox/-/pipelines

The pipeline status will show "status":"success" when deployment is complete.