MyCityHelp
A support-ticket SaaS front end on Angular 20: a prerendered landing page and a role-gated helpdesk with live WebSocket ticket notifications, webhook management with delivery replay and an audit log.
- Angular 20
- Angular SSR (prerendering)
- TypeScript
- PrimeNG
- Tailwind CSS 3.4
- RxJS
- WebSockets
- Google Places API

Architecture

Overview
MyCityHelp is a support-ticket SaaS product. Partners, such as a city or a client website, raise tickets, and staff work through them in a helpdesk. I built the Angular 20 front end, which has two apps:
- A marketing landing page, prerendered at build time.
- The helpdesk itself.
I also wrote the backend API contract that the helpdesk is built against.
The challenge
- A helpdesk lives or dies on response time, so agents need to hear about new assignments, comments and feedback the moment they happen.
- Each role should see only what it is allowed to.
- Replies are sent as emails, so the editor's HTML has to survive Gmail and Outlook.
- The backend was being built in parallel, so the front end needed a clear contract to build against.
What I built
- A landing page with 11 section components, including the hero, features, process, pricing, testimonials and call to action.
- A role-gated helpdesk for two roles, admin and staff. Some routes are admin-only.
- Ticket screens: the list, the details page and the conversation thread, with lists paginated, sorted and filtered on the server.
- Partner, ticket-partner and team-member management.
- Webhook management per partner: the front end calls the webhook endpoints so admins can turn them on or off, read the delivery log and replay a failed delivery.
- An audit log that can be filtered by team member.
- Real-time ticket notifications over WebSockets, grouped per ticket.
- An email-safe rich-text editor for replies.
- Dark mode through a custom PrimeNG theme preset, and Google Places autocomplete (loaded with
@googlemaps/js-api-loader) for location fields. - A 686-line backend contract (
BACKEND-SPEC.md) covering sorting, pagination and filter rules, internal versus public notes, inbound and outbound email, access control, rate limits, webhooks and GDPR tooling. It ends with checks, such as "a staff token must not read another member's tickets".
Tech & architecture
- Angular 20 and TypeScript. Angular SSR prerenders the landing page at build time.
- PrimeNG 20 with a custom theme preset, and Tailwind CSS 3.4.
- RxJS and WebSockets for live notifications.
- Google Places autocomplete through
@googlemaps/js-api-loader.
Architecture
- A visitor loads the landing page, which is static HTML built ahead of time and then hydrated in the browser.
- Staff sign in to the helpdesk over REST. An interceptor adds the bearer token, and route guards check the role (admin or staff).
- Ticket lists use lazy PrimeNG tables that call paginated, sorted and filtered REST endpoints. Ticket details load the conversation thread.
- According to the contract, tickets arrive from a widget embedded on partner sites or from the admin portal, and residents reply by email.
- After sign-in, the app opens a notifications WebSocket. The server sends a snapshot, then one push per new notification. The app reconnects after five seconds if the connection drops.
- The front end calls the webhook endpoints, so admins can manage webhooks per partner, read the delivery log and replay failed deliveries.
Hard problems
Editor HTML that survives Gmail and Outlook
Replies are sent as email bodies. Outlook renders them with Word's engine, and webmail strips <style> blocks, classes and modern CSS. Text pasted from Word or the web brings scripts and layout CSS with it. Simply deleting unknown tags would lose the user's words, so the sanitiser unwraps them instead:
- 19 dangerous tags are removed together with their content.
- 33 tags are allowed. Any other tag is removed but its text is kept.
- Inline styles are cut down to 32 allowed CSS properties.
- Unsafe link schemes, such as
javascript:anddata:, are stripped.
// Allowlist sanitiser that unwraps unknown tags instead of deleting them (simplified)
function clean(el: Element): void {
[...el.children].forEach(clean); // children first
const tag = el.tagName;
if (DROP.has(tag)) return el.remove(); // script, style, iframe...
if (!KEEP.has(tag)) return el.replaceWith(...el.childNodes); // keep the words
for (const a of [...el.attributes]) {
if (a.name === 'style') setOrRemove(el, 'style', safeStyle(a.value));
else if (!ALLOWED_ATTRS[tag]?.has(a.name)) el.removeAttribute(a.name);
}
if (tag === 'A' && /^\s*(javascript|data|vbscript):/i.test(el.getAttribute('href') ?? '')) {
el.removeAttribute('href');
}
}
Live notifications grouped per ticket
A busy ticket can produce many notifications and bury everything else. So one service keeps the notifications, works out the unread count from them and groups them into one row per ticket, sorted by latest activity. Marking a notification as read updates the screen at once and is confirmed over the socket. Marking a whole ticket as read goes over REST.
// Collapse a notification feed into one row per ticket (simplified)
function groupByTicket(items: Note[]): TicketGroup[] {
const groups = new Map<string, TicketGroup>();
for (const n of items) {
const g = groups.get(n.ticketId) ?? { ticketId: n.ticketId, latest: n, unread: 0, items: [] };
g.items.push(n);
if (!n.isRead) g.unread++;
if (n.createdAt > g.latest.createdAt) g.latest = n; // ISO timestamps sort as text
groups.set(n.ticketId, g);
}
return [...groups.values()].sort((a, b) => b.latest.createdAt.localeCompare(a.latest.createdAt));
}
Results in numbers
- 2 apps: a prerendered landing page and the helpdesk.
- 15 route entries: 2 on the landing page and 13 in the helpdesk.
- 11 landing-page section components and 12 helpdesk page areas.
- 5 PrimeNG tables paginated on the server.
- 44 HTTP calls across the services.
- 19 removed tags, 33 allowed tags and 32 allowed CSS properties in the email-safe sanitiser.
- A 686-line backend contract with 12 sections marked live and 13 marked needed.
Outcome
The product has a public landing page and a working helpdesk in one Angular codebase. Ticket activity reaches agents in real time, each role sees only its own area, and the backend team builds against a written contract.
