Skip to content

Add dashboard login and per-user data scoping - #2

Merged
kv4u merged 1 commit into
mainfrom
feat/dashboard-auth
Oct 13, 2026
Merged

kv4u merged 1 commit into
mainfrom
feat/dashboard-auth

Conversation

@kv4u

@kv4u kv4u commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Summary

The web dashboard had no authentication: anyone who could reach the server could browse every project and session. This was the top item on the README roadmap.

  • Login: /login and /logout use session auth. Login is rate-limited to 5 attempts per minute, and every dashboard route now requires sign-in.
  • No public registration: accounts are created on the server with php artisan movez:user <email>, which asks for a password of at least 12 characters.
  • Per-user scoping: dashboard stats, projects, sessions and the migration wizard's project list only show the signed-in user's data. Other users' projects and sessions return 404, and the wizard rejects another user's project_id.
  • Unchanged: the sync API still uses Bearer tokens, not the login session.
  • Demo login: the seeder creates demo@movez.test / password, but only when APP_ENV is local or testing.
  • End-to-end tests: the Playwright suite signs in once through a setup project and saves that session. A new auth spec covers the guest redirect and a wrong password. CI now runs the suite.
  • Docs: the README, sync server guide and web README explain account creation, and the "no login yet" warnings are removed.

Test plan

  • cd web && php artisan test: 39 passed, including new auth, throttling, movez:user and cross-user isolation tests
  • npm run type-check and npm run build are clean
  • Playwright locally against the dev server: 14 passed
  • Checked by hand in the browser: a guest is redirected to /login, sign-in returns to the page originally requested, the dashboard shows only the user's own data, and sign-out works
  • The new Playwright CI step hasn't run on GitHub yet

🤖 Generated with Claude Code

The web dashboard was public: anyone who could reach the server could
browse every project and session.

- Session login (/login, rate-limited to 5 attempts/min) and logout;
  every dashboard route now requires auth. No public registration —
  accounts are created with `php artisan movez:user <email>`
- Dashboard counts, projects, sessions and the migration wizard only
  show the signed-in user's data; other users' records return 404
- Seeder adds a local-only demo login (demo@movez.test / password) used
  by the Playwright suite, which now signs in once via a setup project
- CI runs the Playwright end-to-end suite
- Docs: account creation and the removed "no login" warning

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kv4u
kv4u merged commit 38322a2 into main Oct 13, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant