Phase 1a: foundation and accounts #2

Manually merged
marvin8 merged 13 commits from feat/issue-1-phase-1a-foundation into main 2026-10-08 07:15:23 +00:00
Collaborator

Implements Phase 1a — the foundation and invite-only account system for xique, per issue #1.

What this adds

  • Python 3.14 package scaffold, tooling (ruff/ty/tryke/prek), and env-driven settings.
  • SQLite layer (aiosqlite, WAL) with a hand-rolled versioned migration mechanism, per-request web connections, and single-owner migrations (worker migrates, web only verifies).
  • Auth primitives: argon2 password hashing, session tokens hashed at rest, CSRF tokens.
  • Users/sessions/invites data access, with DB-enforced foreign keys.
  • FastAPI app factory, per-request DB dependency, session/CSRF auth dependencies, server-rendered templates (zero JavaScript).
  • Auth routes: first-run /setup (admin-once, atomic), /login (constant-time unknown-user path, password cap), /logout, /invite/{code} (atomic single-use redemption), with open-redirect-hardened next handling.
  • Worker skeleton and jobs queue with an atomic claim.

Notes

  • Design spec: .superpowers/specs/2026-10-08-xique-design.md (local working artifact, not committed per AGENTS.md).
  • Implementation plan: .superpowers/plans/2026-10-08-xique-01-foundation.md.
  • Jellyfin sync, Trakt import, the recommendation engine, the browse UI, and containers are later plans, tracked under milestones #8–#11.
  • SQLite connect sets busy_timeout before switching to WAL and retries the WAL switch on the lock condition (the busy handler is not consulted for the journal-mode switch).

Closes #1

Implements Phase 1a — the foundation and invite-only account system for xique, per issue #1. ## What this adds - Python 3.14 package scaffold, tooling (ruff/ty/tryke/prek), and env-driven settings. - SQLite layer (aiosqlite, WAL) with a hand-rolled versioned migration mechanism, per-request web connections, and single-owner migrations (worker migrates, web only verifies). - Auth primitives: argon2 password hashing, session tokens hashed at rest, CSRF tokens. - Users/sessions/invites data access, with DB-enforced foreign keys. - FastAPI app factory, per-request DB dependency, session/CSRF auth dependencies, server-rendered templates (zero JavaScript). - Auth routes: first-run `/setup` (admin-once, atomic), `/login` (constant-time unknown-user path, password cap), `/logout`, `/invite/{code}` (atomic single-use redemption), with open-redirect-hardened `next` handling. - Worker skeleton and `jobs` queue with an atomic claim. ## Notes - Design spec: `.superpowers/specs/2026-10-08-xique-design.md` (local working artifact, not committed per AGENTS.md). - Implementation plan: `.superpowers/plans/2026-10-08-xique-01-foundation.md`. - Jellyfin sync, Trakt import, the recommendation engine, the browse UI, and containers are later plans, tracked under milestones #8–#11. - SQLite `connect` sets `busy_timeout` before switching to WAL and retries the WAL switch on the lock condition (the busy handler is not consulted for the journal-mode switch). Closes #1
👷 ci: add forgejo workflows, noxfile, expanded pre-commit
Some checks failed
ci.yml / :construction_worker: ci: add forgejo workflows, noxfile, expanded pre-commit (push) Failing after 0s
ci.yml / :construction_worker: ci: add forgejo workflows, noxfile, expanded pre-commit (pull_request) Failing after 0s
01f2d1af67
🐛 ci: fix duplicate workflow keys, add gitleaks and deptry config
All checks were successful
/ pr-review (pull_request) Successful in 6s
/ gitleaks (pull_request) Successful in 12s
/ checks (pull_request) Successful in 1m13s
/ container (pull_request) Has been skipped
/ publish-container (pull_request) Has been skipped
/ deploy-docs (pull_request) Has been skipped
0cf0ad1255

This PR is too large to review automatically (5807 lines; limit is 2000). Please consider splitting it into smaller PRs.

This PR is too large to review automatically (5807 lines; limit is 2000). Please consider splitting it into smaller PRs.
🔧 ci: adapt workflow to xique and align nox checks with pre-commit
All checks were successful
/ pr-review (pull_request) Successful in 7s
/ gitleaks (pull_request) Successful in 16s
/ checks (pull_request) Successful in 2m48s
/ container (pull_request) Has been skipped
/ publish-container (pull_request) Has been skipped
/ deploy-docs (pull_request) Has been skipped
e6917adc2b

This PR is too large to review automatically (5810 lines; limit is 2000). Please consider splitting it into smaller PRs.

This PR is too large to review automatically (5810 lines; limit is 2000). Please consider splitting it into smaller PRs.
marvin8 approved these changes 2026-10-08 07:12:39 +00:00
marvin8 manually merged commit 0788c8be49 into main 2026-10-08 07:15:23 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
marvin8/xique!2
No description provided.