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.
- Open
.jsonl,.json, and.logfiles 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
- 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.
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 getFor a full generated-code and localization refresh after bootstrap:
melos run prepareUse 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 windowsMobile platform folders are also present and can be run from a configured Android or iOS development environment:
flutter run -d android
flutter run -d iosThe app starts at the splash screen and routes to the log viewer at /log-viewer.
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 usageUseful 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 testThe 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.dartinitializes providers, logging, database, and shared preferences.lib/app.dartbuilds the themedMaterialApp.router.lib/router.dartdefines theGoRouterroutes.lib/screens/log_viewer/log_viewer_screen.dartwires the log viewer BLoCs and widgets into the primary screen.
lib/- Main app, routing, destinations, and screensapp_lib/- Core libraries such as log parsing, models, database, gamepad, locale, logging, provider, and secure storageapp_bloc/- Feature BLoC packages for log viewer, gamepad, and navigationapp_widget/- Reusable widget packages for log viewer, artwork, charts, and web viewsapp_form/- Form demo packageapp_plugin/- Federated native plugin packagesbricks/- Mason bricks for project code generationdocs/- Additional project, testing, form, logging, and brick documentationthird_party/- Vendored or modified third-party packages
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.jsonSee docs/BRICKS.md for brick-specific variables and examples.
- CLAUDE.md - Repository guidance for coding agents
- docs/INDEX.md - Documentation index
- docs/TESTING.md - Testing guide
- docs/BRICKS.md - Mason brick guide