Skip to content
Loading...

Chatr

A complete, production-deployed real-time messaging platform built, tested, and deployed by a single developer.

Product Overview • Technical Architecture • Commercial Case

Chatr landing page
50+
Features
3,000+
Tests
120,000+
Lines of Code
30
Days

1. Executive Summary

Chatr is a fully functional, production-deployed, real-time messaging platform that demonstrates the breadth of a funded engineering team — delivered by a single developer in 30 days. It is not a prototype or proof of concept. It is a working product with 50+ user-facing features, 3,000+ automated tests, and a deployment running on AWS infrastructure.

For a commercial audience, Chatr shows what a complete product looks like when messaging, AI, and customer support converge into a single platform. Its embeddable chat widget allows any business to add real-time customer support to their website with a single line of code — competing directly with tools like Intercom (£39–£99/seat/month) at zero recurring cost.

For a technical audience, Chatr demonstrates mastery across frontend development (React 19, Next.js 16), backend engineering (Node.js, Express, Socket.IO), database design (PostgreSQL, Prisma), caching infrastructure (Redis), AI integration (OpenAI GPT-4o-mini), cloud deployment (AWS), and automated testing (Jest, Playwright). Every layer is production-grade, documented, and covered by automated tests.

This page serves as both a commercial presentation and a technical reference. Each section explains what a feature does, why it matters commercially, and how it is implemented technically.

2. The Commercial Opportunity

The Market Problem

Every business needs real-time communication. Internal teams need to collaborate instantly. Support teams need to respond to customers while they are still on the website. Users expect the experience they get from consumer apps — instant delivery, typing indicators, read receipts, voice notes, file sharing, and a mobile-first interface that works flawlessly on any device.

Today, companies face a costly trade-off:

  • Option A: Buy a third-party SaaS solution (Intercom, Zendesk Chat, Drift) and pay £39–£99 per agent per month, with limited customisation, vendor lock-in, and no control over user data.
  • Option B: Build from scratch, spending 3–6 months on WebSocket infrastructure, message queuing, presence tracking, and delivery guarantees before writing a single user-facing feature.

The Chatr Answer

Chatr eliminates that trade-off. It is a fully functional messaging platform that delivers enterprise-grade features at zero licensing cost. It is open, extensible, and built on industry-standard technology (React, Node.js, PostgreSQL, Redis) that any JavaScript developer can understand, modify, and extend on day one.

Its embeddable chat widget turns any website into a live support channel — creating a direct, zero-friction communication bridge between businesses and their customers. That is where the commercial value lives.

Live chat is one of the fastest-growing segments in customer support. Businesses using real-time chat see 48% higher revenue per chat hour compared to email support, and customers report 73% satisfaction rates with live chat — the highest of any support channel.

The market for live chat software is dominated by expensive SaaS products:

  • Intercom: £39–£99/seat/month, with feature gating and usage limits.
  • Drift: £50–£150/seat/month, focused on sales automation.
  • Zendesk Chat: £19–£99/seat/month, bundled with ticketing overhead.
  • Chatr Widget: £0/seat, full ownership, no recurring cost, no vendor lock-in.

For a company with a 10-person support team, that is £4,700–£11,900/year in savings compared to Intercom alone. Beyond cost savings, Chatr gives businesses complete control over their data, full white-label customisation, and the ability to extend functionality without waiting for a vendor's roadmap.

3. Product Walkthrough

The screenshot below shows the main conversation screen. This single view demonstrates over a dozen capabilities working together in real time: groups, direct messages, AI conversations, guest visitors from the widget, typing indicators, unread badges, online presence, friend badges, and AI-generated conversation summaries.

Main conversation list — groups, DMs, AI bot, widget guests, typing indicators, presence, unread badges, and smart summaries
Main conversation list — groups, DMs, AI bot, widget guests, typing indicators, presence, unread badges, and smart summaries

