Commit Graph

764 Commits

Author SHA1 Message Date
bvandeusen 37e97d52ee chore: bump runtime targets to Python 3.14 and Node 22
Forward-looking pin per operator direction ("build for the future and not
rebuild the past"). Touches everywhere a version is named so all
downstream artifacts (Dockerfiles, ruff config, package.json engines)
agree.

Python 3.14 (released Oct 2025) is the current stable. Node 22 is the
most recent LTS line still receiving updates (Maintenance LTS since
Oct 2025); Node 24 (released Apr 2026) goes Active LTS in Oct 2026 and
will be the natural next bump.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 07:52:15 -04:00
bvandeusen a281620178 feat: add docker-compose stack (web/worker/scheduler/ml-worker + postgres + redis)
Prod compose references the Forgejo registry; dev compose builds locally
and exposes DB/Redis ports. Volume layout: ./images, ./import, ./downloads,
./models (all gitignored, anchored to repo root). Plain HTTP only — no TLS
in-app (spec §2.1).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 07:42:36 -04:00
bvandeusen ec03297382 feat: add Dockerfile.ml — separate image for the ml-worker role
ML deps (torch, transformers, onnxruntime, opencv) are ~4GB and stay out
of the regular web/worker image. Models self-heal into /models on start
(implemented in FC-2). HuggingFace cache vars point inside /models so
weight downloads are persistent across restarts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 07:42:14 -04:00
bvandeusen 1db0167bfc feat: add Dockerfile for web/worker/scheduler roles and entrypoint script
Multi-stage build: node:20 builds the SPA, python:3.12-slim runs the app.
Same image handles web, worker, scheduler roles via entrypoint.sh's first
arg. ffmpeg + unar are baked in for FC-2's transcode + archive paths.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 07:42:04 -04:00
bvandeusen 8e61dc4df4 feat: serve the built Vue SPA from Quart with history-mode fallback
The frontend blueprint is registered after the api blueprint so /api/*
routes are matched first; everything else falls through to the SPA.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 07:36:16 -04:00
bvandeusen bcd9a23501 feat: add SPA app shell, router, system store, and route placeholders
Nav lists every FC-2 and FC-3 surface with a placeholder view that names
the sub-project that will fill it. System store polls /api/health on mount
and renders a status pip in the nav footer.

Favicon uses Curator's aged amber accent (#A87338).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 07:36:01 -04:00
bvandeusen ad2ac31f1a feat: scaffold Vue 3 + Vuetify + Pinia frontend themed to FabledDesignSystem
Curator signature accent (#A87338, aged amber) is baked into
fabled-tokens.js. Vuetify theme consumes the same tokens module the rest
of the SPA does, so updating design system tokens propagates throughout.
Vite dev server proxies /api and /ws to the Quart backend.

App.vue references AppShell (lands in Task 9) and main.js references
router.js (lands in Task 9) — these are intentionally split so Task 8 is
the framework scaffold and Task 9 is the navigation/shell content.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 07:35:33 -04:00
bvandeusen 8b5711abef docs: add module docstring to tasks package __init__ 2026-05-14 07:35:01 -04:00
bvandeusen 8773f2aae6 feat: configure Celery with per-feature queue lanes and a smoke task
Routes are pre-declared for FC-2/FC-3 task modules (import, ml, thumbnail,
download, scan, maintenance). Queue lanes match the ImageRepo pattern where
beat+maintenance run on a separate worker so long imports don't starve
periodic tasks. Smoke ping task confirms the wiring in eager mode for CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 07:34:47 -04:00
bvandeusen d6a156dcd2 feat: define unified schema (Artist, Source, Post, ImageRecord, etc.) and initial migration
Implements the data model from spec §3 in one go so FC-2/FC-3 don't need
schema-adding migrations of their own. Artist is the unified entity for
both gallery 'artist:' tags and GallerySubscriber Subscriptions
(is_subscription flag). ImageProvenance is many-to-one, enabling the
enrich-on-duplicate rule for downloaded content that pHash-matches an
existing record.

The SigLIP embedding column uses pgvector(1152) for SigLIP-so400m;
swapping models in FC-2 will require a column-width migration.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 07:34:29 -04:00
bvandeusen a03655039c feat: add SQLAlchemy declarative base, Alembic environment, and gitignore fix
Configures stable constraint naming so autogeneration produces clean diffs.
Alembic uses the sync psycopg driver while the runtime app uses asyncpg.

Also fixes a .gitignore bug caught during this task: the bare 'models/'
rule for the ML weights volume was matching backend/app/models/ (Python
package). Anchored all volume rules to repo root (/images/, /import/,
/downloads/, /models/, /postgres_data/, /redis_data/).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 07:32:58 -04:00
bvandeusen fe0a311d39 feat: add Quart app factory, config loader, and /api/health endpoint
Config reads from env vars (12-factor); .env.example documents defaults.
Health endpoint is liveness-only (no DB/Redis touch). Test added for CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 07:32:17 -04:00
bvandeusen 13eaa35f1c feat: scaffold backend Python project (Quart + SQLAlchemy + Celery deps)
Pins runtime and ML deps separately so the regular web image stays lean.
Configures ruff for py312 with bugbear, async, and pyupgrade lints enabled.
psycopg sync driver included up-front for alembic.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 07:31:39 -04:00
bvandeusen 06f8f834dc chore: initialize repo with comprehensive .gitignore and README skeleton
Establishes the FabledRulebook-required ignore patterns (docs/superpowers/specs,
docs/superpowers/plans) plus Python/Node/Vite/extension/volumes/IDE rules from
spec §6.1 before any other code lands, so accidental adds can't leak. Also
ignores .claude/settings.local.json (per-user local overrides; shared
.claude/settings.json may be committed in the future).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 07:25:59 -04:00