Skip to content

Restore original UI flow and add login-based dashboard with session auth#2

Open
Berkayprof wants to merge 1 commit into
mainfrom
codex/improve-client-management-system-codebase-3zud6v
Open

Restore original UI flow and add login-based dashboard with session auth#2
Berkayprof wants to merge 1 commit into
mainfrom
codex/improve-client-management-system-codebase-3zud6v

Conversation

@Berkayprof

Copy link
Copy Markdown
Owner

Motivation

  • A prior change removed the original UI flow (login, installer button and client details) and broke the dashboard experience, so the goal was to restore the original UX while applying conservative, functional improvements.

Description

  • Restored and enhanced the frontend UI (public/index.html, public/app.js, public/client.html) to include the login screen, home/client-list screen, background videos and the "Download Client Installer" link, plus Refresh and Logout controls and a last-updated timestamp.
  • Reworked the client-side logic to use a stored Bearer token (localStorage key cms_token), added login/logout flows, periodic loadClients() polling, and per-client actions (Remote Desktop mstsc:///<ip> and details).
  • Replaced the previous backend auth model with a small in-memory session store in server.js, added /login and /logout, protected GET /get-clients and GET /get-clients/:clientId with requireAuth, and preserved the legitimate client registration API POST /register-ip (accepts ip or client_ip, stores hostname, os, status, lastSeen).
  • Preserved and cleaned up styling in public/style.css and public/client.css to retain the original visual identity while improving layout/readability.

Testing

  • Syntax checked with node --check server.js and node --check public/app.js, both succeeded.
  • Started the server with environment variables and validated the main flows using curl commands: login (/login), client registration (/register-ip), authenticated client list (/get-clients with Authorization: Bearer <token>), and /health; these server-side checks completed successfully.
  • Attempted a Playwright browser screenshot to validate the UI visually, but the headless Chromium in this environment crashed with a SIGSEGV so the automated browser screenshot could not be captured (server-side API tests remain green).

Codex Task

@Berkayprof Berkayprof closed this Feb 10, 2026
@Berkayprof Berkayprof deleted the codex/improve-client-management-system-codebase-3zud6v branch February 10, 2026 20:12
@Berkayprof Berkayprof restored the codex/improve-client-management-system-codebase-3zud6v branch February 10, 2026 20:19
@Berkayprof Berkayprof reopened this Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant