Skip to content
CAI
Software that uses CAICheck a score

danhper/opencov

50.3

Adequate · 18 September 2026

2.6k

lines of production code

Elixir

with JavaScript

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

OpenCov is a self-hosted code coverage tracking service that ingests build data via API and displays detailed coverage metrics for projects, builds, and files. It provides user authentication, role-based admin management, and generates Coveralls-compatible badges in multiple formats. The system features a React-based public landing page and a Phoenix-based web interface for managing projects and viewing coverage history.

How it got here

2015 — Initial platform implementation

45 changes.

This period established the core functionality of the OpenCov platform, implementing user authentication, project management, and code coverage tracking via a new database schema and Ecto models. It introduced the web interface for viewing builds and files, generated coverage badges, and provided an administrative dashboard for managing users and settings. The work also included modernizing the build tooling and configuration structure to support these new features.

2016–2026 — Architecture refactoring and initial setup

5 changes.

The project refactored its core architecture by centralizing database operations into dedicated manager modules, replacing the previous model-based approach. This period also established the initial application state through seed data, added English localization for user-facing messages, and launched a new React-based landing page to showcase the product.

Features

Add JSON view for job API responses

A new view module (Opencov.Api.V1.JobView) has been introduced to handle the serialization of job data for the API. When rendering a job, it now outputs a JSON object containing only the id, project\_id, build\_id, and coverage fields, ensuring a consistent and limited response structure for clients consuming the job endpoint.

web/views/api · high confidence

Add OpenCov landing page

The landing area now includes a new React + TypeScript + Vite application that serves as the public-facing entry point for OpenCov. This page displays the product's core value propositions—coverage history tracking, Coveralls-compatible ingestion, and self-hosted deployment—along with links to the GitHub repository and a live demo. The implementation includes the necessary build configuration (Vite, ESLint, TypeScript), styling, and assets to render this marketing interface.

landing · high confidence

Add authentication, datetime, and display helper modules

Introduces three new helper modules to support application logic and UI rendering. The Authentication module provides utilities to detect demo mode and manage current user session state. The Datetime module adds flexible formatting capabilities for dates and times using the Timex library. The Display module enhances view rendering by converting nil values to dashes, booleans to check/cross symbols, atoms to capitalized strings, and text to HTML-safe line breaks.

lib/opencov/helpers · high confidence

Add base CSS partials for layout, navigation, and utilities

This change introduces a set of new Stylus style files in the web/static/css/partials directory to define the visual structure of the application. It establishes the base layout with a full-height main container, styles the navigation bar including brand logo sizing and dropdown menu formatting, and adds utility classes for floating, clearing, and text alignment. Additionally, it includes specific styling for breadcrumb navigation, global link and form behaviors, and color-coded coverage indicators.

web/static/css/partials · high confidence

Add coverage diff indicator to shared templates

A new shared template for coverage diffs has been added, which displays a directional icon and the absolute change in coverage percentage when the difference is significant (greater than 0.001). This component provides visual feedback on coverage changes, using up or down arrows to indicate improvement or decline, and formats the numeric value for clarity.

web/templates/shared · high confidence

Add email delivery and user notification templates

The application now includes the infrastructure to send transactional emails. A new AppMailer module handles the underlying delivery logic using the Mailman library, supporting both SMTP production delivery and test configurations. Additionally, a UserMailer module provides specific templates for user confirmation emails (with distinct subjects for registration vs. email change) and password reset notifications, enabling users to verify their accounts and recover access to their accounts.

web/mailers · high confidence

Add file list and file detail views

Introduced new template files for the file management section: \list.html.eex\ renders a paginated table of files with sortable columns (coverage, diff, name) and filter navigation, while \show.html.eex\ displays a breadcrumb trail linking to the project, build, and job, alongside the file's coverage percentage and a placeholder for a JavaScript-based coverage visualization component.

web/templates/file · high confidence

Add job show page with breadcrumb navigation and file list

A new job show page has been added to display detailed information for a specific job. The page features a breadcrumb navigation trail linking back to the project and build, explicitly distinguishing between the build number and the job number. It also displays the job's code coverage percentage, applying a dynamic color class based on the coverage value. Below the header, the page renders a partial view for a list of files associated with the job, supporting pagination, ordering, and filtering capabilities.

