papercups-io/papercups
38.3
Weak · 22 September 2026
57.1k
lines of production code
TypeScript
with Elixir
6
measurements over time
What this system is
This system is a customer support and engagement platform that manages conversations, customer data, and integrations. It provides a comprehensive dashboard for agents to handle chats, emails, and issues, while offering tools for developers to build and test API integrations. The platform supports multi-channel communication, real-time collaboration, and automated workflows, all secured by role-based access control and session management.
How it got here
2020 — Platform expansion and UI modernization
31 changes.
This period focused on modernizing the application's architecture and user interface, including a major dashboard overhaul, the introduction of Docker-based deployment, and the addition of real-time presence tracking. Significant features were added for billing, integrations, and reporting, supported by comprehensive test coverage and background worker implementations.
2021 — UI and feature expansion
9 changes.
This period focused on building out the user interface and core application features, including new management pages for tags, issues, developers, and inboxes. It also introduced onboarding flows, settings configurations, and backend integrations for email processing and webhooks.
Features
Add SES email forwarding to webhook
A new Lambda function and setup script are introduced to forward incoming SES emails to an external webhook. The Node.js handler parses email headers and body, then POSTs the data to the URL specified in the WEBHOOK\_URL environment variable. The accompanying shell script automates the creation of the AWS Lambda function using Node.js 14.x.
scripts · high confidence
Add company management UI
A new Companies page is introduced, providing a table view of all companies with links to individual company detail pages. Users can create new companies and edit existing ones, including associating Slack channels and teams. The CompanyDetailsPage displays company information, allows deletion, and shows connected customers. The CreateCompanyPage and UpdateCompanyPage forms enable users to input company details and select Slack channels for integration.
assets/src/components/companies · high confidence
Add interactive demo pages for chat and bot features
The application now includes dedicated demo pages for the chat widget and a bot assistant. Users can visit the demo page to customize the chat widget's title, subtitle, and color, and then sign up for a free account. Additionally, a new BotDemo component provides a functional chatbot interface with pre-configured FAQs and the ability to add new question-and-answer pairs for testing. These components import the chat widget and storytime libraries to provide a live preview of the product's capabilities.
assets/src/components/demo · high confidence
Add live session viewing and conversation sidebar
Introduced new components for live session management: a SessionsOverview page to list active and inactive browser sessions with status indicators, a LiveSessionViewer for real-time session playback using Phoenix presence and rrweb, and a ConversationSidebar to display and send messages within a modal. The change also includes an InstallingStorytime page to guide users in setting up the session recording plugin.
assets/src/components/sessions · high confidence
Add release scripts for database management
Added a new \ChatApi.Release\ module and associated shell scripts (\createdb.sh\, \migrate.sh\, \rollback.sh\, \seed.sh\) to the release overlay. These scripts allow users to create the database, run or roll back Ecto migrations, and seed the database directly from the release environment.
lib, rel · high confidence
Added Docker and deployment configuration files
Added configuration files to support Docker-based development and production deployments. This includes a multi-stage Dockerfile for building the Elixir/React application, a docker-compose.yml for local development with PostgreSQL, and entrypoint scripts to handle database migrations and application startup. Additionally, a .dockerignore file was added to optimize the Docker build context by excluding unnecessary files like .env, node\_modules, and IDE directories.
(repo-wide) · high confidence
Added SVG icons and JavaScript libraries for new integrations
The \assets/public\ directory was updated to support new integrations and UI improvements. New SVG icon files were added for GitHub, Gmail, HubSpot, Intercom, Jira, Mattermost, Microsoft Teams, Salesforce, SES, Sheets, and Slack, enabling visual representation of these services in the interface. Additionally, new JavaScript files were introduced: \storytime-v0.js\ and \storytime.js\ (truncated), likely supporting specific integration logic or UI components. These assets provide the necessary visual and functional building blocks for the upcoming integration features.
assets/public · high confidence
Adds saved replies (canned responses) management UI
Users can now create, view, and delete saved replies (canned responses) from the dashboard. This includes a new 'Saved replies' section with a table to list existing replies, a modal to create new ones, and the ability to delete them. The feature is supported by new types, API calls, and utility functions for handling canned responses.
assets/src · high confidence
Automated background workers for email, notifications, and inbox sync
The application now includes a suite of background workers to handle asynchronous tasks. These include syncing Gmail inboxes and enabling inbox sync, sending welcome and user invitation emails, processing Amazon SES email events, sending conversation reply and @mention notification emails, and dispatching push notifications. Additionally, new workers manage conversation reminders, archive stale closed or free-tier conversations, and handle browser replay events.
lib/workers · high confidence
Database schema updates for new features and integrations
The database schema has been updated to support new features and integrations. This includes creating tables for user invitations, browser sessions, browser replay events, notes, companies, and issues, as well as adding columns for email alerts, Stripe billing, working hours, and message metadata. The changes also fix foreign key constraints to ensure proper cascade deletes for user and account associations.
priv · high confidence
Introduce Functions feature with new UI components
Added a new 'Functions' section in the UI, including an overview page listing all functions, a details page for editing and deploying functions, and a modal for creating new functions. The implementation includes support for uploading and deploying function code, with a new onboarding flow for requesting access to the feature.
assets/src/components/lambdas · high confidence
Introduce Issues management interface
Users can now view, create, update, and delete issues through a new Issues page. This includes an overview with search and filtering, a detailed view for each issue, and modals for creating or editing issue details. The interface supports linking issues to customers and syncing with GitHub issues.
assets/src/components/issues · high confidence
Introduce account settings, working hours, and personal API key management
Added new backend contexts for managing account-level configurations and user credentials. Users can now configure automated reply email preferences and conversation reminder intervals via the new Settings model. A new WorkingHours model allows defining account availability schedules. Additionally, a PersonalApiKey context and schema have been introduced, enabling users to generate, list, update, and delete personal API keys for programmatic access.
_lib/chat\api · high confidence
Introduce new billing and payment UI with Stripe integration
The billing section now features a complete UI overhaul for managing subscriptions and payments. A new BillingOverview component displays the current subscription plan, price, and discount, while a PricingOverview modal allows users to select between Starter, Lite, and Team plans. Payment handling is integrated via Stripe, with new CardInputSection and PaymentForm components enabling secure credit card entry and updates. Supporting logic for calculating subscription prices, discounts, and trial dates has been added, along with corresponding unit tests.
assets/src/components/billing · high confidence
Introduce tag management UI
Users can now create, edit, and delete tags, as well as search and filter them in the tags overview. The new components include a modal for creating new tags, a modal for editing existing tag details, and a details page that displays tag information along with associated conversations and customers.
assets/src/components/tags · high confidence
Introduce the Inboxes v1 dashboard and detail views
Users can now manage inboxes through a new dedicated section. This includes an InboxesOverview page to list and create inboxes, an InboxDetailsPage to view inbox settings and integrations, an InboxConversations view for managing open conversations, and pages for configuring email forwarding and integration settings. The sidebar and routing have been updated to support this new structure.
assets/src/components/inboxes · high confidence
New API controllers for billing, integrations, and resource management
Added new API controllers to the backend, introducing endpoints for managing billing subscriptions, connecting third-party services (GitHub, Gmail, Google, HubSpot, Intercom, Mattermost), and managing internal resources (canned responses, companies, event subscriptions, forwarding addresses, issues, lambdas, and inboxes). These controllers handle authentication, data retrieval, and state changes for these specific domains.
_lib/chat\_api\web/controllers · high confidence
New Getting Started page with onboarding steps
A new Getting Started page has been added to guide users through initial setup tasks. The page displays a list of onboarding steps—including configuring an inbox, setting up a profile, inviting teammates, adding integrations, and upgrading a subscription—each with a status indicator and a call-to-action button to navigate to the relevant settings or configuration screens.
assets/src/components/getting-started · high confidence
New Reporting Dashboard with Interactive Charts
The Reporting Dashboard now features a suite of interactive charts to visualize key metrics. Users can view message and conversation trends over time, track first response and resolution times, and analyze customer breakdowns by browser, OS, and timezone. The dashboard includes a date range picker to filter data and displays top 10 items in breakdown charts, with an 'Other' category for the rest. This provides a comprehensive view of support performance and customer engagement.
assets/src/components/reporting · high confidence
New administrative tasks for account and user management
Added several new Mix CLI tasks to assist with account and user management. These include enabling and syncing Gmail inbox features, generating API keys, sending ad-hoc notifications, fixing Slack message formatting, setting subscription plans, and validating user emails. These tools allow administrators to manually trigger syncs, update user data in external services like Customer.io, and manage account states directly from the command line.
lib/mix · high confidence
New authentication components and improved session management
The authentication flow is now handled by a new \AuthProvider\ that manages user state, tokens, and account data, including automatic session refresh every 20 minutes to prevent access token expiration. The \Login\ component now supports redirecting users to a specific page after successful authentication. Additionally, new components have been added: \EmailVerification\ for handling email confirmation, \PasswordResetRequested\ to confirm password reset emails, \RequestPasswordReset\ for initiating password resets, and \SocketProvider\ to manage WebSocket connections for real-time updates.
assets/src/components/auth · high confidence
New conversation UI components and state management
The conversation interface has been refactored into a new set of React components including ChatMessage, ChatMessageBox, ConversationHeader, ConversationFooter, and ConversationMessages, which together render the main chat view, message bubbles, and input area. A new ConversationsProvider manages the state of conversations and messages, while the ConversationsDashboard orchestrates the layout. This change introduces support for displaying message sources (e.g., email, Slack), file attachments, and customer details in the sidebar, along with the ability to assign conversations, mark priorities, and close/reopen them directly from the header.
assets/src/components/conversations · high confidence
New developer tools: API Explorer, Code Sandbox, and Email Template Builder
The developers section now includes several new interactive components to help users test and build integrations. The ApiExplorer component allows users to run and test API calls directly in the browser. The CodeSandbox component provides a live environment for testing webhook handlers and other serverless functions. Additionally, the EmailTemplateBuilder enables users to create and preview email templates using a split-pane editor and live preview. These tools are supported by new utility components like DynamicTable for displaying API responses and MonacoEditor for code editing.
assets/src/components/developers · high confidence
New integrations for GitHub, Gmail, Google Sheets, HubSpot, and Intercom
The integrations page now includes dedicated setup and configuration pages for GitHub, Gmail, Google Sheets, HubSpot, and Intercom. Users can connect these services directly from the integrations overview, with each integration providing its own details page to manage authorization, view connection status, and disconnect the service. The integrations table has been updated to list these new options alongside existing ones like Slack and Mattermost.
assets/src/components/integrations · high confidence
New settings page components for account, team, and chat widget configuration
Added new React components in the settings directory to support account management, team member role assignment, conversation reminders, disabled user management, email forwarding, and chat widget customization. These components provide the UI for managing company details, user roles, working hours, and widget appearance, enabling users to configure their account and team settings.
assets/src/components/settings · high confidence
Redesigned customer details page with tabs for conversations, notes, and issues
The customer details page has been redesigned to organize customer information into distinct sections. A new sidebar displays basic customer details, activity history, device information, and metadata. The main content area now features a tabbed interface allowing users to view and manage a customer's conversations, notes, and linked issues. Additionally, the customer table on the main customers page now supports filtering by tags and includes an option to display anonymous users.
assets/src/components/customers · high confidence
Security
New authentication and security plugs for role, user status, and IP handling
The application introduces three new Plug modules to enhance security and request handling: \EnsureRolePlug\ validates user roles (e.g., :user, :admin) and returns 401 for unauthorized access; \EnsureUserEnabledPlug\ blocks requests from disabled or archived users; and \IPAddressPlug\ extracts the client's real IP from the \x-forwarded-for\ header. These plugs are integrated into the router's \:api\_protected\ and \:public\_api\ pipelines, ensuring that all protected API endpoints enforce role and account status checks, while public endpoints receive accurate IP addresses for logging and analytics.
_lib/chat\_api\web · high confidence
Behavioural changes
Centralized runtime configuration with environment-driven settings
Configuration for the application has been restructured to use runtime environment variables, moving secrets and settings out of static config files. Production builds now enforce SSL for database connections and support IPv6, while email delivery can be configured via Mailgun, SMTP, or local adapters. The setup also introduces Sentry for error tracking, Customer.io integration, Oban for background job scheduling, and Swagger for API documentation.
config · high confidence
Enhanced real-time presence tracking and secure WebSocket authentication
The system now supports real-time presence tracking for customers and agents, allowing the dashboard to show who is online and active in conversations. This is enabled by new WebSocket channels (EventChannel, IssueChannel, NotificationChannel) and updated logic in ConversationChannel and RoomChannel that track user and customer sessions via Phoenix Presence. Additionally, the WebSocket connection process now requires a valid authentication token, ensuring that only authenticated users can join channels, with credentials verified via Pow and Sentry user context set for debugging.
_lib/chat\_api\web/channels · high confidence
Expanded API responses with nested resources and pagination
The API now returns richer, nested data in JSON responses. Most views (e.g., Customer, Conversation, Message) now include related resources like tags, notes, conversations, and attachments directly in the payload. Additionally, the conversation list endpoint now supports pagination with metadata (next, previous, total\_count).
_lib/chat\_api\web/views · high confidence
Major dashboard overhaul and component cleanup
The dashboard has been significantly restructured, moving from a class-based component to a modern functional component using React hooks. This change introduces a new routing and layout system, integrating numerous new pages and features including customer and company details, reporting dashboards, and various integration settings. Additionally, several older or unused components (such as the old ChatMessage, Demo, and Widget components) have been removed, while new utility components like MarkdownRenderer, DatePicker, and Spinner have been added to support the updated UI.
assets/src/components · high confidence
Test coverage
Add tests for CSVHelpers module; Added and updated channel tests for the chat API; Added test coverage for authentication and authorization plugs; Added test coverage for core domain models and integrations; Added test factories for core domain models; Added tests for email processing and reply workers; Added tests for multiple controller endpoints; Added tests for the IP address plug.
Dependencies
Update frontend and backend dependencies
The frontend assets have been renamed from 'chat-ui' to 'papercups-ui' and updated with new dependencies including @monaco-editor/react, @papercups-io/chat-builder, @papercups-io/chat-widget, @papercups-io/storytime, @sentry/react, @stripe packages, and various React/TypeScript libraries. The backend mix.exs has been updated to include new Elixir dependencies such as customerio, ex\_aws, ex\_aws\_s3, ex\_aws\_lambda, ex\_aws\_ses, swoosh, gen\_smtp, phoenix\_swagger, oban, sentry, google\_api\_gmail, oauth2, mail, ex\_json\_schema, pow\_postgres\_store, tzdata, scrivener\_ecto, floki, paginator, phoenix\_pubsub\_redis, appsignal\_phoenix, earmark, sweet\_xml, and exponent\_server\_sdk, while also updating existing dependencies like phoenix, hackney, and jason.
(dependencies) · medium confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 34 → 38 (+4.1)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 80 → 81 (+1.1)
- Architecture 78 → 50 (-27.9)
- Maturity 42 → 47 (+5.1)
- Readiness 18 → 26 (+7.8)
- Security 48 → 55 (+6.9)
- Accessibility 46 → 46 (+0.1)
Resolved (115)
- Boundary-crossing change coupling: message.ex ↔ message_view.ex (lib/chat_api/messages/message.ex)
- Change coupling: api.ts ↔ IntegrationsTable.tsx (assets/src/api.ts)
- Change coupling: api.ts ↔ conversation_controller.ex (assets/src/api.ts)
- Change coupling: api.ts ↔ gmail_controller.ex (assets/src/api.ts)
- Change coupling: api.ts ↔ router.ex (assets/src/api.ts)
- Change coupling: api.ts ↔ support.ts (assets/src/api.ts)
- Change coupling: conversation_channel.ex ↔ notification_channel.ex (lib/chat_api_web/channels/conversation_channel.ex)
- Change coupling: helpers.ex ↔ helpers.ex (lib/chat_api/messages/helpers.ex)
- Change coupling: notification_channel.ex ↔ message_view.ex (lib/chat_api_web/channels/notification_channel.ex)
- Coverage not included — suite not readable by the collector
- Critical CVE: [GHSA redacted] (assets/package-lock.json)
- Critical CVE: [GHSA redacted] (assets/package-lock.json)
- Critical CVE: [GHSA redacted] (assets/package-lock.json)
- Critical CVE: [GHSA redacted] (assets/package-lock.json)
- Critical CVE: [GHSA redacted] (assets/package-lock.json)
- Critical CVE: [GHSA redacted] (assets/package-lock.json)
- Critical CVE: [GHSA redacted] (assets/package-lock.json)
- Critical CVE: [GHSA redacted] (assets/package-lock.json)
- Critical CVE: [GHSA redacted] (assets/package-lock.json)
- Critical CVE: [GHSA redacted] (assets/package-lock.json)
- …and 95 more
New (594)
- Change coupling: ChatWidgetSettings.tsx ↔ widget_setting.ex (assets/src/components/settings/ChatWidgetSettings.tsx)
- Change coupling: CustomersPage.tsx ↔ CustomersTable.tsx (assets/src/components/customers/CustomersPage.tsx)
- Change coupling: CustomersPage.tsx ↔ types.ts (assets/src/components/customers/CustomersPage.tsx)
- Change coupling: IntegrationsTable.tsx ↔ router.ex (assets/src/components/integrations/IntegrationsTable.tsx)
- Change coupling: ReportingDashboard.tsx ↔ reporting.ex (assets/src/components/reporting/ReportingDashboard.tsx)
- Change-coupling hub: api.ts → icons.tsx, IntegrationsTable.tsx, conversation_controller.ex, router.ex, conversation_view.ex (assets/src/api.ts)
- ChatMessage.ChatMessage (cognitive 17) (assets/src/components/conversations/ChatMessage.tsx)
- ChatWidgetSettings.CodeSnippet (cognitive 20) (assets/src/components/settings/ChatWidgetSettings.tsx)
- ChatWidgetSettings.CodeSnippet (cyclomatic 21) (assets/src/components/settings/ChatWidgetSettings.tsx)
- ClassTooLong: IntegrationsOverview (assets/src/components/integrations/IntegrationsOverview.tsx)
- ConversationDetailsSidebar.CustomerDetails (cognitive 29) (assets/src/components/conversations/ConversationDetailsSidebar.tsx)
- ConversationDetailsSidebar.CustomerDetails (cyclomatic 23) (assets/src/components/conversations/ConversationDetailsSidebar.tsx)
- ConversationFooter.ConversationFooter (cognitive 32) (assets/src/components/conversations/ConversationFooter.tsx)
- ConversationFooter.ConversationFooter (cyclomatic 41) (assets/src/components/conversations/ConversationFooter.tsx)
- ConversationItem.ConversationItem (cyclomatic 17) (assets/src/components/conversations/ConversationItem.tsx)
- ConversationMessages.ConversationMessages (cognitive 26) (assets/src/components/conversations/ConversationMessages.tsx)
- ConversationMessages.ConversationMessages (cyclomatic 19) (assets/src/components/conversations/ConversationMessages.tsx)
- ConversationsDashboard.ConversationsDashboard (cognitive 33) (assets/src/components/conversations/ConversationsDashboard.tsx)
- ConversationsDashboard.ConversationsDashboard (cyclomatic 40) (assets/src/components/conversations/ConversationsDashboard.tsx)
- ConversationsDashboard.Wrapper (cyclomatic 28) (assets/src/components/conversations/ConversationsDashboard.tsx)
- …and 574 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
papercups-io/papercups was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 22 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 6a6f5adc7f0cef5813b2c2f1c0659922defaf976 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-821afab8930d.