famon_core

pub package License: MIT style: very_good_analysis

Core library for Firebase Analytics event parsing, formatting, and persistence. Powers the famon CLI and is reusable in other Dart and Flutter applications (for example a future GUI client).

What's included

  • Domain entitiesAnalyticsEvent, EventMetadata, MonitoringSession
  • Log parsersLogParserService (Android logcat), IosLogParserService (iOS Simulator and physical device logs)
  • Event formattingEventFormatterService for human-readable output
  • Persistence — Isar-backed repositories for events, metadata, and exports
  • Filtering and cachingEventFilterService, EventCacheService
  • Use casesMonitorEventsUseCase, ExportDataUseCase, ImportDataUseCase, AddManualParametersUseCase, DataExportImportUseCase
  • DI moduleFamonCorePackageModule for injectable integration

Installation

dart pub add famon_core

Or add to your pubspec.yaml:

dependencies:
  famon_core: ^1.4.0

Usage

import 'package:famon_core/famon_core.dart';

void main() {
  final parser = LogParserService();
  final event = parser.parse(
    '11-15 10:23:45.123 12345 12345 V FA      : Logging event: '
    'origin=app,name=screen_view,params=Bundle[{firebase_screen_class=HomeScreen}]',
  );

  if (event != null) {
    print('Event: ${event.eventName}');
    print('Params: ${event.parameters}');
  }
}

For full CLI usage, see famon.

Architecture

famon_core follows a layered domain-driven design. The main top-level groupings under lib/src/:

lib/src/
├── constants.dart      # Shared constants
├── core/
│   ├── domain/         # Entities, value objects, repository interfaces
│   ├── application/    # Use cases, application services
│   └── infrastructure/ # Isar implementations
├── core_injection.dart # injectable module entry point
├── exceptions/         # Domain-specific exceptions
├── models/             # Plain data classes
├── services/           # Parsers, formatters, caches
├── shared/             # Cross-cutting utilities
└── utils/              # Pure helpers (filtering, etc.)

The CLI in famon is a thin frontend; all business logic lives here.

Cross-platform parity

Android and iOS log parsers must produce identical AnalyticsEvent output for the same logical event. Bug fixes and feature additions ship across all platforms simultaneously. See CLAUDE.md in the repository for details.

License

MIT — see LICENSE.

Libraries

core_injection_module
Public re-export of the generated DI micro-package module.
famon_core
Core library for Firebase Analytics event parsing, formatting, and persistence.