Every row in the conversation list is information-dense by design. At a glance, users can see:

  • Presence — Whether the contact is online (green dot), away (amber dot), or offline (grey dot) via real-time presence tracking.
  • Typing indicators — If someone is currently typing, the last-message preview is replaced with an animated "typing…" indicator, visible without opening the conversation.
  • Unread badges — Per-conversation unread message counts displayed as badges on each row, plus an aggregate badge on the bottom navigation tab.
  • Conversation badges — "Friend", "Group", "AI", and "Guest" badges distinguish conversation types at a glance.
  • Smart summaries — AI summaries replace the last-message preview with a concise description of what was discussed, animated with a flip transition.
  • Message requests — Messages from unknown contacts are separated into a "Requests" tab.

The search bar at the top filters conversations in real time. The bottom navigation provides instant access to Chats, Friends, Groups, and your Profile.

3.1 Registration & Login

New users register with a username, email address, and password. During registration, a real-time password strength indicator shows the strength of the chosen password as the user types: Weak (red), Fair (amber), Good (green), Strong (bright green).

Registration with password strength
Registration with password strength
Login screen
Login screen

After submitting the registration form, a 6-digit one-time code is sent to the user's email address to verify their identity. Authentication supports four methods: email/password, SMS verification, email-based login codes, and optional TOTP two-factor authentication.

JWT access tokens (localStorage) with long-lived HttpOnly refresh cookies. Expired/revoked tokens blacklisted in Redis. Rate-limited login attempts prevent brute-force attacks.

4. Messaging

Chatr delivers a messaging experience that matches or exceeds what users expect from WhatsApp, iMessage, and Slack. Every message type, interaction pattern, and real-time indicator found in those apps has been implemented, tested, and refined.

Code blocks, reactions, replies, edits, receipts
Code blocks, reactions, replies, edits, receipts
Voice waveforms, shared media, link previews
Voice waveforms, shared media, link previews

4.1 Message Types

Chatr supports seven distinct message types. Each type has its own rendering, interaction model, and metadata.

Text Messages

Delivery status tracking through three states: "sending" (clock icon), "delivered" (single tick), and "read" (double tick, blue). Messages are grouped by date with separator headers and consecutive messages from the same sender are visually grouped.

Transmitted via WebSocket (Socket.IO) for instant delivery. When the recipient is online, the message arrives in under 100ms. Offline messages stored in PostgreSQL and delivered on reconnection.

Voice Messages

Users record voice notes directly from the chat input bar. Voice messages display an interactive waveform visualisation, duration counter, and playback controls. The sender receives a "listened" receipt when the recipient plays the message.

Recorded using the Web Audio API and MediaRecorder, encoded as WebM/Opus, uploaded to AWS S3. Waveform pre-computed during recording. Cached locally in IndexedDB for offline replay.

Image Sharing

Images appear as inline previews. Tapping opens a fullscreen lightbox with pinch-to-zoom on mobile. Server-side Sharp processing generates thumbnail, medium, and full-resolution variants.

Fullscreen image lightbox
Fullscreen image lightbox

Video Sharing

Videos display as inline players with thumbnail, duration, and standard playback controls.

File Attachments

Supports uploads up to 50 MB — PDFs, Word, Excel, ZIP, and more. Type-specific icons, file name, size, and download link.

Link Previews

URLs are automatically fetched server-side for Open Graph metadata (title, description, image, favicon) and rendered as rich preview cards — the same way link previews function in Slack and iMessage.

Code Blocks

Triple-backtick fenced code is rendered with syntax highlighting, automatic language detection, and a "Copy" button. 40+ languages supported.

Syntax-highlighted TypeScript code block with Copy button
Syntax-highlighted TypeScript code block with Copy button

4.2 Message Actions

Every message is interactive. Users can react, reply, edit, and unsend.

Emoji Reactions

Tap-and-hold to add emoji badges below any message. Multiple reactions per message from different users. Hovering reveals who reacted.

Reply to Message

Swipe right (mobile) or context menu to reply. Quoted preview shows original sender, content type, and truncated text. Tap to scroll back to the original.

Reaction badges with emoji counts
Reaction badges with emoji counts
Reply with quoted original message
Reply with quoted original message

Edit Sent Messages

Edit any sent message. Up-arrow shortcut on desktop (like Slack). "(edited)" label shown. Full edit history stored for audit.

Edits are versioned: the backend stores complete edit history. Broadcast via Socket.IO in real time.

Unsend Messages

Delete for everyone — message replaced with a "deleted" placeholder, equivalent to WhatsApp's "Delete for Everyone".

Emoji Picker

Full emoji picker with category tabs, search, and recently-used section.

Full emoji picker with categories, search, and recently-used
Full emoji picker with categories, search, and recently-used

4.3 Real-Time Awareness

One of Chatr's most distinctive qualities is the density of its real-time feedback. Users always know who is online, who is typing, who has read their message, and even what the other person is writing character by character.

Typing Indicators in Chat

Animated "typing…" indicator with bouncing dots appears at the bottom of the conversation within 200ms of the first keystroke. In group chats, it shows who is typing.

Typing Indicators on the Chat List

A feature most messaging apps lack. The last-message preview on the conversation list is replaced with "typing…" — users can see who is composing without opening the conversation.

Typing indicator in chat (animated dots)
Typing indicator in chat (animated dots)
"typing…" replacing last-message on list
"typing…" replacing last-message on list

Typing events emitted via Socket.IO with debouncing. 3-second timeout managed client-side.

Ghost Typing

An optional mode that streams every character the other person types in real time, letter by letter. No mainstream messaging app offers this.

Audio Recording Indicator

When someone is recording a voice note, the other participant sees a "recording…" indicator in real time.

Online Presence

Green (online), amber (away, idle 5+ minutes), grey (offline) dots on every avatar. "Last seen X ago" for offline contacts.

Presence tracked via Redis with TTLs. Changes broadcast to all contacts via Socket.IO.

Read Receipts

Three delivery states: sending (clock), delivered (tick), read (blue double tick). Voice messages add a "listened" state.

4.4 Offline & Sync

Chatr works reliably even when the network is unavailable.

  • IndexedDB Cache — Conversations, contacts, and messages cached locally. App renders instantly from cache while syncing in the background.
  • Outbound Queue — Messages sent offline are queued locally, displayed with a "sending" icon, and delivered automatically when the connection restores.
  • Audio Cache — Voice messages cached after first playback for instant offline replay.
  • Storage Management — Visual breakdown of storage by category with one-tap reset in Settings.

5. Groups & Social

Full-featured group chats with role management, invite controls, and a social layer.

Groups with member counts and search
Groups with member counts and search
Friends with online presence
Friends with online presence

Group Chat

Each group has a name, avatar, cover image, and description. All seven message types are supported, along with reactions, replies, and edits.

Group conversation
Group conversation
Member list with role badges
Member list with role badges

Role Management

  • Owner — Full control: promote, demote, remove anyone, transfer ownership, delete group, edit details.
  • Admin — Add and remove members (not other admins or owner). Edit group details.
  • Member — Send messages, react, reply, and leave.

Invitations

Owners and Admins invite new members via search. Pending invitations appear as a badge on the Groups tab.

Friends & Social Layer

Friend Requests

Users send friend requests via search. Recipients can accept, decline, or block. Accepted contacts show a "Friend" badge on the conversation list.

Blocking

Comprehensive: blocked users cannot search for you, message you, view your profile, or see your online status. Managed from Settings.

User Search

Find any user by name or username. Start conversations, send friend requests, or view profiles from search results.

6. The Embeddable Support Widget

The widget transforms Chatr from a messaging app into a revenue-generating customer support platform. This is where the commercial value proposition is strongest.

6.1 How It Works

Any website adds live support by pasting one line of JavaScript. A floating chat bubble appears. When a visitor clicks, a panel opens asking for their name and question — no sign-up, no email, zero friction.

Messages arrive instantly in the agent's Chatr inbox, tagged with a "Guest" badge. The agent replies from Chatr; the visitor sees the response in real time. Sessions persist for 24 hours.

Widget greeting panel
Widget greeting panel
Visitor fills in name and question
Visitor fills in name and question
Message arrives in agent's inbox
Message arrives in agent's inbox
Live two-way conversation
Live two-way conversation

Chatr delivers the same core functionality as Intercom — real-time messaging, file sharing, persistent sessions — with full code ownership and zero recurring fees.

6.2 White-Label Customisation

The widget is fully white-labelled. A visual Palette Designer lets agents configure:

  • Primary, background, text, and header colours via colour pickers.
  • Dark/light mode toggle.
  • Custom greeting text and placeholder messages.
  • Preset colour themes for quick configuration.
  • One-click "Copy Embed Code" button.
Widget Palette Designer — colours, themes, and embed code
Widget Palette Designer — colours, themes, and embed code

6.3 Technical Implementation

The widget is a standalone JavaScript file (chatr.js) that injects its own DOM without interfering with the host page. It creates a guest session via Socket.IO with a 24-hour TTL in localStorage.

It supports all DM features: text, voice notes, file attachments, link previews, typing indicators, and read receipts. It is the full Chatr messaging experience embedded in a third-party website.

7. AI-Powered Intelligence

Chatr integrates AI at two levels: a conversational assistant and a background intelligence layer.

Luna — AI Chat Assistant

Luna is Chatr's built-in AI chatbot, powered by OpenAI's GPT-4o-mini. She appears as a regular contact in the conversation list. Users interact with Luna exactly as they would with a human — same UI, same features, zero learning curve.

Luna "types" while generating a response (typing indicator), supports full conversation history, and provides contextual, helpful answers.

Luna AI assistant providing detailed, contextual responses
Luna AI assistant providing detailed, contextual responses

Conversation history sent to OpenAI API with a personality system prompt. Responses stream token by token. Rate-limited with error recovery.

Automatic Conversation Summaries

AI-generated one-line summaries appear on the conversation list, replacing the last-message preview. Managers can scan every conversation's status without opening a single thread.

Toast Notifications

Incoming messages trigger non-intrusive toast notifications with the sender's avatar, name, and message preview. Tapping opens the conversation. Auto-dismiss after 5 seconds.

8. Security, Authentication & Privacy

Enterprise-grade identity verification and granular privacy controls.

8.1 Authentication Methods

Registration

Username, email, password with real-time strength indicator. 6-digit email verification code activates the account.

Login

Credentials plus email or SMS verification code. Two-step login prevents compromised-password attacks.

JWT with short-lived access + long-lived HttpOnly refresh tokens. Redis-backed token blacklisting.

Two-Factor Authentication (2FA)

Optional TOTP via any authenticator app. QR code setup. Backup codes provided. Implemented using RFC 6238.

SMS Verification

Phone number verification via one-time SMS code. Can be used as a secondary login channel.

Password Recovery

Secure email-based reset link with configurable expiry. Single-use.

8.2 Privacy Controls

Users control who can see each piece of their profile — online status, name, phone, email, gender, join date — with three visibility levels: Everyone, Friends only, or Nobody.

Privacy settings — per-field visibility controls
Privacy settings — per-field visibility controls

Enforced server-side: the API strips restricted fields before responding. Cannot be bypassed via network inspection.

8.3 Rate Limiting & Protection

All sensitive endpoints are rate-limited using Redis-backed sliding window counters. Failed login attempts trigger temporary lockout. Message sending is throttled per-client. Protects against brute-force, credential stuffing, and denial-of-service.

9. Mobile-First Design & Themes

Every screenshot in this document was captured at mobile viewport resolution (390×844, iPhone 14). Chatr is designed mobile-first and scales up to desktop with a persistent sidebar layout. Bottom tab navigation, touch-optimised targets, swipe gestures, and iOS safe-area insets.

Dark & Light Themes

Switch with a single tap — no reload, no flicker. Dark theme uses deep navy optimised for OLED screens.

Dark theme — conversation list
Dark theme — conversation list
Dark theme — chat view
Dark theme — chat view
Light theme — conversation list
Light theme — conversation list
Light theme — chat view
Light theme — chat view

CSS custom properties toggled at the document root. Theme stored in localStorage, applied before first paint via blocking script.

10. Profile & Personalisation

Profile

Circular avatar, 16:9 cover banner with built-in crop tools. Display name, bio, username, and personal details.

Settings

  • Theme toggle (dark/light) with instant preview.
  • Ghost typing toggle.
  • Privacy settings (per-field visibility controls).
  • Blocked users management.
  • Storage usage chart with per-category breakdown.
  • Account settings, 2FA setup, logout.
User profile with avatar and cover
User profile with avatar and cover
Settings panel
Settings panel
Storage usage breakdown
Storage usage breakdown

11. Technical Architecture

For technical evaluators. The stack follows industry best practices, designed for production reliability and horizontal scalability.

11.1 The Stack

Frontend — Next.js 16, React 19, TypeScript.

App Router, strict TypeScript, React Context (no Redux), Framer Motion animations, Socket.IO for real-time, IndexedDB for offline cache.

Backend — Node.js, Express, TypeScript.

88 REST endpoints, 85+ Socket.IO event types. Authentication, message routing, file uploads, AI integration, email/SMS delivery.

Database — PostgreSQL 16, Prisma ORM.

9 models with type-safe queries and automatic migrations.

Caching & Pub/Sub — Redis 7.

Presence tracking, rate limiting, token blacklisting, and cross-instance pub/sub via Socket.IO Redis adapter.

AI — OpenAI GPT-4o-mini.

Chatbot (Luna) and automatic conversation summaries.

Storage — AWS S3.

Media storage. Sharp generates multi-resolution image variants on upload.

11.2 Real-Time Infrastructure

Message Delivery Pipeline

  • Frontend emits "message:send" via Socket.IO with content, type, and recipient ID.
  • Backend validates, persists to PostgreSQL, emits "message:new" to recipient's room.
  • "message:delivered" acknowledgement updates sender's UI. "message:read" completes the cycle when the message scrolls into view.
  • Offline messages stored in PostgreSQL, delivered on reconnection.

End-to-end delivery completes in under 100ms.

Horizontal Scaling

Socket.IO Redis adapter enables multiple backend instances behind a load balancer. Redis pub/sub routes messages across instances transparently. Scaling means adding servers, not rewriting code.

11.3 Database Design

  • User — Credentials, profile, settings, presence, guest sessions.
  • Conversation — DM thread between two users. Last message timestamp for sorting.
  • Message — Content, type, sender, recipient/group, status, reply reference, timestamps. Indexed for fast queries.
  • Group — Name, description, avatar, cover, metadata.
  • GroupMember — Users ↔ groups with role (Owner, Admin, Member) and invite status.
  • Friendship — Friend connection with status (pending, accepted, blocked).
  • Reaction — Emoji ↔ message ↔ user with unique constraint.
  • MessageEditHistory — Full edit history (original content, updated content, timestamp).
  • Session — Active sessions for token management and multi-device support.

11.4 Media Pipeline

  • Frontend sends file via multipart POST.
  • Backend validates type and size (max 50 MB).
  • Images: Sharp generates 200px thumbnail, 600px medium, and original. All uploaded to S3.
  • Non-images: uploaded to S3 as-is.
  • S3 URLs stored in message record and delivered to recipient.

11.5 Deployment & Scaling

  • EC2 — Node.js backend in PM2 cluster mode across all CPU cores.
  • RDS — Managed PostgreSQL with automatic backups and encryption at rest.
  • ElastiCache — Managed Redis for presence, rate limiting, pub/sub, token blacklisting.
  • S3 — Media storage with server-side encryption and lifecycle policies.
  • Nginx — Reverse proxy, TLS termination, WebSocket upgrade handling.

Runs locally via Docker Compose in a single command. Development and production environments are architecturally identical.

12. Quality Assurance

Over 3,000 automated tests across three tiers.

