Skip to content

feat: add client-side login gate for dashboard - #4

Open
hp0404 wants to merge 1 commit into
mainfrom
feat/auth-login
Open

feat: add client-side login gate for dashboard#4
hp0404 wants to merge 1 commit into
mainfrom
feat/auth-login

Conversation

@hp0404

@hp0404 hp0404 commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

What was done

Added a login screen with a single shared username/password gating the whole dashboard, styled to match the dashboard (RuBase palette, logo).

Details

  • src/auth/LoginScreen.tsx + .css — branded login form.
  • src/auth/auth.ts — credential check, session kept in sessionStorage.
  • src/App.tsx — gate: LoginScreen is shown until sign-in, then the dashboard.
  • Credentials are not stored in code: they are read from the env vars VITE_AUTH_USER / VITE_AUTH_PASS via .env.local (gitignored). A .env.example template is included.

Setup

cp .env.example .env.local
# fill in VITE_AUTH_USER and VITE_AUTH_PASS

Note: this is a front-end-only app, so the gate is client-side (a soft barrier against casual viewing), not server-side authentication. It does not protect the data bundled into the build.

Verification

  • tsc --noEmit — no errors.
  • npm run dev -- --host 127.0.0.1 — sign-in works; the dashboard opens after a successful login.

Add a shared-credential login screen styled to match the RuBase dashboard
palette. Credentials are read from VITE_AUTH_USER / VITE_AUTH_PASS env vars
(.env.local, gitignored) so they are never committed. Auth state is kept in
sessionStorage for the session.
@hp0404
hp0404 requested a review from sdspieg June 25, 2026 12:03
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