Open Source · MPL 2.0 · Flutter

Parse lab reports.
Track biomarkers.
All on your phone.

Koshika is an open-source Flutter app that extracts biomarker data from PDF lab reports, tracks health trends, and runs on-device AI — without any data leaving your device.

thyrocare_report.pdf
2.4 MB · Uploaded just now
Parsing PDF…
Text extraction
Table detection
Pattern matching
Test NameResultUnitRef. Range
Hemoglobin14.2g/dL12-16
Vitamin D18ng/mL30-100
TSH2.4mIU/L0.4-4.0
[ 01 / 04 ] — HOW IT WORKS

Three steps. Zero internet.

From a PDF on your phone to AI-powered health insights — everything runs locally. No cloud. No accounts.

01

Import a PDF

Pick any pathology report from your phone — Thyrocare, SRL, Dr. Lal PathLabs, or others. Scanned pages work too.

02

Auto-extract biomarkers

Multi-pattern regex + fuzzy matching extracts values, units, and reference ranges. 63 biomarkers across 10 categories.

03

Track and ask AI

View trends. Ask any Hugging Face LLM about your results — on-device, with citation-backed answers from your actual lab data.

[ 02 / 04 ] — CAPABILITIES

What's under the hood

Every feature runs on your device. No API keys. No cloud bills. No privacy trade-offs.

PDF Lab Report Parsing

Multi-pattern regex handles Thyrocare, SRL, Dr. Lal PathLabs. OCR fallback for scanned pages.

syncfusion_flutter_pdfgoogle_mlkit

63 Biomarkers · 10 Categories

Normalized dictionary with fuzzy matching. CBC, Thyroid, Lipid, Liver, Kidney, Vitamins, Iron, Electrolytes, Diabetes, Inflammation.

string_similarity

Plug-and-Play LLM

Run any .gguf model from Hugging Face natively on your phone via LlamaDart. Streaming response. Zero API calls.

llamadarthuggingface

RAG with Citations

Builds on-device embeddings locally. An HNSW search surfaces relevant health context with precise [1][2] citations.

local_embeddingshnsw

Trend Visualization

Interactive charts, reference range gauges, borderline detection within 10% of boundaries.

fl_chartcustom_painter

FHIR R4 Export

Standards-compliant bundles to share with healthcare providers via native share sheet.

fhir_r4share_plus
[ 03 / 04 ] — TECH STACK

Fully on-device.
No backend.

Every layer from PDF ingestion to AI inference runs on the user's phone. One Flutter codebase → Android and iOS.

Built with Flutter

Single codebase targeting Android and iOS. Same performance, same features, fewer bugs. Fork it and build for your platform.

Android API 26+iOS (planned)Dart ≥3.9
project structure
lib/
├── models/ # ObjectBox DB entities
├── screens/ # Dashboard, Reports, Chat
├── services/ # PDF, LLM, vector search
├── widgets/ # Reusable UI components
└── main.dart # App entry & routing

assets/data/ # Biomarker dictionaries
01
UI Framework
Flutter
Cross-platform (Android, iOS)
02
Language
Dart ≥3.9
Null-safe, AOT compiled
03
Local Database
ObjectBox
NoSQL, fast CRUD, no boilerplate
04
PDF Engine
Syncfusion Flutter PDF
Text extraction + structure parsing
05
OCR Fallback
Google ML Kit + pdfx
Scanned page support
06
Text Analysis
Multi-regex + string_similarity
Fuzzy biomarker name matching
07
On-Device LLM
Hugging Face via LlamaDart
Any .gguf model (Llama/Gemma), streaming
08
Embeddings
Local HF Embeddings
HNSW vector index in SQLite
09
Export
FHIR R4
Standards-compliant health bundles

Your data never leaves this device.

Koshika isn't "privacy-friendly." It's structurally incapable of leaking your data. There is no server.

Zero cloud storage
All data in ObjectBox on your device. No server to breach.
On-device AI only
Plug and play your own Hugging Face .gguf models locally via LlamaDart. No API calls.
No network requests
No telemetry, no analytics, no crash reporting. Ever.
No accounts
No sign-up, no email, no phone number. Install and use.
[ 04 / 04 ] — CONTRIBUTE

Fork it. Extend it. Ship it.

Koshika is MPL-licensed. Add lab formats, extend biomarkers, improve the AI, or ship the iOS build. Every part is modifiable.

quickstart
# Clone and run
$ git clone https://github.com/priyavratuniyal/koshika.git
$ cd koshika && flutter pub get
$ flutter run

Add a lab format

Parser fails on your lab's PDF? Open an issue with a redacted sample or contribute a regex pattern.

Extend biomarkers

63 biomarkers is a start. Add definitions toassets/data/ — instantly recognized.

Ship iOS support

Flutter compiles to iOS. The codebase is ready — help test and polish the iOS build.

Improve the AI

Fine-tune prompts, add health context, improve citation accuracy. The RAG pipeline is modular.

Roadmap

What's shipped and what's next.

Shipped 11
PDF parsing (multi-pattern regex)
OCR fallback for scanned reports
Fuzzy biomarker matching (63 defs)
Dashboard with trend indicators
Biomarker detail with charts
Borderline detection (10% margin)
FHIR R4 export
Bring-your-own LLM (GGUF via Hugging Face)
Semantic search (local on-device embeddings)
RAG with citations
Animated onboarding
Planned 8
Persistent chat sessions
Health Connect integration
Computed risk scores (FIB-4, eGFR)
Anomaly detection (EWMA)
Nutritional recommendations
LLM-assisted PDF fallback
Encrypted storage + biometrics
Multi-patient profiles