Skip to content
CAI
Software that uses CAICheck a score

fsprojects/fantomas-tools

49.7

Weak · 3 October 2026

5.4k

lines of production code

F#

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a web-based interface for the Fantomas F\# code formatter, providing online formatting, AST visualization, and Oak graph inspection capabilities. It exposes multiple backend versions (v6, v7, v8, and preview) via AWS Lambda functions, allowing users to format code and view structural diagnostics. The client application, built with Feliz and Vite, offers interactive views for parsing results and supports dark mode and responsive layouts.

How it got here

2020 — AWS migration and modernization

11 changes.

The project migrated its infrastructure from Azure Functions to AWS Lambda using Pulumi and updated the entire stack to .NET 10. Concurrently, the frontend tooling was modernized by switching to Vite and Bun, while new features such as AST visualization and structured error reporting were introduced.

2021–2022 — Client UI overhaul and AWS migration

7 changes.

The project rebuilt the client-side interface using Feliz and Monaco Editor, introducing advanced AST visualization features like interactive graph views and range-based highlighting. Simultaneously, the server infrastructure was migrated from Azure Functions to AWS Lambda, and the backend was updated to support Fantomas 8 with improved error reporting and dedicated Oak viewer APIs.

2023–2026 — Fantomas backend upgrades and dark mode

4 changes.

The server infrastructure was updated to support newer versions of the Fantomas code formatter, specifically introducing backends for versions 7 and 8 while removing the legacy version 5. These updates enhanced error reporting by providing structured diagnostic messages instead of raw stack traces. Concurrently, the client application received native dark mode support using CSS variables to improve visual consistency based on system preferences.

Features

Add Fantomas 8 backend

A new backend for Fantomas version 8 has been added, providing formatting and validation capabilities via HTTP endpoints (/fantomas/v8/format, /fantomas/v8/options, /fantomas/v8/version) and AWS Lambda functions. This implementation uses Fantomas.Core 8.0.6 and FSharp.Core 10.1.401, introducing improved error reporting that distinguishes between invalid source code and internal Fantomas bugs.

src/server/FantomasOnlineV8 · high confidence

Add Oak AST viewer with interactive graph view

The Oak tab now displays the parsed Abstract Syntax Tree (AST) of the source code. Users can view the tree in a hierarchical list or switch to an interactive graph view, which supports top-down, left-right, and free layouts, node limiting, and subtree scaling. The view allows clicking on nodes to highlight the corresponding code range, and the graph view preference is persisted in the URL.

src/client/fsharp/Oak · high confidence

Added debug utility page and robots.txt

A new debug.html page has been added to the public directory, providing a simple interface with a textarea and an encode button for local testing purposes. Additionally, a robots.txt file has been introduced to instruct search engine crawlers to disallow access to the site.

src/client/public · high confidence

Initial project scaffolding and build infrastructure

The repository is initialized with a new build system using Fun.Build and Fake, replacing previous tooling. This includes a new build.fsx script, a Fantomas-tools.slnx solution file, and Directory.Build.props which configures global properties and adds Ionide and G-Research analyzers. The frontend tooling has switched to Bun and Vite, supported by a new .gitpod.yml for cloud development environments. Additionally, an .editorconfig file is introduced to enforce consistent F\# code formatting rules across the project.

(repo-wide) · high confidence

Introduce AST Viewer server component

Adds a new server-side component for the AST Viewer, exposing endpoints to retrieve the untyped Abstract Syntax Tree and version information. The implementation includes JSON decoding for input requests, encoding of AST and diagnostic data, and logic to expand the AST into a readable string representation using reflection. It supports deployment as both a local web service (via Suave) and an AWS Lambda function, with a 100KB source code size limit and error handling for parsing failures and oversized inputs.

src/server/ASTViewer · high confidence

Introduce Oak Viewer server API for AST visualization

The Oak Viewer now includes a backend server component that exposes endpoints to retrieve the formatted Abstract Syntax Tree (AST) for F\# source code. This server, implemented in F\# using Suave for local development and AWS Lambda for cloud deployment, provides a \/oak-viewer/get-oak\ endpoint that accepts source code and returns the structured Oak tree along with any parsing diagnostics. It also exposes a \/oak-viewer/version\ endpoint to report the Fantomas version being used, enabling clients to visualize the code structure and errors directly.

src/server/OakViewer · high confidence

Introduce shared data models for Fantomas formatting and Oak parsing