web/templates/job · high confidence

Add seed data for initial application setup and demo content

New seed scripts have been added to populate the database with essential initial records. This includes default application settings (such as signup restrictions and project visibility), a pre-configured admin user account, and a set of 'eyecatch' demo data featuring a sample project, builds, jobs, and file coverage details to provide a realistic starting state for new installations.

priv/repo/seeds · high confidence

Add user sign-up form

A new user sign-up page has been added, featuring a form that collects the user's name and email address. The form includes error handling to display validation messages if the submission fails and allows users to set a password during registration.

web/templates/user · high confidence

Added Ecto JSON type for database serialization

A new \Opencov.Types.JSON\ module has been introduced to handle JSON data within Ecto schemas. This custom type implements the \Ecto.Type\ behavior, allowing seamless casting, loading, and dumping of JSON structures using the \Jason\ library, which facilitates storing and retrieving complex JSON data in the application's database.

lib/opencov/types · high confidence

Added English translation files for error messages and user settings

New English (en) localization files have been added to the application's gettext directory. These include \errors.po\, which provides default English strings for common Ecto changeset validation messages (such as 'can't be blank', 'has already been taken', and format/length constraints), and specific translation files for \project\, \settings\, and \user\ modules that map internal field identifiers (like \name\, \email\, \base\_url\) to their user-facing English labels. This ensures that validation errors and form labels display correctly in English without requiring runtime extraction.

priv/gettext · high confidence

Added SVG template for coverage badges

A new SVG template file has been added to define the visual structure of coverage badges. This template uses EEx syntax to dynamically render the badge width, background color, and coverage percentage string, enabling the generation of customizable coverage status images.

lib/opencov/templates · high confidence

Added email templates for user confirmation and password reset

New HTML and text email templates have been added to support user onboarding and account recovery. The confirmation templates handle both new registrations and invitations, providing links to confirm email addresses or set initial passwords. Additionally, dedicated templates for password reset functionality have been introduced, allowing users to securely reset their credentials via a provided link.

web/templates/mailers · high confidence

Added password reset and profile editing templates

This change introduces the view layer for user profile management and password recovery. It adds templates for editing the user profile, changing the password (requiring current password verification), requesting a password reset via email, and finalizing the reset using a token. These templates provide the UI for users to manage their account credentials and profile information.

web/templates/profile · high confidence

Admin interface for managing projects

The admin section now includes a dedicated area for managing projects. Users can view a paginated list of all projects with their name, URL, and creation date, and perform actions to create, edit, or delete them. A detailed view for individual projects displays their name, base URL, token, and creation timestamp, along with shared edit and delete action buttons.

web/templates/admin/project, web/templates/admin/shared · high confidence

Admin user management interface

The admin dashboard now includes a dedicated section for managing users, featuring a paginated list view (index) with columns for name, email, confirmation status, and admin role, alongside links to view, edit, or delete individual users. A new user creation form (new) allows administrators to add users, while the edit form (edit) enables modification of existing user details, including password management. The user detail view (show) displays comprehensive user attributes such as name, email, unconfirmed email, admin status, confirmation timestamp, and password initialization status.

web/templates/admin/user · high confidence

Initial database schema for project coverage tracking and user management

This change introduces the foundational database schema for the application, creating tables for Projects, Builds, Jobs, Files, Badges, Users, and Settings. It establishes the data structures required to track code coverage metrics across builds and jobs, manage user accounts with authentication and confirmation tokens, and configure application-wide settings such as signup restrictions and project visibility defaults.

priv/repo/migrations · high confidence

Initial implementation of core application controllers and removal of legacy components

This change introduces the primary web controllers for the application, including authentication (login/logout), user management (registration, email confirmation, profile updates, password reset), project management (CRUD operations, badge generation), and data viewing (builds, jobs, files). It also removes the previous placeholder page controller and the unused Phoenix Socket channel file, establishing the foundational routing and request handling structure for the platform.

web/controllers · high confidence

Initial model definitions for core domain entities

This change introduces the foundational Ecto schema definitions for the application's core domain, including Project, User, Build, Job, File, Badge, and Settings. These models establish the data structure for tracking code coverage projects, managing user accounts with secure password handling, and recording build metadata such as commit information and coverage statistics. The introduction of these models enables the backend to persist and query the essential entities required for the coverage reporting feature.

web/models · high confidence

Initial styling for admin, project, build, and user pages

This change introduces the foundational CSS styles for several key application pages, including the admin interface, project listings, build details, file views, and user forms. Users will see structured layouts for the admin panel with specific styling for settings and restricted domains, a redesigned project page featuring coverage metrics and badge lists, and improved table layouts for builds and files. The user form page also receives basic styling adjustments.

web/static/css/pages · high confidence

Introduce dedicated build show page with coverage and job details

Users can now view a detailed summary of a specific build, including the project name, build number, and current coverage percentage. The page displays the latest commit message and a link to the repository, along with any coverage diff from the previous build. A table lists all jobs associated with the build, showing job numbers, individual coverage, coverage diffs, run times, and file counts. Additionally, a partial for rendering commit information has been added to support this view.

web/templates/build · high confidence

Introduce project management UI with coverage tracking and badge integration

The application now includes a full set of views for managing projects, allowing users to create, edit, and view project details. The project index lists all projects with their current coverage and links to the most recent build. The project show page displays the repository link, a token component, and a recent builds table that includes build numbers, branches, coverage, diff metrics, and commit details. Additionally, users can generate and view coverage badges directly from the project page via a dropdown selector.

web/templates/project · high confidence

Introduces authentication and authorization plugs for the admin interface

The application now includes a suite of new Plug components in lib/opencov/plug to manage user access and security. These include AnonymousOnly to restrict pages to unauthenticated users, Authentication to enforce login and admin role checks with flash messages, BasicAuth for optional HTTP basic authentication, FetchUser to populate the current user in connection assigns, and ForcePasswordInitialize to redirect users to set their password upon first login. These changes enable the backend logic for the new admin page and user session management.

lib/opencov/plug · high confidence

Introduction of authentication, admin dashboard, and API endpoints

The web layer now supports user authentication, role-based access control, and an administrative interface. Users can register, log in, manage their profile (including password changes), and view project badges anonymously. An admin dashboard allows administrators to manage users and projects, and edit system settings such as signup restrictions and project visibility. Additionally, a new v1 API endpoint for creating jobs has been added. Under the hood, models have been migrated from the deprecated Ecto.Model to Ecto.Schema, and the application structure now includes dedicated managers and services for better separation of concerns.

web · high confidence

Introduction of view helpers and demo-mode support for authentication

This change introduces a suite of new view modules (AuthView, BuildView, CommonView, FileView, JobView, ProfileView, ProjectView, UserView, etc.) and helper modules (ErrorHelpers, FormHelpers, PaginationHelpers) to the web interface. A key behavioral addition is in AuthView, which implements a \demo?()\ check to automatically populate form fields with default values when the application is running in demo mode, enhancing the experience for first-time users. Additionally, CommonView provides new utility functions for formatting coverage percentages, generating human-readable time strings, and determining repository-specific icons and commit links, while ErrorView now returns structured JSON responses for 404 errors.

web/views · high confidence

New API endpoint to create jobs

A new JobController has been added to the API v1 layer, enabling users to create new jobs via the API. The endpoint accepts job data either as a JSON body or as an uploaded JSON file, requiring a 'repo\_token' parameter to identify the project. Upon successful validation, the controller delegates to the ProjectManager to persist the job and returns the created job details.

web/controllers/api · high confidence

New UI components for badges, file coverage, and project tokens

This change introduces several new frontend components to enhance the user interface. Users can now view and copy coverage badges in SVG or PNG formats via a new badge selector component. File coverage displays have been improved to show syntax-highlighted source code with visual indicators for covered and missed lines. Additionally, a new project token component allows users to toggle the visibility of their tokens, and a reusable selectable component simplifies copying text fields.

web/static/js/components · high confidence

New admin dashboard and user management views

The admin interface now includes dedicated view modules for the dashboard, project listing, user management, and settings. New files (DashboardView, ProjectView, UserView, SharedView) provide the presentation layer for these sections, importing helpers for pagination, datetime formatting, and display logic. The previous generic PageView has been renamed and moved to Admin.SettingsView to handle admin-specific settings configuration.

web/views/admin · high confidence

New admin interface for managing users, projects, and settings

This change introduces a new admin module providing controllers to manage core platform resources. Administrators can now view and paginate lists of users and projects, view individual details, and create or edit user accounts with validation. The settings controller allows administrators to view and update global application settings. Additionally, user deletion is supported with a safeguard preventing self-deletion, and the user update flow supports redirection to the previously visited path.

web/controllers/admin · high confidence

New authentication, badge generation, and email infrastructure

The application now supports user login and logout via session management, secure password handling with bcrypt, and the generation of coverage badges in PNG, JPG, or SVG formats. Additionally, a mailer module has been introduced to handle email notifications, such as those sent upon user creation. Under the hood, the JSON parser has switched from Poison to Jason, and the maximum upload size has been increased to 100MB.

lib/opencov · high confidence

New file filtering and user account management services

This change introduces two new service modules to handle core application logic. The FileService enables filtering and paginating job-related files based on specific criteria and sort orders. The UserService centralizes user account operations, including creation with automatic email confirmation, password reset workflows (sending reset emails and finalizing password updates), and profile updates that trigger email verification when the email address changes.

web/services · high confidence

New login page with demo mode and password reset access

The authentication interface now includes a dedicated login form that displays error messages and supports a demo mode, which provides pre-filled credentials for testing. The page also adds navigation links to request a password reset and to create a new account, contingent on signup permissions.

web/templates/auth · high confidence

Removals

Removal of page index template

The page index template (index.html.eex) has been removed from the application. This change eliminates the specific view file that previously rendered the main page content, likely indicating a shift in how the homepage or landing page is served or structured within the web interface.

web/templates/page · high confidence

Behavioural changes

Centralize database operations in new manager modules

The application now uses dedicated manager modules (BadgeManager, BuildManager, FileManager, JobManager, ProjectManager, SettingsManager, and UserManager) to handle all database interactions, replacing the previous model-based approach. This change consolidates logic for creating, updating, and querying entities such as builds, jobs, files, badges, and user accounts within these managers, ensuring that models no longer directly access the repository.

web/managers · high confidence

The dummy coverage data file has been removed from the JavaScript assets, cleaning up unused test fixtures. Additionally, a fix for the logout link has been applied by disabling the Bootstrap dropdown click handler on form elements, ensuring that logout actions are not intercepted by dropdown logic.

web/static/js · high confidence

Introduce custom Bootstrap theme and modular CSS structure

