Skip to content

About

Public development journal for LMS Chat — a FERPA-compliant LTI 1.3 chat app for Canvas

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

LMS Chat — Dev Log

Public development journal for LMS Chat, a student-instructor chat service built for Canvas and other LTI-compatible learning management systems.

The app itself is private. This devlog is public — building in the open.


What is LMS Chat?

A channel-based real-time chat tool that lives inside Canvas as an LTI 1.3 app. Students can talk to each other, ask instructors questions, request office hours, and search past answers — all scoped to their specific course.

Key properties:

  • LTI v1.3 + OAuth2 — launches directly from within Canvas
  • FERPA compliant — student data encrypted at rest, full audit trail
  • Course-isolated — students in one course cannot see another course's chats
  • Real-time — live messaging, presence, and typing indicators via Socket.io and Redis

Stack

Layer Tech
Backend Node.js + Express
LTI ltijs (LTI v1.3)
Real-time Socket.io + Redis
Database PostgreSQL + Redis
Frontend React + Vite

Dev Log


2026-02-22 — Entry 001: Project scaffold

Built the full project scaffold from scratch — 41 files across server and client.

Server: LTI v1.3 launch flow, PostgreSQL schema with course isolation at the data layer, AES-256-GCM encryption of all student PII before it touches the database, FERPA audit logging on every read and write, role-based access control (instructor / TA / student), REST API covering channels, paginated message history, office hours, and full-text search. Full-text search is handled entirely by PostgreSQL with no external search engine. Socket.io with a Redis adapter for horizontal scaling. Typing indicators and presence tracking via Redis.

Client: Channel sidebar, live chat window with infinite scroll, search overlay scoped to the current course, office hours request and scheduling UI, development proxy routing API and socket traffic to the local server.


2026-02-22 — Entry 002: First successful boot + dev login

Got the app running end-to-end for the first time.

Startup bugs fixed:

  • The Redis client library required a different initialization pattern in ES modules than what was scaffolded — the import style and an unnecessary manual connection call were both corrected.
  • The LTI library's main export does not expose the setup method; the named class had to be imported directly.
  • The LTI library normally controls the HTTP server, making it inaccessible for Socket.io to attach to. Running it in serverless mode and constructing the server manually resolved the conflict.
  • The LTI library was intercepting all requests — including our own API routes — and rejecting them with an auth error. The API path prefix was whitelisted so the LTI layer only guards the LTI launch flow.
  • The server crashed immediately on startup because no environment file existed. Created one from the template with freshly generated secrets.

Dev login: A developer form lets you enter a name and pick a role; the server creates a fully realistic session backed by the real database so the UI can be worked on without a live Canvas installation.


2026-02-22 — Entry 003: Light theme + message edit/delete