New shared modules define the core data structures for the application's formatting and parsing capabilities. FantomasOnlineShared.fs introduces a unified FantomasOption type supporting integer, boolean, multiline formatter type, end-of-line, and multiline bracket style settings, along with helper functions to manage option ordering, key retrieval, and value extraction. It also defines FormatRequest and FormatResponse types to handle the input and output of formatting operations, including diagnostics. Additionally, OakShared.fs defines the ParseRequest structure for the OakViewer, specifying source code, defines, and FSI mode. These changes establish the foundational data contracts for the shared logic between the client and backend.

src/shared · high confidence

Introduces AST and Oak graph visualizer tabs with structured error reporting

The client now includes dedicated tabs for viewing the Abstract Syntax Tree (AST) and an Oak graph visualization of the code structure, allowing users to inspect the parsed representation of their F\# code. These new views are supported by shared model definitions for AST responses and graph node/edge data. Additionally, the tool now reports formatting failures with structured error details (including kind, message, and diagnostics) instead of dumping raw exception stack traces, providing clearer feedback when formatting fails.

FantomasTools.Client · high confidence

Behavioural changes

AST Viewer now supports range-based highlighting and expanded view mode

The AST Viewer component has been refactored to support interactive range highlighting and a new display mode. Users can now click on specific ranges within the AST text to highlight corresponding source locations, enabled via a debug flag or triggered by cursor changes. Additionally, a new 'Expanded' mode allows users to toggle between regular and expanded AST views, with the state persisted in the URL for easy sharing. The view also includes settings for defines and file extension (FSI vs FS) to customize the parsing context.

src/client/fsharp/ASTViewer · high confidence

Add Fantomas 8 backend, drop version 5

The server now includes a new Fantomas 8 backend (FantomasOnlineV8) alongside the existing Fantomas 6 backend (FantomasOnlineV6), while the previous version 5 backend has been removed. The new Fantomas 8 implementation leverages Fantomas.Core 8.0.0 and provides more detailed error reporting for parsing failures, distinguishing between invalid source code, define-parsing issues, and internal Fantomas bugs. Users can access the new formatting capabilities via the /fantomas/v8/format endpoint.

src/server/FantomasOnlineV6 · high confidence

Client entry point restructured for Fable and Vite integration

The client application's entry point (src/client/src/index.jsx) has been restructured to serve as the bootstrap for the new Fable/Vite build pipeline. It now explicitly imports the compiled F\# application logic (App.fs) and initializes the UI by loading specific CSS assets for global styles, the Notyf notification library, and the Vis-network visualization library.

src/client/src · high confidence

Fantomas Online Preview backend migrates to AWS Lambda

The Fantomas Online Preview server infrastructure has moved from Azure Functions to AWS Lambda. This change introduces new entry points in \Lambda.fs\ to handle API Gateway requests and updates \Program.fs\ to expose the formatting, version, and options endpoints via Suave. The backend now relies on AWS-specific libraries such as \Amazon.Lambda.APIGatewayEvents\ and \Amazon.Lambda.Serialization.SystemTextJson\, as reflected in the new \packages.lock.json\ and \.gitignore\ files.

src/server/FantomasOnlinePreview · high confidence

FantomasOnline client restructured with dedicated backend mode support and new UI components

The FantomasOnline client application has been reorganized into distinct modules (Decoders, Encoders, State, View) to support multiple Fantomas backend versions (V6, V7, V8, Main, Preview) via environment variables. This change introduces a new state management layer that fetches version-specific options and handles formatting requests, while the view layer now provides a settings filter, multi-button controls for options like MultilineBracketStyle, and a GitHub issue generation feature. The client also integrates Notyf for user notifications and supports copying settings to an .editorconfig format.

src/client/fsharp/FantomasOnline · high confidence

Introduce Fantomas v7 backend with improved error reporting

The server now includes a new v7 backend for the Fantomas code formatter, replacing older versions. This update upgrades the underlying Fantomas.Core library to version 7.0.6 and FSharp.Core to 10.1.401. A key behavioral change is that formatting failures are now reported as structured diagnostic messages to the user instead of dumping raw exception stack traces, providing clearer feedback on parse errors or formatting issues.

src/server/FantomasOnlineV7 · high confidence

Introduce shared HTTP handling and JSON serialization for the AWS Lambda backend

This change adds the core server-side logic for the new AWS Lambda deployment, including HTTP request/response mapping, JSON encoding/decoding for format options, and a two-pass formatting pipeline that validates output stability. It replaces the previous Azure Functions integration with AWS-specific handlers and introduces structured error reporting for invalid source code versus internal formatting failures.

src/server/FantomasOnline.Shared · high confidence

Migrate Fantomas infrastructure to AWS Lambda with Pulumi

The infrastructure deployment has moved from Azure Functions to AWS Lambda, managed via Pulumi. This change introduces new AWS Lambda functions for the Fantomas Online service, specifically supporting formatting versions v6, v7, and v8, as well as main and preview branches. The deployment configuration now targets the eu-west-1 region and includes a .NET 10.0 runtime environment with dependencies such as Pulumi.Aws, OpenTelemetry, and Humanizer.

infrastructure · high confidence

Migrate client build tooling to Vite and Bun

The client application has switched its build and development infrastructure from Snowpack to Vite, utilizing the \vite-plugin-fable\ for F\# compilation. This change is accompanied by a shift to the Bun runtime (evidenced by the new \bun.lock\ file) and the introduction of \oxfmt\ for code formatting. The configuration now targets React 19 and includes dedicated Vite and Vitest setups to ensure tests exercise the same F\#-compiled code as the production build.

src/client · high confidence

Migrate server runtime from Azure Functions to AWS Lambda

The server deployment target has shifted from Azure Functions to AWS Lambda. This change introduces new infrastructure code in src/server, including AWS-specific request/response handling in AWSLambdaExtensions.fs, shared HTTP constants in HttpConstants.fs, and Suave-based web server utilities in SuaveExtensions.fs that manage local development startup and CORS headers. Users deploying this server will now use the AWS Lambda runtime instead of Azure.

src/server · high confidence

Native dark mode support via CSS variables

The client styles now include native dark mode support using CSS custom properties and the \light-dark()\ function. This allows the application to automatically adapt its color scheme (backgrounds, text, borders, and interactive states) based on the user's system preference, improving readability and visual consistency in low-light environments without requiring JavaScript intervention.

src/client/src/styles · high confidence

New Fantomas 8 backend with improved error reporting

The server now uses a new \FantomasOnlineMain\ backend targeting .NET 10 and Fantomas 8, replacing the previous version 5 implementation. This update introduces significantly better error handling: instead of displaying raw stack traces for formatting failures, the tool now distinguishes between invalid source code (showing specific parse errors) and internal Fantomas bugs, providing clearer feedback to users. The backend exposes version, options, and formatting endpoints via both a Suave web server and AWS Lambda functions.

src/server/FantomasOnlineMain · high confidence

Rebuilt client UI with Feliz and Monaco Editor

The client-side interface has been rewritten using the Feliz React framework and the Monaco Editor library. This change introduces a new split-pane layout for comparing input and formatted code, adds a dedicated SkillBanner component to promote the \fantomas-report\ coding agent skill, and implements a custom hash-based routing system to manage navigation between the Home, AST, Oak, and Fantomas tabs.

src/client/fsharp · high confidence

Dependencies

Migrate build targets to .NET 10 and update core dependencies

The project files for the client tooling, server lambdas (FantomasOnlineMain, FantomasOnlinePreview, FantomasOnlineV6, FantomasOnlineV7, FantomasOnlineV8, ASTViewer, OakViewer), and infrastructure have been updated to target .NET 10.0. This change is accompanied by significant dependency updates, including FSharp.Core to version 10.1.x, Pulumi.Aws to 7.48.0, Pulumi.FSharp to 3.114.1, and OpenTelemetry to 1.19.1 (upgraded to address security advisories). The client-side dependencies also reflect major version jumps, such as React to 19.3.0, Vite to 8.3.0, and Fable-related packages to their latest 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 48 → 50 (+1.3)
  • Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.

Lenses

  • Code Health 97 → 97 (+0.0)
  • Architecture 99 → 97 (-2.3)
  • Maturity 48 → 52 (+4.9)
  • Readiness 70 → 70 (+0.0)
  • Security 82 → 83 (+0.5)
  • Accessibility 30 → 30 (+0.1)

Resolved (3)

  • Documentation: no architecture or design documentation (README.md)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)

Changes since last survey

  • 7 commits — 7 feature/other, 0 fixes

By area

  • src/server — 5 commits
  • src/client — 2 commits

Notable commits

  • change: Add banner promoting the fantomas-report skill (#676)
  • change: Bump Fantomas.Core from 8.0.0 to 8.0.1 (#672)
  • change: Bump Fantomas.Core from 8.0.1 to 8.0.2 (#673)
  • change: Bump Fantomas.Core from 8.0.2 to 8.0.4 (#675)
  • change: Bump Fantomas.Core from 8.0.4 to 8.0.5 (#677)
  • change: Bump Fantomas.Core from 8.0.5 to 8.0.6 (#679)
  • change: Bump the nuget group with 6 updates (#678)

Architecture

  • Containers 0 added · 0 removed · contexts 0 added · 1 removed · edges 0 added · 0 removed

Removed bounded contexts (1)

  • infrastructure

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

Survey your own repository

fsprojects/fantomas-tools 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 6eab0bdcb73300e785ace40480570cbd29a87e5d — 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.