Skip to content
CAI
Software that uses CAICheck a score

fossasia/pslab-app

64.9

Adequate · 19 September 2026

56.1k

lines of production code

Dart

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is a cross-platform Flutter application for the Pocket Science Lab (PSLab) hardware, providing a suite of scientific instruments including oscilloscopes, multimeters, and logic analyzers. It manages device communication via a unified Rust backend that supports USB, Wi-Fi, and web serial protocols, enabling features like real-time sensor data visualization, I2C peripheral control, and in-app firmware flashing. The application runs on Android, iOS, Linux, macOS, and web, offering guided experiments, audio capture, and localized settings management.

How it got here

2017–2024 — Flutter migration and cross-platform expansion

17 changes.

The project migrated from a legacy native Android build to a Flutter-based architecture, integrating a Rust backend for hardware communication. This period established native support for iOS, macOS, Linux, and web platforms while cleaning up obsolete scaffolding and adding essential features like home screen widgets and sensor controls.

2025 — Hardware support expansion and UI modernization

12 changes.

This period focused on significantly expanding hardware capabilities by adding SCPI protocol support for new PSLab devices, integrating a wide array of I2C sensors, and implementing a structured provider architecture for state management. Concurrently, the application underwent substantial UI and infrastructure updates, including a migration to Material 3, the introduction of configurable instrument settings, and the addition of new scientific experiments and audio capture features.

2026 — Rust migration and build tooling

4 changes.

The project migrated its core device communication and firmware update logic to Rust, replacing the previous implementation to enable native desktop audio capture and unified USB/serial management. This effort included integrating the Cargokit build tool for seamless Rust compilation within Flutter and updating the flutter\_rust\_bridge bindings. Integration tests were added to verify the correct initialization and interaction between the Flutter frontend and the new Rust backend.

Features

Add Cargokit build tooling for Rust integration

The \rust\_builder\ directory now includes the Cargokit build tool (copied from the official \flutter\_rust\_bridge\ integration), providing the glue code required to seamlessly build Rust crates within Flutter plugins and packages. This addition introduces the \build\_tool\ Dart application and its supporting source files (including environment handling for Android/iOS, artifact providers, and build scripts for Gradle, CMake, and CocoaPods), enabling the project to compile and link Rust code as part of the standard Flutter build process.

_rust\_builder, rust\_builder/cargokit/build\tool · high confidence

Add web app manifest and launcher icons for PSLab

The web entry point now includes a manifest.json file and references to launcher icons (Icon-192.png, Icon-512.png, and maskable variants), enabling the PSLab application to be installed as a standalone progressive web app with proper branding and display settings.

web · high confidence

Added Android home screen widget for saved logs

Users can now view a list of their saved logs directly on the Android home screen via a new widget. The widget displays the file name and instrument type for each log entry and allows users to tap an item to open the main application. This feature is implemented using Android Glance and is available only on Android devices.

app · high confidence

Added I2C peripheral communication and DAC channel support

The application now includes a new I2C API in the peripherals library, enabling users to initialize the bus, configure frequency, perform start/stop/restart sequences, and read/write data (byte, integer, long, bulk) to I2C devices, including a bus scan feature. Additionally, a DACChannel class has been introduced to manage digital-to-analog converter channels, handling calibration parameters, voltage-to-code polynomial conversions, and channel configuration.

lib/communication/peripherals · high confidence

Added SCPI protocol support for PSLab Mini and Pico devices

The communication layer now supports the SCPI (Standard Commands for Programmable Instruments) protocol alongside the existing binary protocol. New files define a comprehensive dictionary of SCPI commands for oscilloscope (DSO), mixed-signal oscilloscope (MSO), logic analyzer (LA), and bus interfaces (I2C, UART). The PacketHandler and ScienceLab classes detect PSLab Mini and Pico devices by their ID string and switch to SCPI mode, enabling users to interact with these newer hardware variants using standard instrument commands.

lib/communication · high confidence

Added build and download page generation scripts

New shell scripts have been added to the repository to support the build pipeline and user distribution. The \generate-app-download-page.sh\ script creates an HTML index page linking to development builds (APK, AAB, IPA, etc.) hosted on the \app\ branch, allowing users to easily access and download these artifacts. Additionally, \prep-android-key.sh\ and \prep-ios-key.sh\ were introduced to decrypt and extract platform-specific signing secrets during the CI process, enabling signed builds for Android and iOS. A \.gitignore\ file was also added to prevent sensitive key files and generated archives from being committed.

scripts · high confidence

Added macOS Flutter build configuration files

The macOS Flutter project now includes \Flutter-Debug.xcconfig\ and \Flutter-Release.xcconfig\ files. These configurations establish the build settings for debug and release modes by including the generated ephemeral Flutter configuration and conditionally including CocoaPods support files, enabling the macOS target to build correctly within the Flutter framework.

macos/Flutter · high confidence

Added macOS project configuration for the pslab app

The macOS build configuration for the pslab application has been initialized, enabling the app to be built and run on macOS. This change introduces the Xcode project structure (project.pbxproj), including the main Runner target, a RunnerTests target for unit testing, and the necessary build schemes for debugging, profiling, and archiving. It also sets up the workspace checks and links the Flutter engine integration files, allowing developers to launch and test the pslab app directly from Xcode.

macos/Runner.xcodeproj · high confidence

Initial Android app structure and native integration setup

The Android application has been initialized with a complete native layer, including a main activity written in Kotlin that manages USB device communication, ambient temperature sensor monitoring, and permission handling via Flutter channels. The app declares necessary permissions for location, audio, and storage, and registers a home widget receiver to display saved logs on the device home screen. Additionally, the project now supports adaptive launcher icons with monochrome themes and includes a comprehensive USB device filter to connect with various hardware interfaces such as FTDI, CP210x, and CH34x.

android/app · high confidence

Initial Flutter project scaffolding and configuration

The repository is initialized as a Flutter application, introducing the standard project structure and configuration files required for development. This includes the \.metadata\ file for Flutter tooling, \analysis\_options.yaml\ for Dart linting, \l10n.yaml\ for localization setup, and \flutter\_rust\_bridge.yaml\ to configure the Rust bridge integration. The commit also adds the Apache 2.0 \LICENSE\, a comprehensive \README.md\ with download links and feature documentation, and \appdmg.json\ for macOS distribution. Additionally, it removes the legacy Gradle wrapper scripts (\gradlew\, \gradlew.bat\) in favor of Flutter's native build system and updates \.gitignore\ to exclude Flutter-specific build artifacts and generated files.

(repo-wide) · high confidence

Initial Linux desktop support for PSLab

The PSLab application is now available on Linux, allowing users to run the Pocket Science Lab suite natively on their desktops. This release introduces the core Flutter Linux integration, including the GTK-based application entry point, CMake build configuration, and desktop environment metadata (such as the .desktop file and Flathub metainfo). It also includes a udev rule to ensure PSLab hardware devices are accessible without root privileges.

linux, windows · high confidence

Initial localization files for PSLab instruments and settings

The app now includes initial localization resource files (ARB format) for multiple languages, including English, Hindi, Italian, German, and Hebrew, with empty placeholders for others. These files provide the text strings for instrument names (such as Oscilloscope, Multimeter, and Wave Generator), their descriptions, connection steps, and settings menus, enabling the app to display these UI elements in the user's selected language.

lib/l10n · high confidence

Initial macOS app configuration and permission handling

This change introduces the foundational macOS runner files for the Flutter application. It establishes the app delegate and main window logic, including a native permission channel that allows the app to check and request access to the microphone and location services. The configuration also defines the necessary entitlements for sandboxing, USB/serial device access, network connectivity, and file access, along with Info.plist entries explaining the usage of location and microphone data to the user.

macos/Runner · high confidence

Initial macOS platform support added

This change introduces the foundational macOS project structure for the application, including the Xcode workspace configuration, the main menu interface (MainMenu.xib) with standard application menu items, and build configuration files (xcconfig) that define the app name (pslab), bundle identifier (io.pslab.pslab), and compiler warning settings for Debug and Release builds.

macos/Runner.xcworkspace, macos/Runner/Base.lproj, macos/Runner/Configs · high confidence

Initialize Flutter application with instrument screens and Rust backend

The application is initialized with a complete set of instrument screens (Oscilloscope, Multimeter, Logic Analyzer, etc.) and a navigation structure, backed by a new Rust-based communication layer for analog and digital channels. Users can now access a full suite of measurement tools, including the new LUX meter, SHT21 sensor support, and MQ-135 gas sensor, alongside existing features like the Wave Generator and Robotic Arm control. The app also includes a CLI version flag (-v/--version) for desktop platforms and supports in-app firmware updates and Hindi language localization.

lib · high confidence

Introduces configurable settings and structured data models for instruments

This change adds a comprehensive set of configuration models (e.g., AccelerometerConfig, OscilloscopeConfig, SettingsConfig) and dedicated configuration screens (e.g., AccelerometerConfigScreen) to the application. Users can now adjust instrument-specific parameters such as update periods, sensor gain, and data limits, with settings persisted via JSON serialization. The update also introduces a centralized SettingsConfig model that allows users to choose data export formats (CSV, TXT, JSON) and manage app-wide preferences like auto-start and language.

lib/view · high confidence

Migrate device communication and firmware updates to Rust

The application's core communication layer with PSLab devices has been rewritten in Rust, replacing the previous implementation. This change introduces native support for desktop audio capture via the cpal library, enabling microphone input on Windows, Linux, and macOS. It also adds an in-app firmware update capability, allowing users to flash new firmware via serial port or WebSocket connections with real-time progress tracking. Additionally, the Rust backend now handles USB device detection and serial port management across desktop and Android platforms, providing a unified interface for device connectivity.

rust · high confidence

New instrument and waveform control widgets

Added UI components for the Accelerometer, Barometer, and Wave Generator instruments. The AccelerometerCard displays real-time axis data with min/max tracking and chart visualization. The BarometerCard presents pressure and altitude readings via a gauge and statistics. The Wave Generator now includes AnalogWaveformControls and DigitalWaveformControls for selecting wave types and adjusting parameters, alongside ChannelParametersWidget and DataAnalysisWidget for Oscilloscope channel and FFT configuration.

lib/view/widgets · high confidence

New provider architecture for sensor instruments and device connection

The app introduces a structured provider layer in \lib/providers\ to manage state and configuration for hardware instruments. This includes dedicated providers for the Accelerometer, Barometer, Compass, and various external sensors (ADS1115, APDS9960, BMP180, CCS811, Gas Sensor), enabling features like configurable update periods, high/low limits, sensor selection, and data recording/playback. Additionally, a new \BoardStateProvider\ handles device initialization, USB hotplug detection on desktop, and WiFi communication setup, while an \ExperimentProvider\ supports guided scientific experiments.

lib/providers · high confidence

New scientific experiments, audio capture, and in-app firmware flashing

This update introduces several new capabilities and infrastructure components. Users can now run guided scientific experiments for light intensity vs. distance and pressure vs. altitude, which include automated step validation. Audio capture is now supported on desktop platforms via a Rust backend, with data stored and exportable in CSV, TXT, or JSON formats. The app also adds in-app firmware flashing for both native and web environments, an OLED display driver for I2C screens, and a new version resolution service to correctly display build numbers on Linux.

lib/others · high confidence

Support for multiple new hardware sensors added

The application now supports a wide range of new I2C sensors, including the ADS1115 ADC, APDS9960 (gesture/proximity/color), BH1750 and TSL2561 (light), BMP180 (pressure/temperature), CCS811 (air quality), HMC5883L (magnetometer), MAX30102 (heart rate), MLX90614 (infrared temperature), MPU6050 and MPU925X (accelerometer/gyroscope), and SHT21 (humidity/temperature). This expands the device's capability to interface with various scientific and environmental instruments.

lib/communication/sensors · high confidence

iOS app initialized with native permission handling and UIScene support

The iOS project has been initialized for the Flutter application, establishing the native iOS infrastructure required for the app to run. This includes the full Xcode project structure, workspace configuration, and asset definitions. A key behavioral addition is the implementation of native permission handling in the AppDelegate, which manages microphone and location access requests and status checks via a method channel, ensuring compliance with iOS privacy requirements. Additionally, the app now supports the modern UIScene lifecycle through a dedicated scene delegate, and the Info.plist has been configured with necessary usage descriptions for microphone, location, and motion sensors.

ios · high confidence

Removals

Removed obsolete legacy app scaffolding and boilerplate code

This change removes a large set of empty or placeholder files that were part of the initial app structure but are no longer used. Specifically, it deletes the main \AndroidManifest.xml\, the \MainActivity\ and \SplashActivity\ classes, several empty fragments (\HomeFragment\, \SettingsFragment\, etc.), and associated UI resources (layouts, drawables, strings). It also removes the legacy USB \CommunicationHandler\ and \CommandsProto\ classes, as well as basic unit and instrumentation tests. This cleanup eliminates dead code and prepares the codebase for a new architecture or framework migration.

app/src · high confidence

Behavioural changes

1 commit (0 fixes) modifying macos/assets

A change to existing behaviour in macos/assets — 1 commit, 1 file.

macos/assets · low confidence · unverified

Theme system refactored to use Material 3 and centralized color definitions

The application's visual presentation has been updated to use Material 3, with the theme configuration now explicitly set to \useMaterial3: true\. To support this and improve maintainability, hardcoded color values have been extracted from the theme file into a dedicated \colors.dart\ file, which defines specific colors for UI components like checkboxes, radios, and various instrument-specific elements (e.g., oscilloscope, multimeter, logic analyzer). The app now defaults to a light theme with a white scaffold background, and the previous dark mode support has been removed.

lib/theme · high confidence

Unified communication handler with platform-specific implementations

The communication layer has been refactored to use a single \CommunicationHandler\ interface with distinct implementations for each platform: \PSLabCommunicationHandler\ for native desktop and Android (using Rust bindings for USB access), \WebCommsHandler\ for the web version (using the Web Serial API), and \WifiCommsHandler\ for Wi-Fi connections (using WebSockets). A router (\platform\_handler.dart\) automatically selects the correct handler based on the runtime environment, ensuring consistent behavior across iOS (stubbed), Android, desktop, and web targets.

lib/communication/handler · high confidence

Test coverage

Added E2E screenshot integration tests; Added initial macOS test suite scaffold; Added integration tests for Rust library initialization; Added tests for app version resolution, sensor controls, and oscilloscope metadata.

Dependencies

Android Gradle wrapper upgraded to version 9.7.1

The Android build system now uses Gradle 9.7.1 instead of the previous version 3.3. This significant upgrade to the build toolchain includes a new network timeout configuration (10000ms) to handle distribution downloads, which may affect build stability or speed depending on network conditions.

android/gradle · high confidence

Migrated Android build to Flutter and added Rust native library support

The Android build system has been completely replaced, removing the legacy native Gradle configuration (including \app/build.gradle\, \build.gradle\, and \gradle.properties\) and introducing a new Flutter-based setup with \android/app/build.gradle\, \android/build.gradle\, and \android/settings.gradle\. This new configuration targets Android SDK 34, uses Java 17, and integrates the \flutter-gradle-plugin\ alongside Kotlin and Compose. Additionally, a new Rust native library (\rust\_lib\_pslab\) has been added to the project, managed via Cargokit, with its dependencies defined in \rust/Cargo.toml\ and lockfile \rust/Cargo.lock\. The Flutter application dependencies are now explicitly listed in \pubspec.yaml\ and locked in \pubspec.lock\, while iOS and macOS CocoaPods configurations (\Podfile\, \Podfile.lock\) have been initialized for the Flutter runner.

(dependencies) · high confidence

Updated Rust bindings to flutter\_rust\_bridge 2.13.0

The generated Rust interop layer in lib/src/rust has been regenerated using flutter\_rust\_bridge version 2.13.0. This update refreshes the Dart-side bindings for the Rust library, ensuring compatibility with the latest code generation standards for audio, bootloader, and simple device communication APIs.

lib/src · 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 65.

Lenses

  • Code Health 76
  • Architecture 98
  • Maturity 65
  • Readiness 61
  • Security 60
  • Domain Modelling 100

Changes since last survey

  • 300 commits — 234 feature/other, 66 fixes

By area

  • (root) — 89 commits
  • lib/view — 72 commits
  • .github/actions — 25 commits
  • .github/workflows — 22 commits
  • lib/l10n — 22 commits
  • lib/providers — 14 commits
  • android/settings.gradle — 10 commits
  • lib/communication — 8 commits
  • macos/Runner — 6 commits
  • android/gradle — 5 commits
  • lib/src — 4 commits
  • android/app — 2 commits
  • assets/images — 2 commits
  • docs/Oscilloscope.md — 2 commits
  • ios/Runner — 2 commits
  • lib/others — 2 commits
  • rust/src — 2 commits
  • .github/copilot-instructions.md — 1 commit
  • .github/dependabot.yml — 1 commit
  • android/build.gradle — 1 commit

Notable commits

  • fix: Fix Oscilloscope image source in documentation
  • fix: Fix one trailing space after return statement in 106
  • fix: Fix return in line 106 statement formatting
  • fix: Fixes #3347 Unify README downloads with docs.pslab.io
  • fix: Revert "docs: add download page for app branch binaries (#3435)"
  • fix: chore: fix iOS screenshot creation (#3389)
  • fix: fix flusbserial
  • fix: fix thermometer logs playback
  • fix: fix(audio): stabilize built-in microphone streaming on desktop (#3119)
  • fix: fix(ci): pin Xcode 26.3.0 for macOS build job
  • fix: fix(compass): add instrument guide with image and localization support (#3098)
  • fix: fix(ui): improve About Us layout and update description styling
  • fix: fix(ui): improve accelerometer screen responsiveness
  • fix: fix(ui): improve gyroscope screen responsiveness (#3355)
  • fix: fix(web): generate web launcher icons and update branding
  • fix: fix: Add semantic labels to Oscilloscope tab buttons for screen readers (#3525)
  • fix: fix: Add semantic labels to instrument selector cards
  • fix: fix: Add text overflow handling to gyroscope and accelerometer cards (#3544)
  • fix: fix: Apply buffer overlay to stacked oscilloscope charts
  • fix: fix: Correct MQ-135 gas sensor data mapping and documentation (#3381)
  • …and 280 more

Architecture

  • 0 containers · 1 bounded contexts · 0 dependency edges (baseline)

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

Survey your own repository

fossasia/pslab-app 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 19 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 4357150b48ca0be4b6478736696dbbab9e53110f — 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-13a154b7f5d1.