Commit Graph

37 Commits

Author SHA1 Message Date
872a7f17c3 Add a per-user sort order for the technician table
Settings has a "Sort rows by" choice: the technician list order (the
default, as before), technician name, Total open, Closed today or any
status column. Counts sort busiest first with ties by name, and the
sorted column's header gets an arrow. The browser does the sorting; the
server only validates and saves tableSort.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 11:35:39 -04:00
80a5e2c965 Add per-user closed statuses for the feed and ding
SDP closes a resolved ticket on its own after 2 or 3 days, so watching
only Closed gave the ding days late. Each user can now pick which
statuses count as closed for the feed (feedStatuses, defaulting to
STATUS_NAMES). With Resolved picked, tickets are timed by resolved_time
so the automatic close later doesn't ding again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 11:27:17 -04:00
48c206fd53 Update session notes for the v2.1.0 production deploy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 09:35:36 -04:00
d5a1080185 Remove ticket subjects from SDP queries and the page
All checks were successful
Build and push image / build (push) Successful in 15s
Subjects can name students or describe their situation (FERPA). The
closed feed and unassigned queries no longer request subject, the
returned objects never include it, and feed cards show the ticket
number instead. SECURITY.md, NOTES.md and the README are updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 09:24:52 -04:00
3e41565ac1 Add security document and move session notes into docs
docs/SECURITY.md covers the layers of protection, what is stored, third
parties, limits and open items to investigate. SESSION.md moves to docs/
and is rewritten as the handoff for removing ticket subjects next.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 21:45:46 -04:00
2f137afd5f Limit sign-in to allowed email domains
All checks were successful
Build and push image / build (push) Successful in 13s
Any Zoho account can approve the client, and an outside account got a
session that returned the .env site, group and technician names.
ALLOWED_EMAIL_DOMAINS is now required: the callback refuses other
domains and revokes their token, and every API call re-checks it so
older cookies stop working. /api/names also makes the caller's token
read from SDP before returning the shared names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 21:29:25 -04:00
817fa47edd Add data volume and document per-user settings
All checks were successful
Build and push image / build (push) Successful in 13s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 21:04:22 -04:00
53c519ed62 Add settings dialog and first-visit setup prompt
A gear button and a setup prompt edit the saved settings, with name
suggestions, and apply them without a reload. Panels and status columns
can be hidden; the closed watcher and ding keep running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 21:04:22 -04:00
9479b122fa Save per-user settings on the server
Each user's sites, groups, technicians, timing, weather location and
hidden panels/columns are saved by Zoho email in DATA_DIR, merged over
the .env defaults and validated on PUT /api/settings. /api/names
suggests names from recent tickets, and weather is cached per zip from a
fixed list of campuses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 21:04:22 -04:00
1a9de77dc6 Note that the bare-metal test run uses port 3005
All checks were successful
Build and push image / build (push) Successful in 53s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 20:23:47 -04:00
b29c0a022d Record live test results and drop outdated screenshots
The per-user sign-in was tested live on bare metal behind NPM: Zoho
sign-in, SDP data, Sign out and the IP access list all work. Token
renewal and the first Docker deploy are still to check.

- README: section on testing on the server without Docker (Gitea holds
  port 3000, NPM runs in Docker so forward to its network gateway, keep
  PORT out of the production .env), plus Cloudflare proxy and access
  list notes. The screenshots are removed until they're retaken.
- NOTES: deployment gotchas from the test run.
- ROADMAP and SESSION: what's verified, what's left, new resume prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 20:22:44 -04:00
f620cd96d4 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 <noreply@anthropic.com>
2026-10-15 19:38:08 -04:00
c2cf725819 Add Docker image, example compose file and Gitea build workflow
- Dockerfile: node:24-alpine, production deps only, runs as the node
  user, healthcheck on /healthz. No volume, because the server keeps
  no state.
- docker-compose.yml: example for the VPS. It publishes no ports,
  since Docker's port publishing bypasses ufw and would skip NPM's IP
  access list. It joins NPM's network instead.
- .gitea/workflows/docker.yml: on v*-prod* tags, builds on the
  self-hosted runner and pushes v0idf1sh/sdp-dashboard:<tag> and
  :latest using the DHUB_UNAME and DHUB_PASS secrets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:38:08 -04:00
