Jean-Luc Makiola f01d71d6b4 feat(11-01): schema, service, and tests for sort_order + reorderCandidates
- Add sortOrder REAL column to threadCandidates schema (default 0)
- Add sort_order column to test helper CREATE TABLE
- Add reorderCandidatesSchema to shared/schemas.ts
- Add ReorderCandidates type to shared/types.ts
- getThreadWithCandidates now orders candidates by sort_order ASC
- createCandidate appends at max sort_order + 1000 (first = 1000)
- Add reorderCandidates service function (transaction, active-only guard)
- Add 5 new tests: ordering, appending, reorder success, resolved guard, missing thread
2026-03-16 22:21:42 +01:00
2026-03-14 20:07:01 +00:00

GearBox

A single-user web app for managing gear collections (bikepacking, sim racing, etc.), tracking weight and price, and planning purchases through research threads.

Features

  • Organize gear into categories with custom icons
  • Track weight and price for every item
  • Create setups (packing lists) from your collection with automatic weight/cost totals
  • Research threads for comparing candidates before buying
  • Image uploads for items and candidates

Quick Start

Create a docker-compose.yml:

services:
  gearbox:
    image: gitea.jeanlucmakiola.de/makiolaj/gearbox:latest
    container_name: gearbox
    ports:
      - "3000:3000"
    environment:
      - NODE_ENV=production
      - DATABASE_PATH=./data/gearbox.db
    volumes:
      - gearbox-data:/app/data
      - gearbox-uploads:/app/uploads
    healthcheck:
      test: ["CMD", "bun", "-e", "fetch('http://localhost:3000/api/health').then(r=>r.ok?process.exit(0):process.exit(1)).catch(()=>process.exit(1))"]
      interval: 30s
      timeout: 5s
      start_period: 10s
      retries: 3
    restart: unless-stopped

volumes:
  gearbox-data:
  gearbox-uploads:

Then run:

docker compose up -d

GearBox will be available at http://localhost:3000.

Docker

docker run -d \
  --name gearbox \
  -p 3000:3000 \
  -e NODE_ENV=production \
  -e DATABASE_PATH=./data/gearbox.db \
  -v gearbox-data:/app/data \
  -v gearbox-uploads:/app/uploads \
  --restart unless-stopped \
  gitea.jeanlucmakiola.de/makiolaj/gearbox:latest

Data

All data is stored in two Docker volumes:

  • gearbox-data -- SQLite database
  • gearbox-uploads -- uploaded images

Back up these volumes to preserve your data.

Updating

docker compose pull
docker compose up -d

Database migrations run automatically on startup.

Description
No description provided
Readme Apache-2.0 1.3 MiB
v1.2.0 Latest
2026-03-15 23:10:35 +00:00
Languages
TypeScript 99.6%
Dockerfile 0.3%
HTML 0.1%