From f620cd96d471c703ea9f9901b6cefee42c98d8ae Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Thu, 15 Oct 2026 19:38:08 -0400 Subject: [PATCH] Document hosted per-user setup and plan per-browser settings README covers the Server-based Zoho client, the new .env settings, deployment (image, compose, Nginx Proxy Manager), signing in and the security model. NOTES records the Zoho OAuth gotchas and the decisions behind the rebuild. ROADMAP describes the current architecture and the planned per-browser settings panel. CLAUDE.md and SESSION.md are brought up to date. Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 30 +++++++++------- README.md | 93 ++++++++++++++++++++++++++++++++++--------------- SESSION.md | 50 ++++++++++++++++---------- docs/NOTES.md | 24 ++++++++----- docs/ROADMAP.md | 37 ++++++++++++-------- 5 files changed, 151 insertions(+), 83 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 70cea13..9101256 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,9 +4,9 @@ Context for Claude Code sessions in this repo. Keep this short. Longer notes liv ## Project -A help desk dashboard for ManageEngine ServiceDesk Plus Cloud (`ithelp.mainecc.edu`). It currently runs as a single Node/Express server. The central region (KVCC, EMCC, CMCC, MCCS) is configured through `.env`. +A help desk dashboard for ManageEngine ServiceDesk Plus Cloud (`ithelp.mainecc.edu`). It's a stateless Node/Express server, shipped as the Docker image `v0idf1sh/sdp-dashboard`, running behind Nginx Proxy Manager with an MCCS IP allow list. Each user signs in with their own Zoho account; the session is an encrypted cookie. The central region (KVCC, EMCC, CMCC, MCCS) is configured through `.env`. -- **Goal:** multi-region, multi-user, customisable. See `docs/ROADMAP.md`. +- **Goal and next steps:** per-browser settings and panel modules. See `docs/ROADMAP.md`. - **Decisions, API gotchas and known issues:** `docs/NOTES.md`. Read it before touching any SDP query. - **Latest session summary and handoff:** `SESSION.md`. @@ -17,23 +17,27 @@ npm install npm run app # node src/server.js from the repo root; .env lives in the repo root ``` -The app is served at . Sign in with the Connect button, which uses Zoho's device-code flow. +The app is served at . `.env` needs `CLIENT_ID`/`CLIENT_SECRET` from a Zoho **Server-based Application** client with `http://localhost:3000/auth/callback` as a redirect URI, plus a `SESSION_SECRET` of 32 or more characters. + +Releases: push a `v*-prod*` tag. `.gitea/workflows/docker.yml` builds and pushes the image; the VPS is updated by hand. ## Layout -- `src/server.js`: reads `.env` and starts everything. -- `src/auth.js`: Zoho device-code sign-in. -- `src/boardService.js`: token, state and refresh timers. -- `src/tickets.js`: all SDP queries (closed feed, status table, closed today, unassigned). -- `src/weather.js`: OpenWeatherMap, cached for 10 minutes. -- `src/routes.js`: the `/api/*` routes. -- `src/public/index.html`: the whole front end in one file (inline CSS and JS, no build step). +- `src/server.js`: reads `.env`, holds the region `settings` and `timing`, and starts Express. +- `src/auth.js`: Zoho web OAuth (authorization URL, code exchange, renewal, revoke, user info). +- `src/session.js`: the encrypted session cookie and the `requireSession` middleware, which renews the access token when it's due. +- `src/routes.js`: `/auth/*` (login, callback, logout) and `/api/*` (session, closed, workload, weather; all need a sign-in). +- `src/tickets.js`: all SDP queries (closed feed, status table, closed today, unassigned). A 401 from SDP is rethrown so the route signs the user out. +- `src/weather.js`: OpenWeatherMap, cached for 10 minutes and shared by all users. +- `src/public/index.html`: the whole front end in one file (inline CSS and JS, no build step). It runs the polling timers and keeps the closed feed. +- `Dockerfile`, `docker-compose.yml` (example for the VPS), `.gitea/workflows/docker.yml`. ## Working agreements -- Never print or commit `.env` values (Zoho client secret, OpenWeatherMap key). Redact them when inspecting. -- There are no automated tests yet. Verify server logic by stubbing `axios.get`. Resolve axios from the project with `require.resolve('axios', { paths: [dir] })` so the stub hits the same instance. Verify the page by evaluating its `