b6ef6a195c Replace shared device-code token with per-user Zoho sign-in
Each user now signs in with their own Zoho account through the web
OAuth flow (Server-based Application client), and every SDP query runs
with that user's token. Nobody who reaches the page can see data
without signing in.

- auth.js: authorization URL, code exchange, token renewal, revoke and
  user info, replacing the device-code flow.
- session.js: tokens kept in an AES-256-GCM encrypted, HttpOnly,
  SameSite=Lax cookie keyed by SESSION_SECRET. The access token renews
  when due, concurrent calls share one renewal, and sessions end after
  SESSION_DAYS.
- routes.js: /auth/login, /auth/callback (state checked), /auth/logout
  (revokes at Zoho); /api/session, /api/closed, /api/workload and
  /api/weather all need a sign-in.
- The server is stateless. boardService.js, tokenStore.js, ADMIN_KEY
  and data/token.json are gone. The page runs the checks itself and
  keeps the closed feed, backfilling 12 hours on first load.
- tickets.js: the closed feed query pages, and SDP 401s are rethrown
  so the user is signed out.
- server.js: PUBLIC_URL, trust proxy, security headers, /healthz.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:38:08 -04:00
3e79a24efd . 2026-10-15 19:07:07 -04:00
1e3f8dc1ad . 2026-10-15 16:53:51 -04:00
c75b5889cf Update credits and licensing 2026-10-15 15:38:59 -04:00
8c7b5fbd26 Slopify This Thang 2026-10-15 15:23:05 -04:00
3e592f9a0d Run a proper initialization of the package 2026-10-15 13:20:54 -04:00
e1bbee36d8 Changing footer 2026-07-27 19:09:30 +00:00
d8253631f1 Merge pull request 'dev' (#2) from dev into main
Reviewed-on: #2
2026-07-27 18:37:37 +00:00
Isaac
07866bdcd2 forgot to add the readme and images just a little stupid don't mind me 2026-07-27 14:36:27 -04:00
Isaac
9ecfce525c forgot to add the readme and images just a little stupid don't mind me 2026-07-27 14:35:52 -04:00
Isaac
bccee24f19 Updated the readme to give more detailed setup and added a few comments to the server.js to describe the editable values. 2026-07-27 14:34:27 -04:00
Isaac
14bc03be93 Used AI to seperate the files a bit more. And fixed the bugs that were caused by it. 2026-07-27 13:58:13 -04:00
Isaac
d3f3387183 Separated server.js to make a modular setup should be a bit nicer now. Also fixed the weird bug where when clicking connect it would open a second tab instead of just opening zoho. 2026-07-27 13:36:08 -04:00
6a5bfce930 Merge pull request 'Ai-Slop' (#1) from Ai-Slop into dev
Reviewed-on: #1
2026-07-27 17:14:38 +00:00
Isaac
d15838d970 UI and a few server.js changes 2026-07-27 13:13:43 -04:00
Isaac
716a8d2a27 Added a footer no other changes. 2026-07-24 15:13:27 -04:00
Isaac
a6796b343c Refixed the resolved tickets not showing after claude killed it. And added a sound whenever new tickets appear. It is in the script section of the html page not in the JS script as it would not work there. 2026-07-24 14:58:30 -04:00
Isaac
7a59fd0cd4 Gave claude my back end and it came up with this front end 2026-07-24 14:33:41 -04:00
Isaac
9cf1c6ac37 Reads all statuses and users now also updated the repo to contain a simple setup guide and an example .env 2026-07-24 14:06:52 -04:00
7fd07c322b New Ticket System will need to decide if its better or worse than old one before pushing to main 2026-01-15 09:44:36 -05:00
02c07d1add Implemented ListInfoBuilder a bit more. Not working. 2026-01-07 15:12:26 -05:00
375c25110a Working on adding in other classes. Not working or tested. 2026-01-06 15:56:02 -05:00
9da88bddf4 Auth functions, need to add request functionality 2026-01-06 13:36:28 -05:00
2bace65e37 Initial commit 2026-01-06 15:23:48 +00:00