Skip to content
CAI
Software that uses CAICheck a score

scalacenter/scastie

39.3

Weak · 6 November 2026

17.4k

lines of production code

Scala

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add hands-on Scala.js oscilloscope and raycasting demos

New interactive demo scripts have been added to the hands-on Scala.js section: an oscilloscope visualization that renders animated sine and absolute-value waveforms on an HTML5 canvas, and a raycasting engine that renders a 3D scene with spheres, planes, and lighting effects. These files provide concrete examples of using Scala.js to interact with the DOM and perform real-time graphics rendering in the browser.

demo/hands-on-scala-js · high confidence

Add local scalafmt wrapper and CI cache management scripts

The repository now includes a set of shell scripts in the \bin/\ directory to support code formatting and CI optimization. A local \scalafmt\ wrapper is added, which uses Coursier to download and bootstrap \scalafmt-cli\_2.12:1.5.1\ if not already present, enabling consistent formatting checks via a pre-commit hook. Additionally, \before\_cache.sh\ and \copy\_cache.sh\ are introduced to manage and optimize CI caching by cleaning up \.sbt\ lock files and \.ivy2/cache\ properties, while \hooks.sh\ automates the installation of the pre-commit hook.

bin · high confidence

Add runtime configuration and utility infrastructure

This change introduces a new default configuration file (reference.conf) that sets the server hostname and Akka port via environment variables, and defines timeouts for runner reload, compilation, and execution (defaulting to 30s each), alongside Akka process dispatcher settings. It also adds several utility components: a Base64UUID generator for creating URL-safe unique identifiers, file handling utilities for reading/writing content and managing process ID files, and Akka Stream GraphStage components to forward stream elements to a coordinator actor.

utils/src/main/resources · high confidence

Added Brazilian Portuguese and Japanese language support

The application now supports Brazilian Portuguese (pt-BR) and Japanese (ja) in addition to English. This change introduces the client-side internationalization infrastructure, including a new I18n module for parsing and managing translations, and registers the new language packs so users can switch their interface language to these options.

client/src/main/scala/org/scastie/client/i18n · high confidence

Added Fira Code and Font Awesome 4.7.0 font resources

The client now includes the necessary CSS and font files to support the Fira Code monospaced font and the Font Awesome 4.7.0 icon library. This change adds the \fira\_code.css\ stylesheet for the Fira Code typeface and the \font-awesome.css\ and \font-awesome.min.css\ files for Font Awesome, enabling the application to render these specific fonts and icons correctly.

client/src/main/resources/fonts · high confidence

Added Japanese and Brazilian Portuguese translations

The client now includes translation files for Japanese (ja.po) and Brazilian Portuguese (pt-BR.po), making the interface available in these languages alongside the existing English version. These files provide localized strings for the topbar, sidebar, editor, and login components, allowing users to switch their preferred language via the language selector.

client/src/main/resources/locales · high confidence

Added Scala CLI support for runner and migration tooling

The runner now supports execution via Scala CLI, introducing a new entry point in the runner module that handles class loading and exception printing with colored output options. Additionally, a new string escaping utility has been added to the runtime API to handle special characters and control codes consistently. A migration script has also been introduced to facilitate data transfer between storage versions, leveraging the new API structures and ensuring compatibility during the transition.

runner, runtime-api, scripts · high confidence

Editor gains intelligent code assistance and precise syntax highlighting

The code editor now provides real-time autocompletion, hover documentation, and signature help powered by the Metals language server, with debouncing to prevent spam and caching for performance. It also features accurate, tree-sitter-based syntax highlighting that replaces the previous mode-based approach, ensuring correct colorization of Scala code. Additionally, actionable diagnostics are displayed directly in the editor, and type decorations are rendered inline to show variable types as you type.

client/src/main/scala/org/scastie/client/components/editor · high confidence

Initial project scaffolding and configuration

The repository is initialized with essential configuration files including .gitmodules for the tree-sitter-scala submodule, .sbtopts for JVM and GC tuning, and .scalafmt/.scalafix.conf for code formatting and linting. A new Vite build configuration (vite.config.js) is introduced to replace the previous build system, alongside a Nix development environment (default.nix) and updated documentation (README.md, CONTRIBUTING.md).

(repo-wide) · high confidence

Initial server configuration and logging setup

The server now includes its foundational configuration files, introducing a Logback logging setup that outputs to the console and configures Akka logging levels. A new reference.conf defines default settings for the application, including file-based snippet storage, MongoDB connection details, OAuth2 credentials, and Akka cluster/remote settings using the Artery protocol. Additionally, an application.conf is provided to enable production mode.

server/src/main/resources · high confidence

Introduce Scala CLI runner service

Added a new standalone Scala CLI runner component that executes Scala code snippets via the Scala CLI tool. This service uses Akka actors to manage task execution, including compilation and runtime phases, and communicates with the main application via Akka remote actors. It supports configurable timeouts for compilation, reloading, and running, as well as environment-based configuration for hostname, port, and production mode. The runner also includes logging configuration via Logback and handles error reporting and progress updates back to the client.

scala-cli-runner/src/main · high confidence

Introduce filesystem and MongoDB storage backends for snippets and users

The storage module now provides concrete implementations for persisting user data and code snippets using both a local filesystem and MongoDB, replacing the previous in-memory-only approach. Users can now have their snippets and privacy policy settings persisted across restarts via the new FilesystemContainer and MongoDBContainer classes, which implement the SnippetsContainer and UsersContainer traits to handle creation, listing, updating, and deletion of snippets as well as user management.

storage · high confidence

Introduce structured API models for diagnostics, completions, and runner state

The API layer now uses a comprehensive set of new case classes to represent code analysis and runner status, replacing previous ad-hoc structures. This includes structured \Problem\ and \Severity\ types for diagnostics, \CompletionItemDTO\ and \SignatureHelpDTO\ for code completion and signature help, and \RunnerState\ for tracking the status of SBT and Scala-CLI runners. Additionally, \ConsoleOutput\ is now a sealed trait distinguishing between SBT, Scala-CLI, and user output, and \BaseInputs\ is formalized to support both SBT and Scala-CLI configurations with worksheet mode and library dependencies. Also in this area: 1 commit (1 fix) fixing client, repository.

repository · medium confidence · unverified

Introduction of core API interface and Scala version management

This change introduces the foundational API layer for the application, defining the \RestApi\ trait which specifies the contract for snippet operations (run, save, update, fork, delete, format, fetch) and user data retrieval. It also adds \RuntimeCodecs\ for serializing runtime errors and rendering states, and a comprehensive \ScalaVersions\ object that hardcodes a wide range of supported Scala versions (including Scala 2.10–2.13 and Scala 3.0–3.8.x) alongside build-time version info, enabling the API to correctly identify and suggest available compiler versions to users. Also in this area: 1 commit (1 fix) fixing api, client; 1 commit (0 fixes) modifying api, project; Introduce structured API models for diagnostics, completions, and runner state.

api · low confidence · unverified

New Metals-based interactive code features

This change introduces a new backend service (metals-runner) that integrates the Metals presentation compiler to provide interactive coding capabilities. For users, this enables real-time code completion, signature help tooltips, hover documentation, and actionable diagnostics (including code actions) within the editor. The implementation supports Scala 2.12, 2.13, and 3, and includes per-user caching of presentation compilers to improve performance and resource usage.

metals-runner/src/main/scala · high confidence

New demo snippets for Scala 3, graphics, and UI

The demo section now includes several new example snippets: \dotty.scala\ demonstrates Scala 3 union types; \reftree.scala\ and \scrimage.scala\ showcase image generation and manipulation libraries; \snellen.scala\ renders an eye chart using HTML/CSS; \color-full.scala\ adds colored console output; \cats.scala\ provides a basic Cats typeclass example; \dodge.scala\ tests Scala.js DOM interaction and error handling; and \bug.scala\ illustrates complex SVG rendering with the Doodle library.

demo · high confidence

New deployment infrastructure and operational tooling

This change introduces a complete set of deployment scripts and configuration files to manage the Scastie application across local, staging, and production environments. The new \deploy.sh\ script automates the Docker-based rollout for SBT, Metals, and Scala-CLI runners, handling image tagging, container replacement, and startup. Configuration is now environment-specific via \local.conf\, \staging.conf\, and \production.conf\, defining distinct hostnames, port ranges, and storage backends (file vs. MongoDB) for each stage. Operational support is enhanced with \log.sh\ for tailing container logs, \logback.xml\ for structured logging with Sentry integration, and \announce.scala\ for managing beta access waves. A \test.sh\ script is also provided for local verification of the runner setup.