Light theme designed to match Canvas brand guidelines — white backgrounds, Canvas Orange (#E66000) as the accent color for buttons, active states, and own-message bubbles.

Message edit: Authors can edit their own messages inline. The original content is stored in the audit log before the change is saved (FERPA requirement). Edits broadcast to all connected users in real time and are marked with an "(edited)" indicator.

Message delete: Authors can delete their own messages; instructors and TAs can delete any message. Records are soft-deleted so the audit trail is preserved. Deletes broadcast in real time.


2026-02-23 — Entry 004: Channel creation UI

Instructors and TAs see a create button next to the channels heading. A modal lets them name the channel (with a live slug preview), add a description, and choose who can post. The restriction is enforced on both the client and the server — students cannot create channels. The new channel appears in the sidebar immediately without a page refresh.


2026-02-23 — Entry 005: Private Office Hours chat

Each student gets a private message thread with their instructor or TA tied to their specific office hours request. No other students can see the conversation — access is enforced at both the API and real-time layers, in compliance with FERPA.

Messages persist across sessions, load on open, and arrive in real time. Students see an "Open Chat" toggle on their request card; instructors see the same panel when reviewing requests. The Office Hours page was redesigned with a light theme, color-coded status badges, and role-appropriate action controls.


2026-02-23 — Entry 006: Unread counts + Office Hours badge

Channel unread counts: Each channel in the sidebar shows an orange badge with the number of unread messages. Counts update live as messages arrive in channels the user is not currently viewing. Opening a channel clears the badge and persists the read position to the database so it survives a page refresh.

Office Hours badge: Instructors and TAs see a live badge on the Office Hours button showing the number of pending requests. The badge updates instantly when a student submits a new request, with a periodic fallback refresh.

Demo seed: The dev login flow always ensures a sample student and pending request exist so the badge and pending-request workflow are immediately visible on first login.


2026-02-23 — Entry 007: Right-click context menus + channel leave/delete

A reusable context menu component was built — it renders outside scroll containers so it is never clipped, auto-clamps to the viewport, and dismisses on outside click or Escape.

Messages: Right-clicking shows Edit / Delete based on the user's permissions.

Channels: Right-clicking a channel in the sidebar shows:

  • Leave Channel (all roles) — hides the channel from the user's sidebar permanently, persisted across refreshes.
  • Delete Channel (instructors/TAs, shown in red) — permanently deletes the channel and all its messages; disappears from everyone's sidebar in real time.

The sidebar footer was also reorganized: user info on top, a full-width Office Hours button below with the pending badge.


2026-02-23 — Entry 008: Bug fixes — server crash + stale sidebar

Server crash on channel delete: If a channel was deleted while a user still had it open, the next "mark as read" request tried to write a database record referencing the now-deleted channel. The resulting constraint violation crashed the server. Fixed so the operation silently does nothing if the channel no longer exists.

Stale sidebar after delete: The client was waiting for a socket confirmation before removing a deleted channel from the sidebar. If the server had already crashed in the window above, that event never came and the UI stayed stale. Fixed by removing the channel from the local UI immediately when the delete is triggered, regardless of server timing.


2026-02-23 — Entry 009: Mobile-responsive layout

Below 640px the sidebar collapses off-screen and slides in as a full-height overlay. A backdrop dismisses it on tap. Selecting a channel closes the sidebar automatically. The chat window gains a top bar on mobile showing the channel name and a button to open the sidebar. The message input accounts for the home indicator on phones without a physical home button.


2026-02-23 — Entry 010: Dark mode toggle

A toggle in the sidebar footer switches between light and dark themes. The preference is saved in the browser and respected on next load; if no preference exists, the operating system setting is used. All colors across every component use theme variables — the entire interface switches cleanly with no leftover hardcoded values.


2026-02-24 — Entry 011: Typing indicators + online presence

Typing indicators: When a user types in a channel, other members see an animated three-dot indicator and the name of who is typing. Multiple typers are listed by name up to two; three or more collapse to "Several people are typing…". The indicator clears automatically when typing stops. A reserved fixed-height bar prevents the message list from jumping when the indicator appears.

Online presence: A green dot on the user's own avatar confirms they are connected. A live count of online users appears in the channel header and next to the channels list. Message bubbles show a green dot on the sender's avatar if they are currently online.


2026-02-24 — Entry 012: Emoji reactions, reply, forward, threads

Emoji reactions: Six reactions are available (👍 👎 ❤️ 😂 ✅ ❓). A hover action bar on each message opens the emoji picker. Reactions appear as pills below the bubble with a count. The current user's reactions are highlighted. Reactions update live for everyone in the channel.

Hover action bar: The previous right-click context menu for messages was replaced with a clean action bar that appears above the bubble on hover: Reactions, Reply, Forward, Edit, Delete. Buttons the user lacks permission to use are hidden entirely. Each button shows a tooltip label on hover.

Reply — Slack/iPhone style: Clicking Reply opens the composer at the bottom of the screen. The reply appears as a new message in the main feed with a compact quote block above it showing the original sender's name and a snippet of their message.

Forward: Opens a channel picker; confirming copies the message to the chosen channel.

Thread infrastructure: The database was extended to support threaded replies as a distinct type separate from the main channel feed, with reply counts tracked and broadcast in real time.


2026-02-24 — Entry 013: Real-time bug fixes

Root bug — socket events never broadcast from REST handlers: The middleware responsible for giving route handlers access to the real-time layer was registered in the wrong order during server startup. The web framework processes middleware in registration order, so every route handler was working with an uninitialized reference when it tried to send a socket event. The calls failed silently — the code appeared to run but nothing was ever sent. This was the root cause of reactions, edits, and deletes not appearing in real time for other users. Fixed by restructuring startup so the middleware is registered before the routes.

Reactions update live: Now resolved by the root fix above. As a belt-and-suspenders measure, the reacting user's own view also updates immediately from the server's response rather than waiting for the socket broadcast.

Messages appear immediately for the sender: Previously a sent message only appeared in the sender's own feed after the server broadcast it back — adding a noticeable delay. Fixed so the message is added from the server's immediate acknowledgement. Duplicate-prevention logic handles the case where the broadcast also arrives shortly after.


2026-02-24 — Entry 014: Emoji reaction redesign — accumulate counts, names, right-click remove

The previous model toggled a reaction off on a second click. The new model matches Slack and most social platforms:

  • Left-click the emoji picker — always adds your reaction. The picker highlights emojis you have already used. Clicking one you have already added does nothing.
  • Left-click a reaction pill — adds that reaction if you have not yet reacted; does nothing if you have.
  • Right-click a reaction pill — prompts to remove your own reaction. If confirmed, your reaction is removed and the count drops by one. Other users' reactions are not affected.
  • Hover a reaction pill — a tooltip shows the names of everyone who reacted with that emoji.

The server was updated to support add-only behavior, a new remove-my-reaction action, and to include reactor names in the data returned to clients. The client was updated to use separate add and remove actions that both update the local state immediately so the UI feels instant.


2026-02-24 — Entry 015: Action bar improvements + quick dev login

Larger action icons — all icons in the hover action bar were increased in size for easier clicking and better visibility.

Direct reaction buttons in the bar — three reactions are now one click away directly in the action bar without opening a picker:

  • 🙌 Job well done
  • 👍 Thumbs up
  • 👎 Thumbs down

A thin divider separates the reaction buttons from the action buttons (Reply, Forward, Edit, Delete).

Additional reactions picker repositioned — the ☺ button now opens a secondary picker for less common reactions (❤️ 😂 😮 😢 ✅ ❓). This picker opens to the left of the action bar rather than above it, so it is never blocked by the channel header when hovering messages near the top of the screen.

Updated icons — the edit button now shows a pencil emoji and the delete button shows a trashcan emoji.

Quick dev login — the developer login screen now has one-click preset buttons to log in immediately as "Ian Burres — Instructor" or "Alex Chen — Student", making it easy to switch between accounts for testing features like reactions that require two different users.


2026-02-24 — Entry 016: Logout button

A logout button was added to the sidebar footer next to the theme toggle. Clicking it ends the current session and redirects to the login screen. This makes switching between test accounts straightforward during development without needing a separate browser window.


2026-02-25 — Entry 017: Pinned messages

Instructors and TAs can pin any message in a channel using a 📌 button that appears in the message action bar on hover.

Once messages are pinned, a badge appears in the channel header showing the count. Clicking it opens a side panel listing all pinned messages — the sender, date, and full content — with an Unpin button for those with permission.

Pin and unpin actions update in real time for all users in the channel without a page reload. Both are logged in the audit trail for FERPA compliance.


2026-02-25 — Entry 018: Reaction bar improvements + skin tone support

Bug fix — The "job well done" hands emoji and several others in the additional reactions picker (surprised, sad) were silently rejected by the server and never saved. All are now accepted.

Skin tone picker — Clicking 🙌, 👍, or 👎 now opens a small three-option picker (default · medium · dark skin tone) so users can react with the shade that represents them. The button remembers and displays whichever tone the user chose.

New direct reaction buttons — ❤️ heart, ✅ checkmark, and 😊 smile are now one-click buttons in the action bar alongside the hands and thumbs.

Additional reactions picker — trimmed to less-common emoji only (😂 😮 😢 ❓), since the most common reactions are now available as direct buttons.


2026-02-25 — Entry 021: Direct message bug fixes

Real-time delivery: Messages sent in a direct conversation now appear instantly for the recipient regardless of whether they have that conversation open. Previously, a message only reached the other person if they happened to have the DM window active at the moment it was sent — if it was closed, the message was lost until a page refresh. The fix: each user's connection now automatically subscribes to all of their existing DM conversations at startup, and both participants are subscribed to a brand-new conversation the instant it is created.

Button interaction bug: Clicking on a person in the Direct Messages section of the sidebar was occasionally triggering the page's search form instead of opening the conversation. This was caused by the DM buttons not declaring their type explicitly — browsers can treat undeclared buttons as form-submit triggers under certain conditions. All DM buttons now have their type set correctly.


2026-02-25 — Entry 020: Direct messages

Any two people in the same course can now have a private one-on-one conversation. A "Direct Messages" section in the sidebar lists all active threads with unread badges. A compose button opens a searchable participant picker. Clicking any sender's name in a channel also opens a DM instantly. Messages arrive in real time with typing indicators. Strictly course-scoped and FERPA-compliant.


2026-02-25 — Entry 019: Global skin tone selector + expanded emoji picker

Users can now set a preferred skin tone once, and it applies automatically to all hand and gesture reactions — the raised hands, thumbs up, thumbs down, and every gesture emoji in the picker will use the selected shade.

The "More reactions" picker is now a proper scrollable panel organized into three sections: Gestures (24 hand and gesture emoji shown with the selected tone), Faces (22 emoji), and Hearts & Symbols (22 emoji). A row of six colored circles at the bottom of the panel lets the user pick from the default yellow through light, medium-light, medium, medium-dark, and dark skin tones. The preference is saved and restored automatically.

The server's allowed emoji list was expanded to match, covering all skin tone variants of every gesture emoji plus the full face and symbol sets.


2026-02-25 — Entry 022: Codebase documentation pass

Every one of the 55 server and client source files now has a detailed block comment at the top describing what it does, which database tables and REST endpoints it touches, and any FERPA-relevant considerations. Every function, component, and hook has a comment explaining its purpose and key logic. Inline comments cover non-obvious implementation details — pagination cursors, real-time deduplication, socket room membership, encrypted PII handling, and role-based permission checks. No runtime behavior was changed.


2026-08-24 — Entry 023: Maintenance check-in + security patch

Returned to the project after a pause to bring the local environment back to life and verify everything still works. All backing services were restarted and the database schema re-applied cleanly from scratch. A full end-to-end check of the private direct-messaging feature confirmed that live two-way delivery, message history, and unread badges all behave correctly.

A routine dependency audit surfaced a high-severity issue in the low-level networking library that powers real-time messaging (a memory-disclosure and denial-of-service advisory). Applied the non-breaking security update on both the server and the browser app, which cleared the high-severity finding and the large majority of the outstanding advisories. The real-time messaging check was re-run afterward and still passed, confirming the update introduced no regressions.

The backing databases were confirmed to already be on the latest maintenance releases of their current major versions. A handful of remaining advisories require larger framework version jumps and were deferred as separate, individually-tested upgrades.


2026-08-24 — Entry 024: Continuous integration pipeline

Set up an automated check that now runs on every proposed change before it can be merged. When a change is opened, a fresh, throwaway copy of all three backing services is spun up in the cloud, the front-end is built to catch any breakage, the database schema is applied from scratch, the server is started, and an automated end-to-end test simulates two people in the same course exchanging private messages — confirming live two-way delivery, stored history, and unread badges all still work. A change cannot be merged unless this check passes.

A dependency security scan also runs on every change and is reported for visibility, without blocking merges, so that known larger upgrades still pending don't wall off unrelated work.

This closes a gap from the previous session: proposed changes now have a real automated gate to pass, so "merge once it's green" is backed by an actual verification run rather than a manual spot-check. The new pipeline was validated end to end before landing.


2026-08-24 — Entry 025: Hardening how encrypted personal data is read

Made the app resilient to an unreadable personal-data record. Student names and emails are stored encrypted, and previously, if the app ever encountered a record it couldn't decrypt — for example after an encryption-key change, or from a corrupted or tampered record — the failure could take the whole server down, turning a single bad record into an outage for everyone.

Now such a record degrades gracefully: the affected name simply shows as unavailable (the interface already falls back to a neutral placeholder avatar), the event is recorded in the server logs for the operators to investigate, and the server keeps running normally for everyone else. The diagnostic that gets logged deliberately contains no personal data.

Added an automated test suite covering this behavior — confirming normal encryption still round-trips correctly, and that malformed, corrupted, or tampered records now return the safe placeholder instead of crashing. This suite was added to the automated pre-merge checks so the protection can't silently regress later.


2026-11-02 — Entry 026: Closing gaps in the privacy audit trail

While preparing answers to UTSA's compliance questions, found that two everyday actions were missing from the privacy audit trail. Messages sent the normal way, over the live real-time connection, were not being recorded, and neither was opening the app from Canvas. Both are now recorded: every channel message and private message is logged however it was sent, and each Canvas launch is logged along with the role the person launched as.

The automated two-person messaging test now sends messages over the live connection and confirms the matching audit entries exist. It was also confirmed to fail when the fix is removed, so it guards against this gap coming back.


2026-11-02 — Entry 027: Audit review with separation of duties

Added an Audit Review page for the department chair, co-chair and app administrator. Reviewers can filter the privacy audit trail by course, activity type and date, and export every record for a course to answer a records request, including deleted messages and the original text of edited ones.

Conflict-of-interest rules are built in. The chair and co-chair can review every course. The administrator can review every course except ones they belong to, which is automatic and can't be lifted, and any the chair or co-chair restrict. Every review, export, restriction change and denied attempt is itself recorded, so the chair and co-chair can see exactly what the administrator accessed. An automated test covering all of these rules now runs on every proposed change.


2026-11-02 — Entry 028: Privacy notice at launch and message reporting

Every user now sees a privacy notice before using the app. It explains that messages, including private and deleted ones, are stored by the department and may be reviewed under UTSA policy. The app records who acknowledged each version, and changing the wording prompts everyone again.

Anyone can now report a message, with a reason and optional details, and a copy of the message is kept with the report. Channel reports go to the course's instructors and TAs and to the department's reviewers. Private-message reports go only to the department, since instructors can't see private messages. Reviewers mark reports as reviewed or dismissed, and every step is recorded in the audit trail. An automated test covering the notice, reporting and routing rules runs on every proposed change.


2026-11-02 — Entry 029: Automatic security alerts from the audit trail

The app now watches its own audit trail and raises alerts for reviewers. Every 15 minutes it checks for:

  • unusually heavy reading or searching
  • bulk deletions
  • course records exports
  • attempts to open restricted courses
  • after-hours administrative work
  • logins from new or off-campus addresses
  • the same person reported by several users
  • reports left unhandled

Alerts appear on the Audit Review page, where reviewers acknowledge or dismiss them with a note. The administrator never sees alerts about his own activity; those go only to the chair and co-chair. Each alert is also written, without personal data, to a log file that campus security monitoring tools can collect. An automated test covering every rule now runs on every proposed change.


2026-11-03 — Entry 030: Chat access follows the Canvas course role

Only a course's instructors, co-instructors, TAs and students can now use the chat. Observers, course designers and Canvas administrators see a short "not available for your role" page, and the refused attempt is recorded without names. The app now reads only the person's role in the course, closing a loophole where a TA, or a student who teaches elsewhere, could have been treated as an instructor. Department reviewers opening the app from a course where they hold no such role get the Audit Review page only. Automated tests covering these rules run on every proposed change.


Testing

This prototype is planned for testing with students and instructors at the University of Texas San Antonio (UTSA).


Built with Claude Code

About

Public development journal for LMS Chat — a FERPA-compliant LTI 1.3 chat app for Canvas

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors