Contact page overhaul: real messaging, staff-aware live support, management inbox #251

Closed
opened 2026-06-21 11:06:42 +00:00 by spikerj · 1 comment
Owner

Problem

The Contact page doesn't flow well, doesn't match the rest of the site's styling, and requires login for almost everything. Live chat/video should only be offered when a staff member is actually online and the visitor is logged in; otherwise the page should clearly say staff is unavailable and steer people to a message form. Submitted messages need to be persisted and emailed to support@spikersoft.com, with a staff inbox to view and reply.

Scope

Backend (spikersoft-backend)

  • New ContactMessage Mongo entity + SpikerDbContext config (collection contact-messages, indexes, JSON converter for replies).
  • CQRS handlers under Domain/Contact: create (persist + email support), list, get (auto new→read), reply (email submitter), update status.
  • IStaffPresenceService + IsStaff on the chat presence record (set from realm roles in ChatHub.OnConnectedAsync).
  • ContactController: public POST /api/contact and GET /api/contact/staff-online (anonymous + rate-limited, honeypot); staff-only management routes (Admin/Staff roles).
  • Unit tests for the create + respond handlers.

Frontend (spikersoft-angular)

  • New ContactService.
  • Redesigned /contact: on-brand glass-card layout (no nested accordions), real form submit (honeypot replaces the fake CAPTCHA), and a staff-aware/auth-gated live-support panel (checking → offline → login-required → live chat + video).
  • New staff inbox at admin/contact-messages (role-guarded route + management menu entries).
  • i18n updates (contact.*, admin.contactMessages.*, menu label) in en + es.

Notes

  • Live chat/video stay authenticated by design (no anonymous SignalR hubs).
  • "Staff online" piggybacks on the existing chat presence record (no new presence store).

Fixed by spikersoft-backend + spikersoft-angular PRs (linked in comments).

## Problem The Contact page doesn't flow well, doesn't match the rest of the site's styling, and requires login for almost everything. Live chat/video should only be offered when a staff member is actually online and the visitor is logged in; otherwise the page should clearly say staff is unavailable and steer people to a message form. Submitted messages need to be persisted and emailed to support@spikersoft.com, with a staff inbox to view and reply. ## Scope **Backend (`spikersoft-backend`)** - New `ContactMessage` Mongo entity + `SpikerDbContext` config (collection `contact-messages`, indexes, JSON converter for replies). - CQRS handlers under `Domain/Contact`: create (persist + email support), list, get (auto new→read), reply (email submitter), update status. - `IStaffPresenceService` + `IsStaff` on the chat presence record (set from realm roles in `ChatHub.OnConnectedAsync`). - `ContactController`: public `POST /api/contact` and `GET /api/contact/staff-online` (anonymous + rate-limited, honeypot); staff-only management routes (`Admin/Staff` roles). - Unit tests for the create + respond handlers. **Frontend (`spikersoft-angular`)** - New `ContactService`. - Redesigned `/contact`: on-brand glass-card layout (no nested accordions), real form submit (honeypot replaces the fake CAPTCHA), and a staff-aware/auth-gated live-support panel (checking → offline → login-required → live chat + video). - New staff inbox at `admin/contact-messages` (role-guarded route + management menu entries). - i18n updates (`contact.*`, `admin.contactMessages.*`, menu label) in en + es. ## Notes - Live chat/video stay authenticated by design (no anonymous SignalR hubs). - "Staff online" piggybacks on the existing chat presence record (no new presence store). Fixed by spikersoft-backend + spikersoft-angular PRs (linked in comments).
Author
Owner

Resolved. Both fixing PRs merged to master:

  • spikersoft-backend PR #16Contact messaging API: persistence, support email, staff presence + inbox (commit 05f9055).
  • spikersoft-angular PR #74Redesign Contact page: staff-aware live support + staff inbox (commit b749934).

Delivered the full scope: ContactMessage persistence + support email, CQRS create/list/get/reply/status handlers, IStaffPresenceService on chat presence, public + staff-only ContactController routes, redesigned /contact, staff inbox at admin/contact-messages, and en/es i18n. Closing.

Resolved. Both fixing PRs merged to `master`: - spikersoft-backend PR #16 — `Contact messaging API: persistence, support email, staff presence + inbox` (commit `05f9055`). - spikersoft-angular PR #74 — `Redesign Contact page: staff-aware live support + staff inbox` (commit `b749934`). Delivered the full scope: `ContactMessage` persistence + support email, CQRS create/list/get/reply/status handlers, `IStaffPresenceService` on chat presence, public + staff-only `ContactController` routes, redesigned `/contact`, staff inbox at `admin/contact-messages`, and en/es i18n. Closing.
Sign in to join this conversation.