3,000+
Total Tests
1,475
Frontend
1,133
Backend
233
Website
168
End-to-End

Frontend (1,475 tests)

Every React component, hook, context, form, and page tested. 99% coverage. Runs in under 30 seconds.

Backend (1,133 tests)

Every API endpoint, auth flow, Socket.IO handler, email/SMS service, and AI integration tested. 73% coverage.

End-to-End (168 tests)

Playwright drives Desktop Chrome and iPhone 14. Two simultaneous test users verify real-time delivery, typing indicators, and presence.

E2E results cached to .test-cache/ and displayed in the developer dashboard. Custom Playwright reporter.

13. Analytics Dashboard

Custom-built project intelligence dashboard with real-time code health, development velocity, test results, and security posture. Auto-refreshes every 30 seconds.

Dashboard — metric cards, code health gauges, commit intelligence
Dashboard — metric cards, code health gauges, commit intelligence
  • 17+ live metrics: commits, LOC, source files, tests, API endpoints, components, models.
  • Circular code health gauges with green/amber/red thresholds.
  • Commit intelligence: change type distribution, size distribution, weekly trends, heatmap.
  • Security audit: npm vulnerability scan, build health for frontend and backend.
  • Embedded test runner with real-time streaming results and re-run controls.
Full analytics dashboard (scrolled)
Full analytics dashboard (scrolled)

14. Developer Experience

Tooling built alongside the application with the same attention to quality.

Built-in documentation
Built-in documentation
Email template previews
Email template previews
  • Docs — Searchable documentation with architecture diagrams, API reference, and setup guides.
  • Email Templates — Visual previews of every transactional email.
  • API Docs — Interactive Swagger UI for all 88 REST endpoints.
  • Storybook — 69 component stories with dark and light theme variants. Visual documentation for every UI component.
  • Log Viewer — In-app logs with filtering, search, and severity levels.
  • Docker Compose — git clone to running app in under 2 minutes.

15. By the Numbers

User-facing features50+
Automated tests3,000+
Lines of code120,000+
Source files600+
REST API endpoints88
WebSocket event types85+
UI components200+ (77 custom)
Database models11
Auth methods4
Message types7
File upload limit50 MB
Frontend coverage99%
Backend coverage73%
E2E browsersChrome + iPhone 14
DeploymentAWS
Offline supportIndexedDB + queue
Development time30 days
Total commits243

16. Why Invest in Chatr

It Is a Complete Product

Not a mockup, tutorial, or proof of concept. 50+ features — real-time messaging, voice notes, video, file sharing, code blocks, link previews, typing indicators, ghost typing, read receipts, reactions, replies, editing, unsending, group chats with roles, friend requests, blocking, search, AI chatbot, conversation summaries, toast notifications, offline support, dark/light themes, profile system, privacy controls, 2FA, SMS verification, email verification, and a fully embeddable support widget. Every feature is built, integrated, and tested.

It Generates Revenue

The widget competes directly with Intercom (£39–£99/seat/month), Drift, and Zendesk Chat — at zero recurring cost. A 10-person team saves £4,700–£11,900/year.

It Is Tested Like Enterprise Software

3,000+ tests across three tiers. 99% frontend and 73% backend coverage. Custom dashboard visualises test results, code health, and security in real time.

It Is Built on Proven Technology

React 19, Next.js 16, Node.js, PostgreSQL, Redis, AWS — the same stack trusted by Slack, Shopify, Netflix, and Uber. Any JavaScript developer can be productive on day one.

It Scales Without Rewriting

PM2 cluster mode, Socket.IO Redis adapter, managed PostgreSQL, S3. Scaling means adding servers, not rewriting architecture.

It Demonstrates Exceptional Engineering Range

Frontend. Backend. Real-time WebSocket infrastructure. AI integration. Cloud deployment. Database design. Security. Accessibility. Three-tier testing. Developer tooling. Analytics dashboard. Email/SMS services. Embeddable widget. All designed, built, tested, documented, and deployed by a single developer in 30 days.