<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Palak Agarwal</title>
    <description>The latest articles on DEV Community by Palak Agarwal (@palak_agarwal_fc15f55bc89).</description>
    <link>https://dev.to/palak_agarwal_fc15f55bc89</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4000629%2F3a126ce8-c69c-4287-96ac-b938df3ce394.png</url>
      <title>DEV Community: Palak Agarwal</title>
      <link>https://dev.to/palak_agarwal_fc15f55bc89</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/palak_agarwal_fc15f55bc89"/>
    <language>en</language>
    <item>
      <title>LazyDesk AI</title>
      <dc:creator>Palak Agarwal</dc:creator>
      <pubDate>Mon, 26 Oct 2026 06:20:29 +0000</pubDate>
      <link>https://dev.to/palak_agarwal_fc15f55bc89/lazydesk-ai-4on</link>
      <guid>https://dev.to/palak_agarwal_fc15f55bc89/lazydesk-ai-4on</guid>
      <description>&lt;p&gt;This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady&lt;/p&gt;

&lt;p&gt;What I Built:-&lt;/p&gt;

&lt;p&gt;LazyDesk AI is a local-first, privacy-respecting desktop assistant designed to tackle one of the most universal computer headaches: the chaotic, overflowing Downloads and Desktop folders, redundant duplicate files, and unread PDF documents.&lt;/p&gt;

&lt;p&gt;Instead of sending private desktop files to external cloud AI APIs, LazyDesk AI executes all processing locally on your own machine. It pairs deterministic system utilities for file operations with Google's open-weight Gemma 3 4B (via Ollama) for document synthesis and grounded Q&amp;amp;A.&lt;/p&gt;

&lt;p&gt;What effort does it save?&lt;br&gt;
Zero-effort file organization: Automatically sorts hundreds of scattered files into 8 clean category folders (Documents, Spreadsheets, Images, Videos, Audio, Code, Archives, Other) with interactive dry-run previews, automated filename conflict renaming (file_1.ext), and a 1-click undo history.&lt;br&gt;
Effortless duplicate discovery: Scans files using a fast two-stage algorithm (matching byte sizes first, followed by streaming SHA-256 chunked hashing) to uncover exact duplicates regardless of different filenames—without ever deleting anything automatically.&lt;br&gt;
Instant document synthesis: Extracts digital text from multi-page PDFs in milliseconds with PyMuPDF, feeding it directly to local Gemma 3 4B to generate a structured 5-part executive summary:&lt;br&gt;
Executive Overview&lt;br&gt;
Key Points &amp;amp; Insights&lt;br&gt;
Important Dates, Deadlines &amp;amp; Entities&lt;br&gt;
Action Items &amp;amp; Next Steps&lt;br&gt;
Document Notes &amp;amp; Uncertainties&lt;br&gt;
Grounded Document Q&amp;amp;A: Lets users query documents and receive answers strictly grounded in the document text, with explicit page references.&lt;br&gt;
Who gets to be a little lazier because of it?&lt;br&gt;
Developers &amp;amp; Tech Workers who let installer scripts, log dumps, and code snippets pile up in their default directories.&lt;br&gt;
Researchers &amp;amp; Students juggling dozens of academic papers, syllabi, and lecture slide decks who need immediate summaries and action items without reading 40 pages.&lt;br&gt;
Freelancers &amp;amp; Consultants managing confidential client invoices, contracts, and tax receipts who refuse to upload private client data to cloud AI services.&lt;br&gt;
Demo&lt;/p&gt;

&lt;p&gt;LazyDesk AI features a modern, responsive dark dashboard built in Streamlit with a muted slate/indigo theme.&lt;/p&gt;

&lt;p&gt;Quick Local Walkthrough:&lt;br&gt;
Launch the app with python -m streamlit run app.py (opens at &lt;a href="http://localhost:8501" rel="noopener noreferrer"&gt;http://localhost:8501&lt;/a&gt;).&lt;br&gt;
Click "📂 Load Demo Sandbox Path" in the sidebar to load the included, fully-isolated demo environment without touching any personal files.&lt;br&gt;
Open 📊 File Dashboard to view live metrics, category breakdowns, and searchable file tables.&lt;br&gt;
Switch to 🗂️ Smart Organizer, click "📋 Generate Move Preview", run a Dry Run, and inspect the automated conflict renaming.&lt;br&gt;
Check 🔍 Duplicate Detector to see identical SHA-256 invoice duplicates detected with reclaimable space calculations.&lt;br&gt;
Head to 📑 PDF Summarizer, upload the included LazyDesk_Product_Specification.pdf, and watch local Gemma 3 4B generate a complete executive breakdown with action items.&lt;br&gt;
+--------------------------------------------------------------------------+&lt;br&gt;
| [DEMO PREVIEW] 📊 File Dashboard                                         |&lt;br&gt;
| Scans direct files, calculates byte sizes, and charts category breakdowns|&lt;br&gt;
+--------------------------------------------------------------------------+&lt;br&gt;
| [DEMO PREVIEW] 🗂️ Smart File Organizer                                   |&lt;br&gt;
| Interactive proposed move plan, conflict check, dry-run &amp;amp; 1-click undo   |&lt;br&gt;
+--------------------------------------------------------------------------+&lt;br&gt;
| [DEMO PREVIEW] 🔍 Duplicate Detector                                     |&lt;br&gt;
| Streaming SHA-256 checksums, identical content grouping, report-only     |&lt;br&gt;
+--------------------------------------------------------------------------+&lt;br&gt;
| [DEMO PREVIEW] 📑 Local AI PDF Summarizer &amp;amp; Grounded Q&amp;amp;A                 |&lt;br&gt;
| Sub-second PyMuPDF extraction + Gemma 3 4B structured executive summary  |&lt;br&gt;
+--------------------------------------------------------------------------+&lt;/p&gt;

&lt;p&gt;(Demo video / GIF walkthrough link: &lt;a href="https://github.com/your-username/lazydesk-ai#demo" rel="noopener noreferrer"&gt;https://github.com/your-username/lazydesk-ai#demo&lt;/a&gt;&lt;br&gt;
)&lt;/p&gt;

&lt;p&gt;Code&lt;/p&gt;

&lt;p&gt;The complete source code is open source and structured into clean, modular Python components:&lt;/p&gt;

&lt;p&gt;text&lt;br&gt;
lazydesk-ai/&lt;br&gt;
├── app.py                         # Streamlit productivity dashboard &amp;amp; views&lt;br&gt;
├── .streamlit/config.toml         # Dark muted-neutral theme configuration&lt;br&gt;
├── modules/&lt;br&gt;
│   ├── config.py                  # Category mappings, exclusions, AI defaults&lt;br&gt;
│   ├── file_scanner.py            # Direct-file scanner &amp;amp; metric aggregation&lt;br&gt;
│   ├── organizer.py               # Conflict resolution, preview, move &amp;amp; rollback&lt;br&gt;
│   ├── duplicate_detector.py      # Size pre-filter + SHA-256 chunked hashing&lt;br&gt;
│   ├── pdf_processor.py           # PyMuPDF text engine &amp;amp; scanned PDF detector&lt;br&gt;
│   ├── local_ai.py                # Ollama REST API client (Gemma 3 4B)&lt;br&gt;
│   └── operation_history.py       # JSON audit history logger for undo support&lt;br&gt;
├── sample_data/                   # Isolated test files (never touches real data)&lt;br&gt;
│   ├── create_demo_data.py        # Demo generator&lt;br&gt;
│   └── demo_sandbox/              # Sample PDFs, CSVs, scripts, and duplicates&lt;br&gt;
├── tests/                         # 30 passing unit tests (100% green)&lt;br&gt;
├── requirements.txt               # Dependencies (PyMuPDF, Streamlit, Ollama client)&lt;br&gt;
└── README.md                      # Complete Windows/Linux setup instructions&lt;br&gt;
GitHub Repository&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://github.com/your-username/lazydesk-ai" rel="noopener noreferrer"&gt;https://github.com/your-username/lazydesk-ai&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Key Code Highlight: Local AI Generation with Zero Cloud Calls&lt;br&gt;
python&lt;/p&gt;

&lt;h1&gt;
  
  
  modules/local_ai.py
&lt;/h1&gt;

&lt;p&gt;def generate_document_summary(&lt;br&gt;
    document_text: str,&lt;br&gt;
    filename: str = "document.pdf",&lt;br&gt;
    model: str = "gemma3:4b",&lt;br&gt;
    base_url: str = "&lt;a href="http://localhost:11434" rel="noopener noreferrer"&gt;http://localhost:11434&lt;/a&gt;",&lt;br&gt;
    timeout: int = 90,&lt;br&gt;
) -&amp;gt; AISummaryResult:&lt;br&gt;
    """Send document text strictly to local Ollama instance."""&lt;br&gt;
    prompt = build_summarization_prompt(document_text, filename)&lt;br&gt;
    endpoint = f"{base_url.rstrip('/')}/api/generate"&lt;br&gt;
    payload = {&lt;br&gt;
        "model": model,&lt;br&gt;
        "prompt": prompt,&lt;br&gt;
        "stream": False,&lt;br&gt;
        "options": {"temperature": 0.2, "top_p": 0.9},&lt;br&gt;
    }&lt;br&gt;
    # Strict local execution with low temperature for factual fidelity&lt;br&gt;
    response = requests.post(endpoint, json=payload, timeout=timeout)&lt;br&gt;
    response.raise_for_status()&lt;br&gt;
    return AISummaryResult(&lt;br&gt;
        success=True,&lt;br&gt;
        summary_markdown=response.json().get("response", "").strip(),&lt;br&gt;
        model_used=model,&lt;br&gt;
    )&lt;br&gt;
How I Built It&lt;/p&gt;

&lt;p&gt;LazyDesk AI was built using a hybrid architecture that pairs deterministic software engineering with open-weight language modeling:&lt;/p&gt;

&lt;p&gt;Local Open-Weight Model: Gemma 3 4B served locally by Ollama (&lt;a href="http://localhost:11434" rel="noopener noreferrer"&gt;http://localhost:11434&lt;/a&gt;). It provides an ideal balance of fast CPU/GPU inference and sharp reasoning for structured extraction without needing 32 GB of VRAM.&lt;br&gt;
User Interface: Streamlit 1.38+, heavily customized with a dark theme (#0b0f19 background, #131c2e surface cards, #6366f1 indigo accents) to feel like a polished desktop utility rather than a tutorial app.&lt;br&gt;
PDF Text Extraction: PyMuPDF (fitz), delivering sub-second parsing across complex PDF structures.&lt;br&gt;
Cryptographic Duplicate Detection: Python hashlib using SHA-256 streamed in 64 KB chunks to handle multi-gigabyte files without memory bottlenecks.&lt;br&gt;
Safety Invariants:&lt;br&gt;
Never Overwrite: Automated renaming (report_1.pdf) preserves existing files.&lt;br&gt;
Dry Run Verification: Preview simulated actions before writing to disk.&lt;br&gt;
Audit Trail &amp;amp; Reversal: All movements are logged to ~/.lazydesk/operations_history.json and can be undone with a single click.&lt;br&gt;
No Silent Hallucination on Scanned PDFs: If a user uploads an image-only scanned PDF without an OCR text layer, LazyDesk AI identifies this immediately and informs the user that digital text is absent, rather than fabricating a summary.&lt;br&gt;
100% Mocked Automated Tests: 30 comprehensive unit tests using pytest mock Ollama endpoints, ensuring test suites run anywhere without downloading weights.&lt;br&gt;
Why Does Open Innovation Matter?&lt;/p&gt;

&lt;p&gt;Desktop AI tools present a profound privacy dilemma. When an AI app asks to inspect your folders or read your documents, sending that data over the public internet to closed-source, centralized cloud APIs creates serious risks:&lt;/p&gt;

&lt;p&gt;Data Sovereignty: Financial statements, confidential NDAs, personal tax records, and medical PDFs should never leave your hard drive. Open-weight models running on localhost make true data sovereignty possible.&lt;br&gt;
No Metered Costs: Closed APIs charge per token. A user sorting their desktop or summarizing a 50-page PDF shouldn't have to calculate API costs or fear subscription tier upgrades. Open innovation enables unlimited, predictable, zero-marginal-cost productivity.&lt;br&gt;
Offline Reliability: Trains, airplanes, and rural job sites don't always have reliable Wi-Fi. Because LazyDesk AI relies on open weights and local runtimes, it functions identically with or without an internet connection.&lt;br&gt;
Freedom of Choice: Users aren't locked into a single proprietary vendor. If a user prefers llama3.2, mistral, or phi3, they can switch the model name directly in the LazyDesk settings panel without rewriting code.&lt;br&gt;
My Agent Session&lt;/p&gt;

&lt;p&gt;This project was built pair-programming with the Antigravity autonomous AI coding agent.&lt;/p&gt;

&lt;p&gt;The agent played the role of full-stack architect, test engineer, and UX designer:&lt;/p&gt;

&lt;p&gt;Scaffolding the 6 modular subsystems (file_scanner.py, organizer.py, duplicate_detector.py, pdf_processor.py, local_ai.py, operation_history.py).&lt;br&gt;
Creating an isolated sandbox demo environment to verify safety without touching personal directories.&lt;br&gt;
Writing and executing 30 unit tests with pytest, catching real edge cases (like dataclass argument ordering and multi-line PyMuPDF bounding boxes) during development.&lt;br&gt;
Starting and verifying the live Streamlit server over localhost.&lt;br&gt;
The Lazy Payoff&lt;/p&gt;

&lt;p&gt;Here is how LazyDesk AI lets users embrace their inner sloth while staying organized:&lt;/p&gt;

&lt;p&gt;Task    The Hard Way (Manual / Cloud)   The LazyDesk AI Way&lt;br&gt;
Cleaning a 150-file Downloads folder    30–45 minutes of manual dragging, creating folders, and checking file extensions. 3 seconds: Click Preview, Click Confirm. Files are safely categorized.&lt;br&gt;
Finding redundant duplicate downloads   Opening files side-by-side, comparing file dates, checking byte sizes.  Instant: Automated SHA-256 scan shows duplicate groups and reclaimable bytes.&lt;br&gt;
Reading a 25-page product spec or agreement 30 minutes of skimming for deadlines, names, and deliverables.  15 seconds: Gemma 3 4B extracts exact deadlines, named entities, and action items.&lt;br&gt;
Fixing an accidental reorganization Panicking and manually moving files back one by one.    1 click: Click "Undo Operation" in History to restore original file locations.&lt;br&gt;
Prize Categories&lt;br&gt;
Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady (Focusing on genuine open-weight AI performing real application tasks without external cloud dependencies).&lt;/p&gt;

&lt;p&gt;Built with ❤️ for Hacktoberfest 2026. Keep it local, keep it open.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>LedgerLens: Local-First AI Agent for Handwritten Ledgers, Anomaly Detection &amp; Cash-Flow Forecasting</title>
      <dc:creator>Palak Agarwal</dc:creator>
      <pubDate>Mon, 19 Oct 2026 07:00:17 +0000</pubDate>
      <link>https://dev.to/palak_agarwal_fc15f55bc89/ledgerlens-local-first-ai-agent-for-handwritten-ledgers-anomaly-detection-cash-flow-forecasting-17h4</link>
      <guid>https://dev.to/palak_agarwal_fc15f55bc89/ledgerlens-local-first-ai-agent-for-handwritten-ledgers-anomaly-detection-cash-flow-forecasting-17h4</guid>
      <description>&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Millions of small shopkeepers, street vendors, and freelancers across India track daily business operations in physical paper notebooks—commonly known as &lt;strong&gt;Khata Bahi (खाता बही)&lt;/strong&gt; or &lt;strong&gt;Roznamcha (रोज़नामचा)&lt;/strong&gt;. These physical logs mix handwritten Hindi (Devanagari) and English, record customer credit/debit, and track daily inventory purchases.&lt;/p&gt;

&lt;p&gt;When tax season arrives or when seeking micro-loans, shopkeepers face days of painful, error-prone manual data entry. Commercial SaaS accounting apps either fail to read local handwriting or mandate uploading sensitive customer records to the cloud—exposing financial ledgers to third-party data mining.&lt;/p&gt;

&lt;h3&gt;
  
  
  What LedgerLens Does
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;LedgerLens&lt;/strong&gt; is an open-source, local-first agent that runs entirely on a standard laptop with zero GPU requirements:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Multimodal Vision Extraction&lt;/strong&gt;: Snaps or uploads photos of handwritten shop ledgers and bills (in Hindi, English, or mixed Hinglish) and transforms them into strict, structured JSON &lt;code&gt;{date, party, item, quantity, amount, currency, type, confidence}&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Normalization &amp;amp; Validation&lt;/strong&gt;: Cleans dates and currencies, drops duplicate entries, and never silently mutates amounts—highlighting entries with confidence &lt;code&gt;&amp;lt; 0.7&lt;/code&gt; for human review.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TabPFN Anomaly Detection&lt;/strong&gt;: Uses the TabPFN tabular foundation model to detect unusual store expenses (e.g., massive restock spikes, accidental double bills, or odd supplier frequencies) and explains each flag in one plain-language sentence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;30-Day Cash-Flow Forecasting&lt;/strong&gt;: Uses TabPFN time series regression to project the next 30 days of daily net cash flow with a 95% uncertainty interval.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plain-Language Weekly Summaries&lt;/strong&gt;: Generates friendly executive financial briefs (&lt;em&gt;"You made ₹9,235 in sales this week with a net balance of +₹2,918. You spent 35% more on expenses compared to last week..."&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Spreadsheet Export&lt;/strong&gt;: 1-click download to CSV and formatted Microsoft Excel (XLSX).&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Who Would Pay for This? (The Side Hustle)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local Accountants &amp;amp; GST Practitioners&lt;/strong&gt;: Tax preparers and accountants servicing small merchants charge ₹500–₹1,500/month per shop for bookkeeping. LedgerLens cuts their manual data entry from 3 hours to 30 seconds per client ledger.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Freelance Bookkeepers &amp;amp; Micro-SaaS&lt;/strong&gt;: A turnkey offline desktop utility sold to shopkeepers for a one-time license of ₹999 or ₹199/month.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Ongoing API Costs&lt;/strong&gt;: Because the AI runs 100% locally on open-source models, the operator retains 100% gross margins.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Repository&lt;/strong&gt;: &lt;a href="https://github.com/nikprad/ledgerlens" rel="noopener noreferrer"&gt;https://github.com/nikprad/ledgerlens&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Local Dashboard&lt;/strong&gt;: &lt;code&gt;http://localhost:3000&lt;/code&gt; (Powered by Node.js + Mastra Orchestrator + FastAPI backend)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key User Experience Walkthrough:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Privacy Status Panel&lt;/strong&gt;: Displays active local components (Gemma 3 vision via Ollama, local TabPFN on CPU, SQLite storage) with a toggle for TabPFN Cloud API that enforces zero-PII transmission (anonymized numeric columns only).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scan &amp;amp; Extract&lt;/strong&gt;: Choose any receipt photo or select one of the 5 preloaded Indian shop samples (Grocery Store, Chai Stall, Hindi Khata, Hardware Invoice, Daily Register).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5-Step Mastra Workflow&lt;/strong&gt;: Watch real-time execution across &lt;code&gt;extract&lt;/code&gt; ➔ &lt;code&gt;validate&lt;/code&gt; ➔ &lt;code&gt;store&lt;/code&gt; ➔ &lt;code&gt;forecast&lt;/code&gt; ➔ &lt;code&gt;summarize&lt;/code&gt; with latency and token metrics logged to &lt;code&gt;observability.json&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spreadsheet &amp;amp; Review&lt;/strong&gt;: Inspect and edit transactions directly in an interactive table where ambiguous or low-confidence entries are clearly badged in amber for human sign-off.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Probabilistic Forecast Chart&lt;/strong&gt;: View historical daily revenue alongside a 30-day projection line and shaded uncertainty bounds.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/nikprad" rel="noopener noreferrer"&gt;
        nikprad
      &lt;/a&gt; / &lt;a href="https://github.com/nikprad/ledgerlens" rel="noopener noreferrer"&gt;
        ledgerlens
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;# 📜🔍 LedgerLens
&amp;gt; **Local-First AI Agent for Handwritten Bills, Receipts &amp;amp; Shop Ledgers**
&amp;gt; *Transform photos of handwritten khata pages and receipts (Hindi + English) into clean spreadsheets, flag financial anomalies, and forecast cash flow — with 100% local privacy.*
Built for the **Hacktoberfest Open-Source AI Challenge** (*Theme: Side Hustle*).

---

## ⚡ 3-Command Quickstart

```bash
# 1. Clone repository and navigate to project
git clone &lt;a href="https://github.com/your-username/ledgerlens.git" rel="noopener noreferrer"&gt;https://github.com/your-username/ledgerlens.git&lt;/a&gt; &amp;amp;&amp;amp; cd ledgerlens

# 2. Install dependencies (Node + Python)
npm install &amp;amp;&amp;amp; pip install -r requirements.txt

# 3. Start LedgerLens (Backend + Mastra Workflow + Web Dashboard)
npm start
```

Visit **`http://localhost:3000`** in your browser.

&amp;gt; [!TIP]
&amp;gt; If running Gemma vision locally via Ollama, start Ollama first: `ollama run gemma3:4b`. If Ollama is not installed or unreachable, LedgerLens seamlessly activates its simulated fallback mode so all workflows, tests, and UI demos work out of the box without crashing.

---

##…&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/nikprad/ledgerlens" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The repository is organized cleanly into modular microservices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;backend/&lt;/code&gt;: FastAPI backend wrapping Ollama multimodal vision, image preprocessing, TabPFN anomaly detection, and SQLite storage.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;workflow/&lt;/code&gt;: Mastra TypeScript workflow chaining the 5 pipeline steps with Zod validation.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;frontend/&lt;/code&gt;: Web dashboard with editable spreadsheet, privacy toggles, and Chart.js forecast visualizations.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cli/&lt;/code&gt;: Command-line extraction runner (&lt;code&gt;extract_cli.py&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;eval/&lt;/code&gt;: Automated ground-truth benchmark suite measuring field-level extraction accuracy.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;samples/&lt;/code&gt;: 5 realistic synthetic handwritten/printed ledger sheets and matching ground-truth JSON files.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;LedgerLens is built around &lt;strong&gt;open-weight foundation models and local execution&lt;/strong&gt;:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Vision Extraction (Gemma Multimodal via Ollama)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Uses Google's &lt;strong&gt;Gemma multimodal model&lt;/strong&gt; (&lt;code&gt;gemma3:4b&lt;/code&gt;) served locally via Ollama.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Image Preprocessing Pipeline&lt;/strong&gt;: A custom pipeline in PIL resizes high-resolution camera photos, converts them to grayscale, and applies contrast/sharpness enhancement so the quantized model can parse faint ink strokes and complex Devanagari ligatures on low-power CPUs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Schema Validation &amp;amp; Self-Correction&lt;/strong&gt;: Imposes a strict JSON system prompt. If parsing or schema validation fails, the extractor automatically retries once with an explicit error correction prompt.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Predictions &amp;amp; Forecasting (TabPFN by Prior Labs)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Integrates &lt;strong&gt;TabPFN&lt;/strong&gt; (&lt;code&gt;TabPFNRegressor&lt;/code&gt; &amp;amp; &lt;code&gt;TabPFNClassifier&lt;/code&gt;), a transformer-based foundation model trained on synthetic tabular datasets for zero-shot in-context learning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anomaly Detection&lt;/strong&gt;: Fits TabPFN on transaction distributions to detect unusual expenses, duplicate billing events within 48 hours, and supplier frequency bursts with 1-sentence explanations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cash-Flow Forecasting&lt;/strong&gt;: Aggregates daily net cash flows (&lt;code&gt;sales - expenses&lt;/code&gt;) and builds temporal lag features (&lt;code&gt;lag_1&lt;/code&gt;, &lt;code&gt;lag_7&lt;/code&gt;, &lt;code&gt;rolling_7&lt;/code&gt;, &lt;code&gt;day_of_week&lt;/code&gt;). Fits &lt;code&gt;TabPFNRegressor&lt;/code&gt; to project 30 days forward with empirical uncertainty bounds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graceful Fallback&lt;/strong&gt;: Gracefully detects if $&amp;lt;20$ historical days exist, prompting the shopkeeper to upload more entries or seed demo history.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Workflow Orchestration (Mastra TypeScript)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Employs &lt;strong&gt;Mastra&lt;/strong&gt; (&lt;code&gt;@mastra/core/workflows&lt;/code&gt;) to define a deterministic, type-safe state machine:
$$\text{extract} \longrightarrow \text{validate} \longrightarrow \text{store} \longrightarrow \text{forecast} \longrightarrow \text{summarize}$$&lt;/li&gt;
&lt;li&gt;Each step validates inputs and outputs using &lt;strong&gt;Zod&lt;/strong&gt; schemas, ensuring end-to-end data integrity between the Python backend and TypeScript orchestrator.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Storage &amp;amp; Observability
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SQLite (&lt;code&gt;ledgerlens.db&lt;/code&gt;)&lt;/strong&gt;: Lightweight, embedded, zero-configuration local database.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Observability Tracker&lt;/strong&gt;: Automatically records step latencies, token consumption, and timestamps to &lt;code&gt;observability.json&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;Open innovation is what made LedgerLens possible. Here is a direct comparison between building this with open-source AI versus closed proprietary APIs:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Local-First Open Source (LedgerLens)&lt;/th&gt;
&lt;th&gt;Closed Cloud APIs (e.g. AWS Textract / Cloud Vision)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost per 1,000 Receipts&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;$0.00&lt;/strong&gt; (Free on existing laptop hardware)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;$50.00 – $150.00&lt;/strong&gt; ($0.05 – $0.15 per page processed)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Offline Reliability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;100% Offline&lt;/strong&gt; (Works in remote rural shops with zero connectivity)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;0% Offline&lt;/strong&gt; (Fails completely without constant internet)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Data Privacy &amp;amp; Sovereignty&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;100% On-Device&lt;/strong&gt; (Customer ledger never leaves the merchant's machine)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Cloud Egress&lt;/strong&gt; (Customer financial logs stored on third-party servers)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Vernacular Handwriting&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Adaptable open weights fine-tuned on Hindi/Hinglish scripts&lt;/td&gt;
&lt;td&gt;Generic OCR often struggles with mixed Indic handwriting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Unit Economics for Side Hustle&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;High Margin&lt;/strong&gt; (Only software license costs; zero API bills)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Eaten by API fees&lt;/strong&gt; (Margins evaporate as receipt volume grows)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;With closed APIs, a small shopkeeper cannot afford $100/month just to digitize daily receipts. Open-source models turn what used to be an expensive enterprise cloud service into a free utility running on a $300 refurbished laptop.&lt;/p&gt;




&lt;h2&gt;
  
  
  Ground-Truth Benchmark Results
&lt;/h2&gt;

&lt;p&gt;We evaluated LedgerLens against 5 hand-labeled ground truth datasets in &lt;code&gt;/samples&lt;/code&gt;:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
text
==========================================================================================
 LedgerLens Ground-Truth Evaluation Suite
 Model: gemma3:4b | Base URL: http://localhost:11434
==========================================================================================

Sample Image                     | GT  | Ext | Date %  | Party % | Item %  | Qty %   | Amt %   | Type %  | Latency 
-------------------------------------------------------------------------------------------------------------------
sample_1_kiranastore.png         | 4   | 4   | 100.0   | 100.0   | 100.0   | 100.0   | 100.0   | 100.0   | 4256ms  
sample_2_chai_tea_bill.png       | 4   | 4   | 100.0   | 100.0   | 100.0   | 100.0   | 100.0   | 100.0   | 4091ms  
sample_3_hindi_khata.png         | 4   | 4   | 100.0   | 100.0   | 100.0   | 100.0   | 100.0   | 100.0   | 4134ms  
sample_4_hardware_invoice.png    | 4   | 4   | 100.0   | 100.0   | 100.0   | 100.0   | 100.0   | 100.0   | 4118ms  
sample_5_daily_ledger_mixed.png  | 4   | 4   | 100.0   | 100.0   | 100.0   | 100.0   | 100.0   | 100.0   | 4113ms  
-------------------------------------------------------------------------------------------------------------------
AVERAGE / OVERALL                | -   | -   | 100.0   | 100.0   | 100.0   | 100.0   | 100.0   | 100.0   | 4143ms
===================================================================================================================

&amp;gt;&amp;gt; OVERALL FIELD-LEVEL ACCURACY: 100.0%
&amp;gt;&amp;gt; AVERAGE EXTRACTION LATENCY:   4142.5ms per image
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>NatureQuest-AI</title>
      <dc:creator>Palak Agarwal</dc:creator>
      <pubDate>Mon, 12 Oct 2026 06:54:13 +0000</pubDate>
      <link>https://dev.to/palak_agarwal_fc15f55bc89/naturequest-ai-4p5h</link>
      <guid>https://dev.to/palak_agarwal_fc15f55bc89/naturequest-ai-4p5h</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week1-2026-10-05"&gt;Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  🌿 NatureQuest-AI: Mindful Everyday Nature Discovery
&lt;/h1&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;We live in an age of pervasive screen fatigue. Notifications, endless feeds, and fluorescent-lit workspaces trap us in perpetual digital overdrive. Many people believe that "connecting with nature" requires booking an expensive vacation, packing heavy hiking gear, or driving hours to a national park. As a result, we overlook the rich, thriving micro-ecosystems happening right in front of us every single day—in the cracks of our sidewalks, on our apartment balconies, around street trees, and in neighborhood parks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NatureQuest-AI&lt;/strong&gt; was built to change that. It is an intelligent, privacy-first nature companion that transforms ordinary routines—a 10-minute balcony coffee break, a 15-minute walk around the block, or a quiet pause on a park bench—into grounded, mindful micro-expeditions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features &amp;amp; How It Gets People Outdoors
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tailored Micro-Expeditions in Under 30 Minutes&lt;/strong&gt;: Instead of passive reading or generic Wikipedia summaries, NatureQuest-AI generates structured, sensory observation quests customized to your exact setting (Balcony/Window, Urban Street, Backyard, Park, Forest Trail) and available time (5–30 minutes).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sensory &amp;amp; Scientific Observation Guides&lt;/strong&gt;: Quests guide you through concrete physical exploration:

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Leaf Architecture &amp;amp; Venation Detective&lt;/em&gt;: Examining microscopic circulatory systems of living leaves to uncover how plants transport water.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Solar Sundial &amp;amp; Shadow Drift&lt;/em&gt;: Marking subtle shadow drift across natural surfaces to witness the kinetic rotation of planet Earth in real time.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Acoustic Soundscape Mapping&lt;/em&gt;: Closing your eyes and mapping near vs. distant bird frequencies and wind currents.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Pavement Crack Micro-Ecology&lt;/em&gt;: Investigating resilient mosses, lichen colonies, and ant foraging highways in urban concrete.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strictly Non-Destructive Conservation Ethic&lt;/strong&gt;: Every generated quest contains explicit Leave-No-Trace principles and safety guidance, reminding explorers to observe without disturbing living organisms or damaging fragile habitats.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Personal Field Journal (Full CRUD)&lt;/strong&gt;: Capture what you saw, heard, and smelled. Record reflection notes, weather context, and custom tags. You can edit, search, and export your discoveries to clean Markdown (&lt;code&gt;.md&lt;/code&gt;) or structured JSON (&lt;code&gt;.json&lt;/code&gt;) with a single click.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Honest, Truth-Based Progress Tracking&lt;/strong&gt;: No synthetic streaks, dopamine traps, or vanity game points. NatureQuest-AI visualizes authentic progress based strictly on your verified journaled sessions, highlighting habitats explored and observation minutes logged.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Repository&lt;/strong&gt;: &lt;a href="https://github.com/palak2122-ag/NatureQuest-AI" rel="noopener noreferrer"&gt;github.com/palak2122-ag/NatureQuest-AI&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Quick Run&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  git clone https://github.com/palak2122-ag/NatureQuest-AI.git
  &lt;span class="nb"&gt;cd &lt;/span&gt;NatureQuest-AI
  pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt
  streamlit run app.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;em&gt;(Zero configuration needed—the app launches immediately with full offline capabilities!)&lt;/em&gt;&lt;/p&gt;



&lt;blockquote&gt;
&lt;p&gt;🎥 &lt;strong&gt;Walkthrough Preview&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Home Overview&lt;/strong&gt;: Quick-launch curated quests, review your time spent outdoors, and inspect your latest journal entries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Nature Discovery&lt;/strong&gt;: Configure your surroundings, select your available time and observational focus (Botany, Wildlife, Geology, Sky/Atmosphere, Mindfulness), and generate an interactive quest complete with a session timer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explore Library&lt;/strong&gt;: Browse 20+ varied nature archetypes filterable by environment, difficulty, and duration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Field Journal&lt;/strong&gt;: Record your thoughts and sensory observations directly into your private nature diary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Insights &amp;amp; Milestones&lt;/strong&gt;: Track your genuine observation hours and celebrate authentic outdoor exploration milestones.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;You can find the full source code and documentation on GitHub:&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/palak2122-ag" rel="noopener noreferrer"&gt;
        palak2122-ag
      &lt;/a&gt; / &lt;a href="https://github.com/palak2122-ag/NatureQuest-AI" rel="noopener noreferrer"&gt;
        NatureQuest-AI
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      An open-source AI app that generates personalized outdoor nature missions.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;NatureQuest-AI 🌿&lt;/h1&gt;
&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Discover Nature in Your Everyday Surroundings&lt;/strong&gt;&lt;br&gt;
An AI-powered, mindful nature discovery and micro-ecology platform that transforms everyday strolls, balconies, and urban streets into immersive outdoor discoveries.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://python.org" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/c6600710d897eb4d6f1fd04f63f338c32f13991d89d547a12e900af448bcd785/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f507974686f6e2d332e31302532422d3245374433323f6c6f676f3d707974686f6e266c6f676f436f6c6f723d7768697465" alt="Python"&gt;&lt;/a&gt;
&lt;a href="https://streamlit.io" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/06aca17356eaecbb63656f35e3e255dc14a001a779984aa7129f5751b5937b9a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53747265616d6c69742d312e34302532422d3142334232423f6c6f676f3d73747265616d6c6974266c6f676f436f6c6f723d7768697465" alt="Streamlit"&gt;&lt;/a&gt;
&lt;a href="https://aistudio.google.com/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e064119c2021a51a963a363f9b052e0af2bb75594c5774ad86d42442fdd9d835/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f476f6f676c6525323047656d696e692d41504925323052656164792d3432383546343f6c6f676f3d676f6f676c65266c6f676f436f6c6f723d7768697465" alt="Gemini"&gt;&lt;/a&gt;
&lt;a href="https://ollama.com" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e69e35e918bd6c95885d59a3ccd24176882357290a2e9ecd466ad2cf97d03672/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6f63616c25323047656d6d612d4f6c6c616d612d626c61636b3f6c6f676f3d6f6c6c616d61266c6f676f436f6c6f723d7768697465" alt="Ollama"&gt;&lt;/a&gt;
&lt;a href="https://github.com/palak2122-ag/NatureQuest-AI" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/d0d0a1296c93ec1fc46bd78beebe696c1a1594fc3392a668521423e83ae59508/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6f63616c2d2d46697273742d313030253235253230507269766174652d354338333734" alt="Privacy"&gt;&lt;/a&gt;
&lt;a href="https://github.com/palak2122-ag/NatureQuest-AI#testing" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/f53f9882e3a12cf25d33140282323f5eab881d05f9d71f858e6607d25829b8a8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54657374732d33352532305061737365642d73756363657373" alt="Tests"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🌟 Key Features&lt;/h2&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;AI Nature Discovery Engine (Multi-Tier)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Google Gemini Integration&lt;/strong&gt;: Cloud inference generating structured observation guides tailored to precise duration, micro-habitat, and language.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Gemma via Ollama&lt;/strong&gt;: Optional, fully private offline neural inference on your local machine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Curated Offline Recommendation Engine&lt;/strong&gt;: 100% reliable fallback with 20+ rich archetypes, smart scoring, and multilingual support (English, Hindi, Hinglish). Never blocked by missing API keys or internet downtime.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Honest Source Attribution &amp;amp; Safety&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Plans explicitly display their source: &lt;code&gt;Gemini AI&lt;/code&gt;, &lt;code&gt;Local Gemma via Ollama&lt;/code&gt;, or &lt;code&gt;Offline recommendation engine&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Built-in conservation rules: strictly non-destructive observation guidelines that protect urban wildlife and plant life.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Curated Explore Library&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;20+ diverse, scientifically grounded quests (Leaf Venation Architecture, Solar Shadow Drift, Acoustic Soundscape…&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/palak2122-ag/NatureQuest-AI" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  Repository Highlights
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;100% Python-Powered&lt;/strong&gt;: Built with Streamlit, Pydantic v2, and clean modular architecture.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extensive Test Suite&lt;/strong&gt;: 38 automated unit tests covering storage concurrency, Pydantic schema validation, duplicate prevention, and AI provider fallback probes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accessible Design System&lt;/strong&gt;: Custom nature-inspired palette (Warm Ivory &lt;code&gt;#FBF9F5&lt;/code&gt;, Deep Forest Green &lt;code&gt;#1B3B2B&lt;/code&gt;, Sage &lt;code&gt;#5C8374&lt;/code&gt;, and Plus Jakarta Sans typography).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;NatureQuest-AI was engineered from the ground up around &lt;strong&gt;open-weight models, local inference, and a transparent multi-tier AI architecture&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                           ┌────────────────────────────┐
                           │   NatureQuest-AI App       │
                           │   (Streamlit + UI System)  │
                           └──────────────┬─────────────┘
                                          │
                            Provider Probe &amp;amp; Health Check
                                          │
              ┌───────────────────────────┼──────────────────────────┐
              ▼                           ▼                          ▼
    ┌───────────────────┐       ┌───────────────────┐      ┌───────────────────┐
    │   Google Gemini   │       │    Local Gemma    │      │  Curated Offline  │
    │   (Cloud API)     │       │   (Ollama Open)   │      │ Recommendation    │
    │  gemini-1.5-flash │       │     gemma2:2b     │      │      Engine       │
    └───────────────────┘       └───────────────────┘      └───────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  1. Open-Weight Local Inference with Gemma 2 &amp;amp; Ollama
&lt;/h3&gt;

&lt;p&gt;When stepping outdoors, internet connectivity can be spotty or completely unavailable on park trails and nature walks. To ensure genuine accessibility and privacy, NatureQuest-AI natively supports &lt;strong&gt;Gemma 2 (2B / 9B)&lt;/strong&gt; via &lt;strong&gt;Ollama&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local &amp;amp; On-Device&lt;/strong&gt;: Connects to &lt;code&gt;http://localhost:11434&lt;/code&gt; to run Gemma locally without sending a single byte of observation or prompt data over the internet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strict Schema Enforcement&lt;/strong&gt;: Prompts are constrained to return strictly validated JSON matching our &lt;code&gt;NaturePlan&lt;/code&gt; schema, parsed and verified through Pydantic v2.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Multi-Tier Provider Manager with Transparent Attribution
&lt;/h3&gt;

&lt;p&gt;In NatureQuest-AI, we believe in radical transparency:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If a quest is generated by &lt;strong&gt;Google Gemini (1.5 Flash)&lt;/strong&gt;, the UI clearly displays &lt;code&gt;✨ Source: Google Gemini AI&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If generated by &lt;strong&gt;Local Gemma&lt;/strong&gt;, it shows &lt;code&gt;⚡ Source: Local Gemma via Ollama&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If generated without any AI connection, it proudly displays &lt;code&gt;📘 Source: Offline recommendation engine&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Curated Offline Recommendation Engine (Zero-Failure Guarantee)
&lt;/h3&gt;

&lt;p&gt;Technology should never be the barrier that stops someone from touching grass. If you don't have an API key or don't have Ollama installed, NatureQuest-AI automatically falls back to an internal knowledge engine featuring 20+ rich micro-ecology archetypes with smart habitat matching and multilingual adaptation (English, Hindi, Hinglish).&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Local-First &amp;amp; Atomic Data Persistence
&lt;/h3&gt;

&lt;p&gt;All personal notes, field observations, and completed quests are saved locally in &lt;code&gt;data/&lt;/code&gt; using atomic file writes and thread locks. Your private reflections never leave your machine.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;The very philosophy of &lt;strong&gt;"Touch Grass"&lt;/strong&gt; is rooted in grounding, personal sovereignty, and stepping away from monopolistic walled gardens.&lt;/p&gt;

&lt;p&gt;Here is why open innovation and open-weight models are vital for this project:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Nature Doesn't Have Wi-Fi (Offline Resilience)&lt;/strong&gt;:&lt;br&gt;
The best moments of nature observation happen away from cellular towers—in deep woods, shaded canyons, or quiet park groves. Closed cloud APIs become useless the moment your signal drops. Open-weight models like &lt;strong&gt;Gemma 2 running locally on consumer hardware&lt;/strong&gt; allow anyone to take intelligent, context-aware observation companions directly into the wilderness.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Absolute Data Sovereignty for Personal Reflections&lt;/strong&gt;:&lt;br&gt;
A field journal is an intimate record of your thoughts, quiet moments, and mental health. Users shouldn't have to surrender their private reflections or location patterns to closed corporate servers to enjoy AI assistance. Open-source AI makes &lt;strong&gt;local-first privacy&lt;/strong&gt; an everyday reality.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;No Financial Paywalls for Outdoor Wellness&lt;/strong&gt;:&lt;br&gt;
Connecting with the natural world should be free and accessible to everyone. Closed commercial APIs impose ongoing per-token costs and subscription walls. Open models give students, educators, community centers, and curious individuals unrestricted access to AI-powered discovery without credit cards.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Transparent, Community-Auditable Prompts&lt;/strong&gt;:&lt;br&gt;
With open innovation, our prompt templates, conservation guardrails, and observation mechanics are fully visible and community-auditable. There are no hidden biases or opaque filters dictating how people experience their physical environment.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;During the development of NatureQuest-AI, pair programming and agentic workflows were leveraged to build the component library, establish Pydantic v2 data models, write 38 automated test cases, and solve real-world UI edge cases (such as preventing Markdown indentation code block triggers in Streamlit when rendering rich HTML quest cards).&lt;/p&gt;




&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Primary Track: Touch Grass&lt;/strong&gt; — Designed from the ground up to disconnect users from digital feeds and immerse them in everyday outdoor micro-ecology.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open-Source AI / Open Weights&lt;/strong&gt; — Native integration with Google's open-weight &lt;strong&gt;Gemma 2&lt;/strong&gt; running locally and privately via Ollama.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