deployment · high confidence

Support for Scala CLI runners and status tracking

The platform now supports running Scala snippets using Scala CLI in addition to the existing SBT support. This change introduces dedicated dispatcher components (ScalaCliDispatcher and SbtDispatcher) in the balancer service to manage and load-balance connections to remote Scala CLI and SBT runners, handling server connectivity, task distribution, and status updates. On the client side, the UI components have been updated to include reusability definitions for Scala CLI runner states, enabling the frontend to display the status of Scala CLI execution alongside SBT results.

balancer/src/main/scala · high confidence

Support for Scala CLI with quoted dependency parsing and nightly version resolution

The client now supports Scala CLI as a build target, allowing users to specify Scala versions and dependencies via code headers (e.g., \//\> using scala\, \//\> using dep\). This includes support for quoted dependency directives and automatic resolution of nightly Scala versions (2.12, 2.13, and 3) by fetching the latest build from the server API with a one-hour cache. Additionally, switching between SBT and Scala CLI targets now preserves existing library dependencies, converting them into the appropriate format for the new target.

client/src/main/scala/org/scastie/client/scalacli · high confidence

Removals

Removal of OpenShift-specific configuration file

The \conf/openshift.conf\ file has been deleted, removing the application's specific configuration for the OpenShift platform. This eliminates the hardcoded secret key and the commented-out database connection settings (MySQL and H2) that were previously defined for that environment.

conf · high confidence

Removal of legacy OpenShift action hooks and cron templates

The deployment automation scripts located in the \.openshift\ directory have been removed. This includes the \action\_hooks\ (build, deploy, load\_config, post\_deploy, pre\_build, start, stop) that previously managed the Play application lifecycle, as well as the \cron\ directory containing scheduled job templates and documentation. Users will no longer have these default shell scripts available to customize build, start, stop, or periodic background tasks on OpenShift.

.openshift · high confidence

Behavioural changes

3 commits (1 fix) modifying utils/src/main/scala

A change to existing behaviour in utils/src/main/scala — 3 commits (1 fix), 9 files: “Scala cli support (\#997)”; “fix: handle SBT shell failure by throwing exception in ProcessActor (\#1200)”; “feat: add scala-cli runners status (\#1221)” (refs \#997, \#1200, \#1221).

utils/src/main/scala · medium confidence · unverified

4 commits (1 fix) modifying instrumentation/src/main

A change to existing behaviour in instrumentation/src/main — 4 commits (1 fix), 2 files: “feat: skip reload when directives are unchanged (\#1258)”; “Scala cli support (\#997)”; “fix: rename instrumented val $t to \$t\ (\#1297)”; and 1 more (refs \#1258, \#997, \#1297, \#1156).

instrumentation/src/main · medium confidence · unverified

5 commits (1 fix) modifying client/src/main/scala/org/scastie/client/components

A change to existing behaviour in client/src/main/scala/org/scastie/client/components — 5 commits (1 fix), 12 files: “Scala cli support (\#997)”; “feat: support Scala 3 nightly versions in sbt (\#1292)”; “fix: UI bug where divider line overlapped section header (\#1174)”; and 2 more (refs \#997, \#1292, \#1174, \#1221, \#1170).

client/src/main/scala/org/scastie/client/components · medium confidence · unverified

Client application restructured with new core modules and API support

The client-side codebase has been reorganized into a new modular structure, introducing dedicated files for ANSI color formatting, HTML escaping, event streams (WebSocket and EventSource), global state management, local storage persistence, and REST API communication. This change adds support for fetching the latest version of a snippet via a new \/latest\ endpoint in the API client and establishes the foundational routing and entry-point logic for the main application and embedded modes.

client/src/main/scala/org/scastie/client · high confidence

Complete visual redesign with new dark/light themes and embedded mode support

The client interface has been completely restyled with a new visual identity, introducing dedicated dark and light themes (using Solarized color palettes) that apply consistently across the sidebar, topbar, editor, and build settings. A new changelog modal has been added to display update history, and the embedded snippet view now features a distinct overlay menu and styling to ensure it integrates cleanly into external websites. Additionally, ANSI terminal output in the console is now properly colorized, and the editor's CodeMirror integration has been updated with custom scrollbar and tooltip styling.

client/src/main/resources/sass · high confidence

Configurable Metals runner settings via environment variables

A new configuration file for the Metals runner has been added, defining default values for cache expiration (180 seconds), port (8000), and Docker mode (false). These settings can now be overridden at runtime using the environment variables CACHE\_EXPIRE\_IN\_SECONDS, PORT, and IS\_DOCKER, allowing users to customize the runner's behavior without modifying the source code.

metals-runner/src/main/resources · high confidence

Improved error reporting and isolated execution for Scala code

The SBT plugin now provides more precise compiler diagnostics by including exact line and column ranges for errors and warnings, allowing the UI to highlight specific error locations. Additionally, runtime errors and standard output are now captured and sent as structured JSON messages, enabling better display of exceptions and console logs. The plugin also implements an isolated execution environment that traps System.exit calls, preventing user code from terminating the entire JVM session.

sbt-scastie · high confidence

Initial balancer configuration for snippet storage and remote ports

A new reference configuration file is introduced for the balancer service, defining default settings for snippet storage (file-based) and remote execution environments. It specifies local paths for current and old snippets, sets the remote hostname to localhost, and allocates specific port ranges for remote SBT (starting at 5150) and Scala CLI (starting at 5250) instances, while also disabling a specific Akka serialization warning.

balancer/src/main/resources · high confidence

Major build infrastructure overhaul and runner deployment refactor

The project's build system has been significantly restructured to support modern deployment workflows and improved developer experience. SBT has been upgraded to version 1.13.0, and the build now utilizes \sbt-projectmatrix\ for cross-compilation. A new \Deployment\ module in the \project/\ directory introduces dedicated tasks for publishing and deploying Docker containers for SBT, Scala-CLI, and Metals runners, including support for shared Docker caches and local/staging/production environments. The build also adds a \Welcome\ plugin to display useful task hints and updates core Scala versions, including Scala 3.9.0 as the stable LTS and Scala 3.10.0-RC1 as the latest next release.

project · high confidence

Migrate client entry points to Vite and integrate Tree-sitter

The development environment now uses Vite as the build tool, replacing the previous setup with new entry points (main.js and embedded.js) that import Scala.js outputs via the 'scalajs:' protocol. This change integrates the Tree-sitter library for syntax highlighting and updates the HTML templates to use ES modules instead of legacy script tags. Additionally, the embedded demo page now includes a Scala 3 example and the main page's social media meta tags have been simplified.

client/src/main/resources/dev · high confidence

Migration to Vite build system and updated social sharing metadata

The application has migrated its build process to use Vite, replacing the previous script-based loading with a module-based entry point (main.js) that initializes the Scala.js application and integrates Sentry for error tracking. This change also updates the HTML metadata for social sharing (Open Graph and Twitter cards), adjusts the favicon, and adds Plausible analytics tracking.

client/src/main/resources/prod · high confidence

Refactored Scala runtime instrumentation and package structure

The Scala runtime library has been restructured under the new \org.scastie.runtime\ package, replacing the previous \com.olegych.scastie.api.runtime\ namespace. This change introduces a new \InstrumentationRecorder\ and \SharedRuntime\ to manage statement tracking and instrumentation serialization, while updating the Scala.js \Runtime\ to use the correct \writeStatements\ method and fixing deprecated \dom.raw\ usage by importing \org.scalajs.dom.HTMLElement\ directly. Additionally, the package now provides a \ScastieApp\ trait for easier application setup.

runtime-scala · high confidence

SbtRunner migration to Akka Remote Artery with configurable connection settings

The SbtRunner now uses Akka Remote Artery for communication, replacing the previous remoting mechanism. This change introduces a new application.conf with configurable hostname and port settings (overridable via environment variables like RUNNER\_HOSTNAME and RUNNER\_PORT), enables cluster provider mode, and increases the maximum frame size to 5 MiB to support larger payloads. The runner also supports a reconnect mode and includes updated logging configuration via logback.xml.

sbt-runner/src/main · high confidence

Server-side architecture refactored to Akka HTTP with new OAuth and API endpoints

The server implementation has been rewritten to use Akka HTTP, introducing a modular route structure that includes REST API endpoints for snippet management (run, save, update, fork, delete, format), a new /latest endpoint for fetching the most recent snippet version, and a dedicated route for nightly Scala version resolution. Authentication is now handled via a new GitHub OAuth2 flow that supports organization-based user switching, allowing users to toggle between accounts. The server also exposes real-time status and progress updates via Server-Sent Events (SSE) and WebSockets, with status details hidden from non-admin users. Additionally, a temporary route for the scala-lang frontpage and improved download functionality have been added.

server/src/main/scala · high confidence

Test coverage

Added integration and unit tests for the code execution balancer; Added test configuration for local actor provider; Added test suite for Scala CLI runner; Added tests for Metals dispatcher caching and server completions; Added tests for ProcessActor shell interaction; Added tests for SBT runner actor behavior and configuration; Added tests for position mapping and updated instrumentation test suite; Added tests for snippet ID route matching; New static HTML pages for testing embedded Scastie instances; Updated instrumentation test resources for Scala 3 and runtime migration.

Dependencies

Initial dependency configuration for Scastie build and client

This change introduces the foundational dependency manifests for the Scastie project. The Scala build configuration (build.sbt) defines the core library versions, including Akka 2.6.19, Akka HTTP 10.2.9, Metals 1.6.7, and ScalaTest 3.2.17, while also configuring Docker image generation for the SBT runner, Metals runner, and Scala CLI runner. On the client side, package.json establishes the frontend dependency tree, specifying Vite 5.0.10 as the build tool, CodeMirror 6.x for the editor, and Sentry 7.x for error tracking, with the corresponding versions locked in yarn.lock.

(dependencies) · high confidence

Updated SBT plugins and build configuration

The build configuration in project/project has been updated to use sbt-projectmatrix 0.11.0, sbt-scalajs 1.7.1, and sbt-buildinfo 0.11.0. Additionally, a soft link was created to share the SbtShared.scala file between the build and build-build directories.

project/project · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 40 → 39 (-0.4)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 56 → 56 (+0.0)
  • Architecture 89 → 89 (+0.0)
  • Maturity 48 → 50 (+2.3)
  • Readiness 61 → 46 (-14.6)
  • Security 42 → 47 (+4.7)
  • Accessibility 27 → 26 (-1.1)
  • Performance 100 → 100 (+0.0)

Resolved (14)

  • High CVE: [GHSA redacted] (yarn.lock)
  • High CVE: [GHSA redacted] (yarn.lock)
  • Medium CVE: [GHSA redacted] (yarn.lock)
  • Off-boarding risk: anonymized user #1
  • Orphaned file (client/src/main/scala/org/scastie/client/components/Scastie.scala)
  • Outdated: ch.epfl.scala:bsp4j
  • Outdated: ch.qos.logback:logback-classic
  • Outdated: com.typesafe:config
  • Outdated: io.get-coursier:interface
  • Outdated: io.sentry:sentry-logback
  • Outdated: net.lingala.zip4j:zip4j
  • Outdated: org.apache.commons:commons-text
  • Outdated: org.virtuslab:using_directives
  • ScaladexSearch.fetchSelected (cognitive 16) (client/src/main/scala/org/scastie/client/components/ScaladexSearch.scala)

New (5)

  • Dependency hygiene PARTLY measured — sbt declarations read, dependency currency not (Maven Central unreachable)
  • High CVE: [CVE redacted] (yarn.lock)
  • High CVE: [CVE redacted] (yarn.lock)
  • Off-boarding risk: anonymized user #1
  • Orphaned file (scala-cli-runner/src/main/scala/org/scastie/scalacli/ScalaCliActor.scala)

Changes since last survey

  • 6 commits — 3 feature/other, 3 fixes

By area

  • client/src — 3 commits
  • api/src — 2 commits
  • (repo) — 1 commit

Notable commits

  • fix: fix: page freezing when a run prints thousands of lines (#1302)
  • fix: fix: reduce Scaladex requests to avoid rate limiting (#1300)
  • fix: fix: sync sbt config when changing Scala version (#1303)
  • change: Merge pull request #1301 from tgodzik/update-scala-3.3.9
  • change: chore: Add Scala 3.3.9
  • change: chore: bump Scala to 3.10.0 and 3.10.1-RC2 (#1304)

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

scalacenter/scastie 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 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit d45dcaf054810a35241b7fdb603e41b1aa073561 — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-60d1b390edf0.