codingteam/emulsion
54.7
Adequate · 3 October 2026
2.6k
lines of production code
F#
primary language
2
measurements over time
What this system is
Emulsion is a .NET-based messaging bridge that synchronizes and archives messages between Telegram and XMPP platforms. It persists chat history and media content to a local SQLite database, providing a React-based web interface for browsing archived messages and accessing cached files. The system manages connection lifecycles, handles content proxying with file caching, and exposes REST APIs for message statistics and history retrieval.
How it got here
2017–2019 — .NET 10 migration and XMPP integration
8 changes.
The project underwent a comprehensive migration to .NET 10 and React 19, restructuring the repository into a multi-project solution with standardized licensing and documentation. This period focused on implementing core messaging capabilities, including a new XMPP integration via SharpXMPP, while establishing robust test coverage for Telegram, XMPP, and core system modules.
2021 — Database persistence and content proxying
6 changes.
The project introduced Entity Framework Core with SQLite to replace previous storage mechanisms, establishing a durable schema for Telegram content and archive entries. This structural shift was accompanied by the implementation of a new ContentProxy module for caching and persisting message content, supported by comprehensive tests for database integrity and caching logic.
2022–2024 — Architecture modularization and web interface
8 changes.
The project refactored its monolithic structure by extracting Telegram integration and messaging logic into dedicated libraries, establishing a unified message handling system. It introduced a centralized configuration model and built a new web interface with REST APIs and a React frontend to support content access and message history browsing.
Features
Emulsion application core and configuration
The Emulsion application now initializes via Program.fs, reading configuration from a JSON file (defaulting to emulsion.json) and supporting a custom path via command-line arguments. It sets up Serilog-based logging with category-specific file outputs (telegram.log, xmpp.log, system.log), migrates the database if configured, and starts the messaging core which bridges Telegram and XMPP systems while optionally archiving messages to the database. The application also optionally starts a web server for hosting and content proxying, managing the lifecycle of all components through JetBrains.Lifetimes.
Emulsion · high confidence
Extracted reusable test utilities from TestUtils
The Emulsion.TestFramework now provides a set of dedicated, reusable helper modules extracted from the previous monolithic TestUtils. This includes Emulsion.TestFramework.Exceptions for unwrapping nested exceptions, Emulsion.TestFramework.FileCacheUtil for setting up temporary file caches, Emulsion.TestFramework.Lifetimes and Emulsion.TestFramework.Signals for managing async timeouts and JetBrains lifetimes, Emulsion.TestFramework.LockedBuffer and Emulsion.TestFramework.Waiter for thread-safe test synchronization, Emulsion.TestFramework.Logging for Serilog integration with xUnit, Emulsion.TestFramework.StreamUtils for safe stream reading, Emulsion.TestFramework.TelegramClientMock for mocking Telegram API responses, Emulsion.TestFramework.TestDataStorage for initializing in-memory databases, and Emulsion.TestFramework.WebFileStorage for hosting a temporary local HTTP server to serve test assets.
Emulsion.TestFramework · high confidence
Introduce Emulsion.Messaging library for unified message handling
A new Emulsion.Messaging project has been added, providing a structured way to handle instant messaging. It defines core message types (AuthoredMessage, EventMessage) and distinguishes between incoming sources (XmppMessage, TelegramMessage) and outgoing messages. The library includes a MessageSender module that manages an outgoing message queue with retry logic and a restart cooldown, as well as a MessageSystem abstraction that handles connection lifecycle, reconnection, and message routing to a provided receiver function.
Emulsion.Messaging · high confidence
Introduce Message Archive frontend with paginated message viewing
Adds a new React-based frontend for the Message Archive feature, providing a user interface to browse archived messages. The application fetches message statistics and paginated message lists via API endpoints (/api/history/statistics and /api/history/messages), allowing users to navigate through pages and adjust the number of messages displayed per page (25, 50, 100, or 500). The UI renders message details including sender, timestamp, and text content, with basic styling provided by LESS.
Emulsion.MessageArchive.Frontend · high confidence
Introduce XMPP messaging support via SharpXMPP
Adds a new XMPP integration to Emulsion, enabling users to connect to XMPP servers, join password-protected multi-user chat rooms, and send/receive messages. The implementation uses the SharpXMPP library, featuring automatic connection and room pings to maintain stability, message delivery confirmation with timeouts, and filtering of historical, empty, or self-sent messages.
Emulsion/Xmpp · high confidence
Introduce centralized configuration model for Emulsion
The application now uses a structured settings module to manage configuration for XMPP, Telegram, logging, database, hosting, file caching, and message archiving. Users can configure connection timeouts, room credentials, cache size limits, and toggle the message archive feature via the new configuration schema.
Emulsion.Settings · high confidence
Introduce content proxy with file caching and database storage
Added the Emulsion.ContentProxy module, which provides a new capability to proxy and cache content. This includes a FileCache component that downloads and stores files locally (with Windows compatibility workarounds), a ContentStorage module for persisting message content metadata in the database, and utility functions for encoding/decoding content links using Hashids.
Emulsion.ContentProxy · high confidence
New CI scripts for version detection and encoding compliance
Added two new PowerShell scripts to support CI processes: Get-Version.ps1 determines the project version by parsing git tags or falling back to the .fsproj file, and Test-Encoding.ps1 scans the repository for UTF-8 BOM markers and CRLF line endings, with an optional autofix mode to correct them automatically.
scripts · high confidence
New web interface for content access and message history
Emulsion now includes a built-in web server that provides two new API endpoints. The ContentController allows users to retrieve files previously sent via Telegram by accessing a hash-based URL, which either redirects to the original Telegram message or serves the file directly if cached. Additionally, the HistoryController exposes a REST API under /api/history to retrieve message statistics and a paginated list of archived messages, enabling external tools or frontends to interact with the message archive.
Emulsion.Web · high confidence
Architecture
Extract Telegram integration into a dedicated Emulsion.Telegram project
The Telegram messaging functionality has been extracted from the monolithic codebase into a new, standalone \Emulsion.Telegram\ project. This change introduces a dedicated \Client\ module for handling Telegram bot interactions and message processing, a \Funogram\ module for low-level API communication, and a \LinkGenerator\ module that resolves Telegram content (photos, stickers, documents) into internal Emulsion links. The extraction also includes specific logic for handling message quoting, text limits, and proper MIME-type detection for various media types, separating these concerns from the main application logic.
Emulsion.Telegram · high confidence
Behavioural changes
Database schema updates for Telegram content and archive entries
The database schema has evolved to support richer Telegram content storage and new archive functionality. The TelegramContents table now includes ChatId, FileName, and MimeType columns, with a unique constraint covering all these fields alongside ChatUserName, MessageId, and FileId to ensure data integrity. Additionally, a new ArchiveEntries table has been introduced to store message metadata including DateTime, Sender, and Text, enabling the system to track and retrieve archived message history.
Emulsion.Database/Migrations · high confidence
Introduce SQLite-backed database persistence using Entity Framework Core
The application now uses Entity Framework Core with SQLite to persist data, replacing previous storage mechanisms. This change introduces a new database schema with entities for Telegram content (including file metadata) and message archive entries, along with infrastructure for database migrations, transactional writes, and query helpers. Users benefit from durable, structured storage for messages and linked content, with automatic schema updates on startup.
Emulsion.Database · high confidence
Project restructured for .NET 10 with comprehensive documentation and licensing
The repository has been reorganized into a multi-project solution targeting .NET 10, with the build environment now requiring the .NET SDK 10.0.401 and Node.js 18 for frontend assets. This change introduces a formal solution file, a Dockerfile based on the .NET 10 SDK and ASP.NET runtime, and a .dockerignore to optimize build contexts. To support compliance and contributor clarity, the project now includes a detailed Contributor Guide, Maintainership documentation, and a standardized Changelog, while all source files and configuration artifacts are annotated with SPDX license headers compliant with the REUSE specification.
(repo-wide) · high confidence
Test coverage
Added XMPP integration tests; Added tests for ContentProxy storage, caching, and ID encoding; Added tests for MessageSystem lifecycle and error handling; Added tests for database initialization and unique constraint enforcement; Added unit tests for ContentController; Added unit tests for Telegram message handling and link generation; Added unit tests for core Emulsion modules.
Dependencies
Add .NET global tools configuration for Entity Framework Core
A new \.config/dotnet-tools.json\ file has been added to the project, configuring the \dotnet-ef\ global tool at version 10.0.12. This enables the use of Entity Framework Core command-line utilities for database operations. A corresponding license file (\dotnet-tools.json.license\) has also been added to ensure REUSE compliance for this configuration.
.config · high confidence
Upgrade to .NET 10 and React 19
The project has been upgraded to target .NET 10.0 across all backend modules (including Emulsion, Emulsion.Web, Emulsion.Database, and Emulsion.Telegram) and updated to use React 19.3.0 with corresponding TypeScript type definitions for the frontend. This change also includes updates to supporting libraries such as Serilog (v4.4.0), Entity Framework Core (v10.0.12), and SharpXMPP (v0.5.1) to align with the new runtime and framework versions.
(dependencies) · high 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 54 → 55 (+0.5)
- Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.
Lenses
- Code Health 98 → 98 (+0.0)
- Architecture 87 → 93 (+5.9)
- Maturity 51 → 51 (+0.0)
- Readiness 65 → 63 (-2.3)
- Security 78 → 78 (+0.2)
- Accessibility 44 → 44 (+0.0)
- Performance 100 (new)
Resolved (8)
- Deprecated: SQLitePCLRaw.lib.e_sqlite3
- Deprecated: Serilog.Sinks.RollingFile
- Deprecated: xunit
- Documentation: no usage examples (README.md)
- High CVE: [GHSA redacted] (Emulsion.MessageArchive.Frontend/package-lock.json)
- Outdated: FSharp.Core
- Outdated: SQLitePCLRaw.lib.e_sqlite3
- Outdated: SimpleBase
New (1)
- Documentation: no project overview (README.md)
Changes since last survey
- 3 commits — 3 feature/other, 0 fixes
By area
- .github/workflows — 1 commit
- Emulsion.ContentProxy/Emulsion.ContentProxy.fsproj — 1 commit
- Emulsion.Telegram/Emulsion.Telegram.fsproj — 1 commit
Notable commits
- change: Update dependency JetBrains.Lifetimes to 2026.3.1
- change: Update dependency ubuntu to v26
- change: Update funogram monorepo
API surface
- Unchanged — 1 HTTP endpoints
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
codingteam/emulsion 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 3 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 2b403c110237c21b3a6a1c93855fdb3c130832fb — the exact code this score is about.
- Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-4f4226d619ea.