12 Commits
Author SHA1 Message Date
devil 49cfe2d8e0 fix(schema): cascade-delete VideoConfig/LintResult/BulkJobItem/VideoPlaylist with their Video
Channel import crashed on the hard-delete purge path (videos confirmed
gone from YouTube for 30+ days): prisma.video.deleteMany() hit a FK
violation on VideoConfig_videoId_fkey. All four required relations
pointing at Video had no onDelete behavior set, defaulting to RESTRICT
- any of the four would have hit the same crash, not just VideoConfig.
First real channel import against a real, aged dataset is what
surfaced this; nothing had exercised the 30-day hard-delete path before.
2026-08-11 17:14:20 +02:00
devil 0ac1ca3b08 fix(scripts): disable MSYS path translation in migrate-local-db-to-server.sh
pg_dump inside the container failed with "could not open output file
C:/Users/.../Temp/studioflow_migration_....dump" - Git Bash/MSYS was
rewriting the /tmp/... argument into a Windows path before handing it
to docker.exe, even though it's meant to be interpreted inside the
Linux container. MSYS_NO_PATHCONV=1 stops that translation.
2026-08-11 17:08:09 +02:00
devil b8c4cebad5 chore(scripts): add local-to-server DB migration script
One-time tool: dumps the local dev Postgres, scp's it to the server,
and restores it into the remote postgres container over SSH - drops
and recreates the target database, so it prompts for an explicit YES
before touching the remote side. Connection details are placeholders
(SSH_USER/SSH_HOST/etc.) filled in via env vars or direct edits, never
committed with real values.
2026-08-11 16:45:24 +02:00
devil baf827df29 fix(auth): set supplementalVideoIds on first-login channel creation
upsertGoogleUser's nested channels.create (the auto-provisioning path
for a brand new team's first Google login) never set
supplementalVideoIds, a required String[] column with no DB default
(dropped intentionally in 20260608000002 to match the Prisma schema).
channel-import.service.ts already sets it explicitly on its create path
- this path was just missed, and nothing had exercised a real first
login against Postgres until now.
2026-08-11 16:33:22 +02:00
devil ba409ca53b fix(backend): compiled output was nested under dist/src, not dist/
api container crashed on boot: Cannot find module '/app/dist/main.js'.
Root cause: tsconfig.json had no rootDir, and prisma/make-admin.ts (run
separately via ts-node, never part of the Nest build) was swept into
the nest build compilation since there was no exclude either - so tsc
inferred the output root as the project root and nested everything
under dist/src/ instead of the flat dist/main.js the Dockerfile,
package.json scripts, and compose's worker command all assume.

Also excludes tsconfig.tsbuildinfo from the Docker build context - a
stale local incremental-build cache file was leaking in via `COPY . .`
(only dist/node_modules were dockerignored) and made nest build skip
emitting .js files entirely on a from-scratch container build once the
rootDir fix invalidated its cached signature.
2026-08-11 16:10:44 +02:00
devil 811c14ee73 fix(infrastructure): don't let a slow/unhealthy api block deploy
Portainer's compose up blocks on frontend's api: condition:
service_healthy dependency and, on timeout, tears down everything it
just created - so an unhealthy api container never stuck around long
enough to pull logs from. Relaxed to service_started (frontend doesn't
need api ready at container-start), and gave the api healthcheck more
runway (60s start_period, 10 retries @ 10s) in case it's just slow to
boot rather than crashing.
2026-08-11 15:53:06 +02:00
devil ba8c7185a7 fix(infrastructure): use the actual Traefik network name (proxy)
The external network on the target server is named "proxy", not
traefik-network as originally assumed - deploy was failing with
"network traefik-network not found". Updated the compose file and
both the infra README and vault deployment doc to match.
2026-08-11 15:43:06 +02:00
devil b122ab4ac0 chore(infrastructure): force image re-pull on redeploy for Portainer
pull_policy: always on the four studioflow services (migrate, api,
worker, frontend) so redeploying the stack in Portainer actually fetches
the latest pushed image instead of reusing a stale local layer for the
mutable `latest`/IMAGE_TAG reference. Third-party pinned images
(postgres, redis) are left on default pull behavior.
2026-08-11 15:18:04 +02:00
devil d6ff99e8a4 feat(infrastructure): pull pre-built images from Gitea registry
migrate/api/worker/frontend now reference
git.devils.zone/devil/youtube-studio-flow-{backend,frontend}:\${IMAGE_TAG}
instead of building on the deploy host. Adds scripts/build-and-push.sh
to build+tag (git short SHA + latest) and push both images from a dev
machine, and updates infrastructure/README.md with the pull-based
deploy sequence.
2026-08-11 14:18:30 +02:00
devil b51c79e889 fix(frontend): resolve build-blocking lint and type errors
next build runs ESLint + full type-check and fails on errors (not just
warnings) - the production build was broken. Fixes: unused imports/vars,
any-typed diff/preference lookups replaced with the actual union/Record
types, ternary-as-statement flagged by no-unused-expressions, unescaped
JSX entities, a UserPreferences interface missing two fields the video
editor already reads/writes at runtime, and an import of
ColumnVisibilityState which @tanstack/react-table does not export
(the real name is VisibilityState).
2026-08-11 14:18:26 +02:00
devil 5a1f9a2e50 chore: add automated git commit/push workflow and changelog generation
Adds the git-workflow skill (Conventional Commits, auto-commit/push
policy, changelog process), CHANGELOG.md seeded from history, and
scripts/generate-changelog.sh to group commits by type. PRs remain
manual by design.
2026-08-11 12:53:35 +02:00
devil d5af006443 Initial commit: YouTube Studio Flow (backend, frontend, infrastructure, docs) 2026-08-11 12:27:44 +02:00