Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON Log Inspector

A Flutter app for opening, filtering, and inspecting JSON Lines log files. The main workflow is built around structured HTTP-style records, with request/response detail views, key-path filters, full-text search, reusable filter presets, and lazy file reading for larger logs.

Features

  • Open .jsonl, .json, and .log files from the app
  • Build a byte-offset line index so records can be read on demand
  • Filter by discovered JSON key paths with equality, comparison, existence, contains, and regex operators
  • Search across raw JSON content
  • Save and apply filter presets, including default presets for errors, slow requests, and SSE streams
  • Pair related request and response entries through request_id
  • Inspect request/response headers and bodies with JSON tree and content-aware body views
  • Use a responsive log viewer layout with a wide-screen master/detail view and compact modal detail flow
  • Configure app appearance and controller settings from the settings area

Requirements

  • Flutter SDK >=3.8.0
  • Dart SDK >=3.8.0 <4.0.0
  • Git LFS for image assets tracked by .gitattributes
  • Melos and Mason CLIs for workspace and brick workflows

The repository also includes devenv/direnv files. If you use that toolchain, entering the directory can load the project environment automatically.

Setup

git clone https://github.com/gsmlg-app/json-log-inspector.git
cd json-log-inspector

git lfs install
git lfs pull

dart pub global activate melos
dart pub global activate mason_cli

melos bootstrap
mason get

For a full generated-code and localization refresh after bootstrap:

melos run prepare

Running

Use a device ID from flutter devices, or run one of the common desktop targets on a matching host:

flutter run -d macos
flutter run -d linux
flutter run -d windows

Mobile platform folders are also present and can be run from a configured Android or iOS development environment:

flutter run -d android
flutter run -d ios

The app starts at the splash screen and routes to the log viewer at /log-viewer.

Development

This is a Dart workspace managed with Melos. Workspace package membership and Melos scripts are defined in the root pubspec.yaml.

melos run analyze                 # Analyze Dart and Flutter packages with fatal warnings
melos run format                  # Format all packages
melos run format-check            # Verify formatting without changing files
melos run test                    # Run Dart and Flutter package tests
melos run test:dart               # Run non-Flutter package tests
melos run test:flutter            # Run Flutter package tests
melos run build-runner            # Run build_runner across packages
melos run gen-l10n                # Generate localization files where l10n.yaml exists
melos run validate-dependencies   # Check dependency usage

Useful direct test examples:

flutter test test/screens/log_viewer/log_viewer_screen_test.dart
cd app_lib/log_parser && dart test
cd app_widget/log_viewer && flutter test

Architecture

The log inspection pipeline is split across small workspace packages:

log_models -> log_parser -> log_viewer_bloc -> log_viewer_widgets -> app screen
Package Location Purpose
log_models app_lib/log_models/ Core log record, request/response, filter rule, and preset models
log_parser app_lib/log_parser/ File indexing, line reading, LRU caching, key-path discovery, and filter evaluation
log_viewer_bloc app_bloc/log_viewer/ File lifecycle, filter state, preset persistence, and selection state
log_viewer_widgets app_widget/log_viewer/ Log list, detail panel, filter bar, rule builder, body viewer, and JSON tree widgets

Main app entry points:

  • lib/main.dart initializes providers, logging, database, and shared preferences.
  • lib/app.dart builds the themed MaterialApp.router.
  • lib/router.dart defines the GoRouter routes.
  • lib/screens/log_viewer/log_viewer_screen.dart wires the log viewer BLoCs and widgets into the primary screen.

Repository Layout

  • lib/ - Main app, routing, destinations, and screens
  • app_lib/ - Core libraries such as log parsing, models, database, gamepad, locale, logging, provider, and secure storage
  • app_bloc/ - Feature BLoC packages for log viewer, gamepad, and navigation
  • app_widget/ - Reusable widget packages for log viewer, artwork, charts, and web views
  • app_form/ - Form demo package
  • app_plugin/ - Federated native plugin packages
  • bricks/ - Mason bricks for project code generation
  • docs/ - Additional project, testing, form, logging, and brick documentation
  • third_party/ - Vendored or modified third-party packages

Mason Bricks

Available bricks are registered in mason.yaml. Use mason get after checkout, then generate with mason make <brick>.

mason make screen -c config.json
mason make widget -c config.json
mason make simple_bloc -c config.json

See docs/BRICKS.md for brick-specific variables and examples.

Documentation

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages