Skip to main content
←BACK TO TRIP LOG [2]
DISPATCH LOG: BR 09
Alisbae - visual screen 1
FEATURED SPECIFICATION · 01/08
SYSTEM INTERFACE GALLERY [8 SCREENS]
01 — THE PROBLEM

What needed to be engineered

Mobile readers lean on cloud subscriptions, ad-heavy web readers and fragile connectivity. Readers need a zero-latency, local-first library that downloads, indexes and renders PDFs with persistent page tracking, fully offline.

02 — HARD CONSTRAINTS

Boundaries & non-negotiables

  • [01]Strict offline capability: downloaded books and reading state persist without external network calls.
  • [02]High-performance PDF rendering for multi-hundred-page books with zero jank.
  • [03]Clean decoupled architecture with explicit dependency injection via CompositionRoot.
  • [04]Multi-platform support across Android, iOS and Linux.
03 — ARCHITECTURAL BLUEPRINT

System flow & boundary isolation

Layered Flutter architecture wired through a CompositionRoot: BLoC/Cubit state management drives a reactive UI, sqflite manages the offline catalog, and Dio crawlers fetch books into the Syncfusion viewer.

DYNAMIC PIPELINE ARCHITECTURE · 4 STAGES
01Real-Time Web Crawler Search
02Background Download Pipeline
03Local SQLite Indexing
04Syncfusion In-App Reader
INGESTION TO OFFLINE RENDERING PIPELINE
4 STAGES GROUNDED

A user searches an online PDF library in real time through Dio HTTP crawlers with cookie persistence. Downloaded PDFs are saved to app documents via file system streams, metadata is indexed into SQLite, and the Syncfusion viewer opens the document while persisting exact reading progress.

[STAGE 01]

Real-Time Web Crawler Search

A Dio HTTP client with session cookie persistence scrapes and normalizes search results from the online catalogue.

[STAGE 02]

Background Download Pipeline

Multi-part binary stream downloads save book PDFs and cover images directly to sandboxed device storage.

[STAGE 03]

Local SQLite Indexing

sqflite records book metadata, custom tags, user ratings, reviews and last-read page offsets.

[STAGE 04]

Syncfusion In-App Reader

A high-performance canvas-accelerated PDF viewer with bookmarking, page jumping and light/dark theme toggles.

COMPOSITION ROOT & SERVICE ISOLATION

Explicit dependency injection in composition_root.dart isolates data sources, web services and BLoC state from Flutter widget trees, enforcing strict architectural boundaries and testability.

  • SEC-[01]
    UI pages never talk directly to HTTP services or SQLite drivers: every interaction routes through BLoC/Cubit viewmodels.
  • SEC-[02]
    Local storage lives in app-sandboxed directories, keeping offline file access safe from external leaks.
  • SEC-[03]
    Web crawlers and Dio network clients sit behind abstract service contracts, shielding the UI from remote schema changes.
  • SEC-[04]
    Permission handlers guard runtime filesystem access across Android, iOS and Linux desktop hosts.
04 — ENGINEERING DECISIONS & TRADE-OFFS

Why this choice over alternatives

CompositionRoot Dependency Injection

Avoided magical service-locator singletons in favor of an explicit CompositionRoot that wires all datasources, services and cubits at startup.

Syncfusion PDF Viewer Integration

Chose syncfusion_flutter_pdfviewer over basic WebView rendering for fluid page turns, custom night mode support and precise scroll-position recovery.

Local-First SQLite Catalog

Stored book records, favorites and reading progress in local sqflite tables instead of a cloud database, prioritizing reader privacy and offline resilience.

05 — RETROSPECTIVE & WHAT I GOT WRONG

Initial crawler implementation suffered cookie invalidation during deep paginated searches on the source site; resolved by adding persistent Dio cookie jar support.

06 — PRODUCTION IMPACT

Verified delivery & outcomes

Shipped v1.7.4-beta+5 on Android, iOS and Linux with offline library management, exact-page resume, dark mode and in-app book discovery.