mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 09:47:22 +01:00
First-run flow: - /setup page + /api/setup: creates first user with hashed password (Node crypto scrypt, no new deps). POST rejects if users already exist. - Landing page redirects to /setup when DB has no users - middleware.ts: protects app routes, passes public pages through Auth: - passwordHash column added to users schema (drizzle-kit push applied) - src/lib/password.ts: hashPassword/verifyPassword via Node scrypt - auth.ts Credentials: env var takes priority, falls back to DB hash so packaged installs work without LOCAL_AUTH_PASSWORD Multi-tenancy groundwork: - Replaced DEFAULT_USER_ID with getCurrentUserId() across all 12 API route files (people, subscriptions, events, goals, projects, commitments) Docker: - Dockerfile: multi-stage Node 22 alpine, standalone output - docker-compose.yml: postgres + migrate + app services - .dockerignore, .env.example with documented required vars - next.config.ts: output: standalone - package.json: added migrate script (drizzle-kit push) - tsconfig.json: scope to src/ only, exclude .next generated files Install: clone → cp .env.example .env.local → docker-compose up First visit → /setup → create account → sign in → done. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
11 lines
96 B
Plaintext
11 lines
96 B
Plaintext
.git
|
|
.gitignore
|
|
.env.local
|
|
.env*.local
|
|
node_modules
|
|
.next
|
|
README.md
|
|
docs/
|
|
scripts/seed.ts
|
|
*.log
|