The application now uses a custom Bootstrap theme defined in web/static/css/theme.less, which sets a specific green color palette (\#A9C696) for the navbar background and primary brand color, along with a light gray body background. The main stylesheet (main.styl) has been restructured to import these theme variables and organize styles into modular partials and pages directories.

web/static/css · high confidence

Migrate to runtime configuration and modernize config structure

The application configuration has been migrated from the legacy Mix.Config module to the modern import Config syntax, aligning with recent Elixir/Phoenix standards. Production secrets and database credentials are no longer stored in version-controlled files but are instead loaded dynamically from environment variables (such as DATABASE\_URL, SECRET\_KEY\_BASE, and SMTP credentials) via a new runtime.exs file, improving security and deployment flexibility. Additionally, the configuration now supports environment-specific overrides for development (e.g., Mailhog for email testing) and test environments (e.g., reduced bcrypt rounds for speed), while introducing new configurable options for demo mode, authentication realms, and badge formats.

config · high confidence

Redesign layout and implement authenticated navigation header

The application layout has been updated to replace the default Phoenix template with a custom 'OpenCov' design, including a new navbar header that displays the brand logo and user-specific navigation. For signed-in users, the header now provides links to their profile, logout, and an admin dashboard (visible only to admins). Additionally, the 'Change password' link is conditionally hidden when the application is running in demo mode. The main layout also switches to a fluid container structure and updates static asset references to use separate vendor, theme, and app CSS/JS bundles.

web/templates/layout · high confidence

Switch JavaScript linting to ESLint and update build tooling

The project replaces JSHint and JSCS with ESLint for JavaScript linting, introducing a new .eslintrc configuration while removing the legacy .jshintrc and .jscsrc files. Additionally, the webpack configuration is updated to use babel-loader instead of the deprecated babel loader syntax, adds support for LESS and Stylus stylesheets, and restructures asset entry points to include a theme file and a more comprehensive vendor bundle.

(repo-wide) · high confidence

Updated application supervision tree structure

The application's startup configuration has been refactored to use the modern Elixir supervision syntax. The legacy \Supervisor.Spec\ imports and comments have been removed, and the children list now explicitly defines the repository, Phoenix PubSub, and the endpoint using the standard \{Module, args}\ tuple format.

lib · high confidence

Test coverage

Added controller tests for Build, File, Job, and Project resources; Added model tests for Badge, Build, File, Job, Project, Settings, and User; Added test coverage for badge creation, password authentication, and JSON type handling; Added test coverage for manager modules; Added test coverage for view helper functions; Added tests for the Job API controller; Migrate test support to Ecto 2 sandbox and ExMachina factories; Updated test helper to use ExMachina and manual sandbox mode.

Dependencies

Major dependency upgrades across Elixir, Phoenix, and JavaScript stacks

This change updates the project's core dependencies across multiple manifests. In the Elixir backend (mix.exs/mix.lock), the application is upgraded to Elixir \~\> 1.20 and Phoenix \~\> 1.8.0, migrating from Ecto 1 to Ecto 3.13/3.14, Phoenix HTML 4.3, and Postgrex 0.22, while adding new libraries like \navigation\_history\, \exgravatar\, and \bcrypt\_elixir\. In the JavaScript frontend, the root \package.json\ upgrades Webpack to 3.10.0, Babel to 7.x (via babel-loader 7.1.0), and switches the template engine from Jade to Pug, adding support for Less and Stylus. Additionally, a new \landing/\ sub-project is introduced with \package.json\ and \package-lock.json\ pinning React 19.2.0, Vite 7.2.4, and TypeScript 5.9.3.

(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

Baseline

  • First survey — no prior run to compare against. CAI 50.

Lenses

  • Code Health 76
  • Architecture 74
  • Maturity 61
  • Readiness 53
  • Security 53
  • Accessibility 43

Changes since last survey

  • 248 commits — 190 feature/other, 58 fixes

By area

  • (root) — 80 commits
  • web/templates — 27 commits
  • web/static — 18 commits
  • (repo) — 17 commits
  • test/models — 16 commits
  • web/models — 16 commits
  • lib/opencov — 14 commits
  • web/controllers — 14 commits
  • priv/repo — 9 commits
  • test/controllers — 9 commits
  • config/config.exs — 5 commits
  • test/support — 4 commits
  • web/managers — 3 commits
  • web/router.ex — 2 commits
  • web/services — 2 commits
  • web/views — 2 commits
  • config/local.sample.exs — 1 commit
  • config/prod.exs — 1 commit
  • config/test.exs — 1 commit
  • landing/src — 1 commit

Notable commits

  • fix: Add eyecatch, fix settings
  • fix: Add more tests. Fix bug in ecto json type.
  • fix: Fix .travis.yml.
  • fix: Fix .travis.yml.
  • fix: Fix README
  • fix: Fix Temp usage.
  • fix: Fix a duplicated 'about' on build view
  • fix: Fix and refactor user update service.
  • fix: Fix badge markdown.
  • fix: Fix bug and update dependencies
  • fix: Fix bug in build.
  • fix: Fix bug in job controller.
  • fix: Fix bug in projects index page.
  • fix: Fix bug in user controller
  • fix: Fix bug when nil branch is in changeset.
  • fix: Fix bug with null branch.
  • fix: Fix build
  • fix: Fix build on Elixir 1.5
  • fix: Fix config.
  • fix: Fix coveralls endpoint
  • …and 228 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

danhper/opencov 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 18 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 a69d387daa8268f5c50f0f030f4c2cedfbc77c94 — 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-5d04157a340d.