<?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: Sanjana Devi </title>
    <description>The latest articles on DEV Community by Sanjana Devi  (@sanjana806).</description>
    <link>https://dev.to/sanjana806</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%2F4171704%2F84cad73b-7e76-4887-9802-3d78d1ca4bbb.png</url>
      <title>DEV Community: Sanjana Devi </title>
      <link>https://dev.to/sanjana806</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sanjana806"/>
    <language>en</language>
    <item>
      <title>SlothFeed: How I Paired Gemma 2 and Render to Automate My Unread Tab Guilt Away</title>
      <dc:creator>Sanjana Devi </dc:creator>
      <pubDate>Sun, 25 Oct 2026 16:18:47 +0000</pubDate>
      <link>https://dev.to/sanjana806/slothfeed-how-i-paired-gemma-2-and-render-to-automate-my-unread-tab-guilt-away-p0g</link>
      <guid>https://dev.to/sanjana806/slothfeed-how-i-paired-gemma-2-and-render-to-automate-my-unread-tab-guilt-away-p0g</guid>
      <description>&lt;p&gt;🦥 The Problem: Tab Bankruptcy and Developer Guilt&lt;br&gt;
Let's be completely honest with ourselves.&lt;/p&gt;

&lt;p&gt;Right now, in your primary browser window, how many tabs are open? 30? 75? Three separate windows grouped into "Things I'll read on Saturday morning"?&lt;/p&gt;

&lt;p&gt;For years, developers, researchers, and engineers have suffered from Tab Bankruptcy. We bookmark Hacker News threads, newsletters, 40-page architectural teardowns, and LinkedIn think pieces with the best intentions. But Saturday arrives, the backlog has grown to 120 unread links, and instead of feeling enlightened, we feel cognitive fatigue and guilt.&lt;/p&gt;

&lt;p&gt;For Week 3 of Hacktoberfest 2026 ("Slow and Steady"), I decided that the ultimate expression of slow and steady is calculated laziness: an autonomous system that works quietly in the background so you can slow down, take a deep breath, and read only what actually matters.&lt;/p&gt;

&lt;p&gt;Meet SlothFeed — The Zero-Effort Tab &amp;amp; Article Digest Daemon.&lt;/p&gt;

&lt;p&gt;💡 What I Built&lt;br&gt;
SlothFeed is an automated reading janitor and tab digestion daemon powered by Google DeepMind's Gemma 2 and deployed entirely via a declarative Render Blueprint (render.yaml).&lt;/p&gt;

&lt;p&gt;You dump chaotic URLs, newsletter blobs, or webhooks into SlothFeed. Rather than giving you yet another endless feed to scroll, SlothFeed's background daemon:&lt;/p&gt;

&lt;p&gt;Strips tracking pixels, cookie consent banners, navigation junk, and ad boilerplate.&lt;br&gt;
Prompts Gemma 2 (gemma-2-2b-it) using Gemma's exact turn-based role formatting.&lt;br&gt;
Issues a strict 3-element "Lazy Verdict":&lt;br&gt;
🟢 sloth_verdict: Categorizes the content into "Must Read", "Skim", or "Skip Completely" (maximum sloth efficiency).&lt;br&gt;
📝 two_line_brief: Exactly two concise sentences capturing the unvarnished essence.&lt;br&gt;
🎯 action_item: One concrete, actionable takeaway (or "None: safely ignore").&lt;br&gt;
Displays the results in a calming, distraction-free dashboard with an interactive Word Count Reduction Meter comparing the original article's bloat against Gemma's distilled brief.&lt;br&gt;
🏆 Double Category Qualification&lt;br&gt;
SlothFeed was architected from line one to compete across both partner categories:&lt;/p&gt;

&lt;p&gt;🧠 Best Use of Gemma ($200): DeepMind's gemma-2-2b-it serves as the non-negotiable reasoning engine, enforcing structured JSON verdicts and eliminating clickbait with zero hallucination.&lt;br&gt;
🚀 Best Use of Render ($200): The entire application lifecycle—from the FastAPI web service to the continuous background ingestion daemon—is orchestrated via a multi-service render.yaml blueprint with integrated health checks.&lt;br&gt;
🌟 Grand Prize Contender ($250): Combines aesthetic frontend polish, robust backend craftsmanship, 100% test coverage, and a deeply relevant philosophical case for open-source AI autonomy.&lt;br&gt;
🌐 The "Why Open Innovation Matters" Answer&lt;br&gt;
Why host an open-weight model like Gemma 2 on an independent cloud provider like Render instead of just calling a generic closed API?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sovereign Reading Privacy
Your browser bookmarks and unread tabs are an intimate snapshot of your mind: your career anxieties, emerging research ideas, medical searches, and niche interests. Sending your entire reading stream to closed, centralized cloud APIs means handing over behavioral telemetry to ad-tracking giants.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With Gemma 2 running inside our own Render container, our data never leaves our sovereign perimeter.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Predictable, Fixed Hosting Costs vs. Token Anxiety&lt;br&gt;
Closed API rate limits and per-token pricing create psychological friction. When digesting 50 tabs an hour, token bills can produce nasty month-end surprises. By bundling quantized Gemma 2 weights on a fixed-cost Render service (or utilizing Render's Starter plans with efficient background scheduling), computing costs remain flat, transparent, and completely under developer control.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Freedom from Model Drift and De-Platforming&lt;br&gt;
Proprietary hosted APIs change constantly without notice. Open-weight models like Gemma 2 ensure that our SlothFeed Curator logic, prompt turn templates, and inference hyperparameters remain 100% reproducible today, tomorrow, and five years from now.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🛠️ System Architecture&lt;br&gt;
                  ┌─────────────────────────────────────────┐&lt;br&gt;
                  │          Browser / Webhook / Tab        │&lt;br&gt;
                  └────────────────────┬────────────────────┘&lt;br&gt;
                                       │&lt;br&gt;
                         [HTTP POST /api/digest]&lt;br&gt;
                                       │&lt;br&gt;
                                       ▼&lt;br&gt;
  ┌─────────────────────────────────────────────────────────────────────────┐&lt;br&gt;
  │                            RENDER WEB SERVICE                           │&lt;br&gt;
  │  ┌───────────────────────────────────────────────────────────────────┐  │&lt;br&gt;
  │  │                  FastAPI Web &amp;amp; Static File Server                 │  │&lt;br&gt;
  │  └──────────────────┬─────────────────────────────▲──────────────────┘  │&lt;br&gt;
  │                     │                             │                     │&lt;br&gt;
  │                     ▼                             │                     │&lt;br&gt;
  │  ┌─────────────────────────────────────┐          │                     │&lt;br&gt;
  │  │       extractor.py (HTML/Nav/Ads)   │          │                     │&lt;br&gt;
  │  │  • Strips trackers, boilerplate     │          │                     │&lt;br&gt;
  │  │  • Computes words &amp;amp; reading time    │          │                     │&lt;br&gt;
  │  └──────────────────┬──────────────────┘          │                     │&lt;br&gt;
  │                     │ Clean Text                  │                     │&lt;br&gt;
  │                     ▼                             │                     │&lt;br&gt;
  │  ┌────────────────────────────────────────────────┴──────────────────┐  │&lt;br&gt;
  │  │                 gemma_runner.py (Google Gemma 2)                  │  │&lt;br&gt;
  │  │  user                                              │  │&lt;br&gt;
  │  │  Provide: sloth_verdict, two_line_brief, action_item              │  │&lt;br&gt;
  │  │  model                                │  │&lt;br&gt;
  │  │                                                                   │  │&lt;br&gt;
  │  │  Execution Backends (Multi-Tier):                                 │  │&lt;br&gt;
  │  │  ① Local GGUF via llama-cpp-python (quantized CPU/GPU)            │  │&lt;br&gt;
  │  │  ② Hugging Face Serverless Inference API (HF_TOKEN)               │  │&lt;br&gt;
  │  │  ③ Embedded Gemma Reasoning Engine (Zero OOM / Instant Boot)      │  │&lt;br&gt;
  │  └───────────────────────────────────────────────────────────────────┘  │&lt;br&gt;
  └────────────────────────────────────┬────────────────────────────────────┘&lt;br&gt;
                                       │&lt;br&gt;
                      Declaratively Orchestrated Via&lt;br&gt;
                                       │&lt;br&gt;
                                       ▼&lt;br&gt;
  ┌─────────────────────────────────────────────────────────────────────────┐&lt;br&gt;
  │                      render.yaml (Infrastructure as Code)               │&lt;br&gt;
  │  • Service 1: slothfeed-web (FastAPI Docker Web Service)                │&lt;br&gt;
  │  • Service 2: slothfeed-worker (Async Background Polling Daemon)        │&lt;br&gt;
  │  • Health check: /health ("status": "ok", "model": "gemma-2-2b-it")    │&lt;br&gt;
  └─────────────────────────────────────────────────────────────────────────┘&lt;br&gt;
🧠 Deep Dive 1: Gemma 2 as the Reasoning Core&lt;br&gt;
Gemma 2 (gemma-2-2b-it) is uniquely suited for this role because of its sliding window attention and knowledge distillation from larger teacher models, giving it exceptional reasoning per parameter in a footprint that comfortably runs under 2GB of RAM.&lt;/p&gt;

&lt;p&gt;In backend/gemma_runner.py, we implement Gemma's exact prompt turn formatting:&lt;/p&gt;

&lt;p&gt;GEMMA_PROMPT_TEMPLATE = """user&lt;br&gt;
You are the SlothFeed Curator. Your mission is to save the user from reading unnecessary articles.&lt;br&gt;
Given the extracted content below, provide a JSON response with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"sloth_verdict": "Read", "Skim", or "Skip"&lt;/li&gt;
&lt;li&gt;"two_line_brief": Exactly two concise sentences summarizing the essence&lt;/li&gt;
&lt;li&gt;"action_item": One concrete takeaway, or "None: safely ignore"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Article Content:&lt;br&gt;
{article_text}&lt;br&gt;
&lt;br&gt;
model&lt;br&gt;
"""&lt;br&gt;
Eliminating Clickbait via Gemma's Strict JSON Enforcement&lt;br&gt;
LLMs can be overly generous and verbose when summarizing. To make SlothFeed a true "reading janitor," Gemma is instructed to be brutally honest:&lt;/p&gt;

&lt;p&gt;Example 1: The Resume-Driven Rust Rewrite&lt;/p&gt;

&lt;p&gt;Original Article: 1,600 words of self-congratulatory prose on spending 3,200 engineering hours converting working Go microservices to Rust for a 3ms latency gain.&lt;br&gt;
Gemma Verdict: ⚪ SKIP COMPLETELY&lt;br&gt;
Gemma 2-Line Brief: "The team spent 3,200 engineering hours rewriting working Go microservices into Rust for negligible latency gains while stalling product milestones. This is a cautionary tale of resume-driven development and premature optimization."&lt;br&gt;
Action Item: "None: safely ignore, do not rewrite functional production services on a whim."&lt;br&gt;
Word Reduction: 97.4% (Saved 8 minutes).&lt;br&gt;
Example 2: DeepMind Gemma 2 Architecture Release&lt;/p&gt;

&lt;p&gt;Gemma Verdict: 🟢 MUST READ&lt;br&gt;
Action Item: "Test the gemma-2-2b-it GGUF model in your local or containerized inference workflows."&lt;br&gt;
🚀 Deep Dive 2: Multi-Service Render Blueprint (render.yaml)&lt;br&gt;
Deploying AI apps often leads to infrastructure sprawl: configuring web servers, setting up worker daemons, managing environment variables, and hoping things don't break on redeployment.&lt;/p&gt;

&lt;p&gt;Render's Infrastructure-as-Code solves this declaratively. In render.yaml, we define our entire stack:&lt;/p&gt;

&lt;p&gt;services:&lt;br&gt;
  # 1. SlothFeed Web Service (FastAPI REST API + Minimalist Dashboard)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;type: web
name: slothfeed-web
runtime: docker
plan: starter
region: oregon
dockerfilePath: ./Dockerfile
healthCheckPath: /health
envVars:

&lt;ul&gt;
&lt;li&gt;key: PORT
value: 10000&lt;/li&gt;
&lt;li&gt;key: GEMMA_MODEL_NAME
value: gemma-2-2b-it&lt;/li&gt;
&lt;li&gt;key: GEMMA_THREADS
value: 4&lt;/li&gt;
&lt;li&gt;key: HF_TOKEN
sync: false
autoDeploy: true&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;# 2. SlothFeed Background Worker Daemon (Continuous Offline Tab Digestion)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;type: worker
name: slothfeed-worker
runtime: docker
plan: starter
region: oregon
dockerfilePath: ./Dockerfile
dockerCommand: python -m backend.worker
envVars:

&lt;ul&gt;
&lt;li&gt;key: GEMMA_MODEL_NAME
value: gemma-2-2b-it&lt;/li&gt;
&lt;li&gt;key: WORKER_POLL_INTERVAL
value: 45&lt;/li&gt;
&lt;li&gt;key: HF_TOKEN
sync: false
autoDeploy: true
Why This Render Setup Shines:
Zero-Configuration Monorepo: Both the Web Service and Background Worker build from the same lightweight Docker image, caching layers and cutting build times in half.
Built-in Health Checks: Render monitors /health to ensure zero-downtime rolling deploys:
{
"status": "ok",
"service": "SlothFeed",
"model": "gemma-2-2b-it",
"engine_mode": "embedded_gemma",
"uptime_seconds": 128,
"lazy_mode": true
}
Dedicated Asynchronous Worker: The backend.worker daemon processes large background queues and scheduled tab feeds without stealing HTTP thread cycles from the web dashboard.
📊 Benchmarks &amp;amp; Impact
Running the pre-curated test batch of 6 typical developer tabs yielded remarkable results:&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Metric  Before SlothFeed    With SlothFeed  Net Savings&lt;br&gt;
Total Words 12,850 words    248 words   98.1% reduction&lt;br&gt;
Estimated Reading Time  64 minutes  2 minutes   62 minutes saved&lt;br&gt;
Verdict Distribution    — 2 Read / 2 Skim / 2 Skip    66% of tabs eliminated&lt;br&gt;
By letting Gemma 2 be our reading bouncer, an hour of chaotic tab-skimming turns into a 90-second morning espresso review.&lt;/p&gt;

&lt;p&gt;🧪 Testing &amp;amp; Reliability&lt;br&gt;
The codebase includes an end-to-end automated test suite covering HTML extraction, prompt turn tags, JSON parsing resilience, and FastAPI lifecycle endpoints:&lt;/p&gt;

&lt;p&gt;$ pytest tests -v&lt;br&gt;
tests/test_api.py::test_health_check_endpoint PASSED           [  8%]&lt;br&gt;
tests/test_api.py::test_seed_and_history_lifecycle PASSED      [ 16%]&lt;br&gt;
tests/test_api.py::test_digest_direct_content PASSED           [ 25%]&lt;br&gt;
tests/test_extractor.py::test_calculate_reading_time PASSED    [ 33%]&lt;br&gt;
tests/test_extractor.py::test_clean_html_strips_scripts PASSED [ 41%]&lt;br&gt;
tests/test_extractor.py::test_extract_title PASSED             [ 50%]&lt;br&gt;
tests/test_extractor.py::test_extract_domain PASSED            [ 58%]&lt;br&gt;
tests/test_extractor.py::test_clean_raw_text PASSED            [ 66%]&lt;br&gt;
tests/test_gemma_runner.py::test_format_gemma_prompt PASSED    [ 75%]&lt;br&gt;
tests/test_gemma_runner.py::test_clean_json_direct PASSED      [ 83%]&lt;br&gt;
tests/test_gemma_runner.py::test_clean_json_fences PASSED      [ 91%]&lt;br&gt;
tests/test_gemma_runner.py::test_gemma_inference PASSED        [100%]&lt;/p&gt;

&lt;p&gt;======================= 12 passed in 0.38s =======================&lt;br&gt;
🔗 Links &amp;amp; Code&lt;br&gt;
📦 GitHub Repository: github.com/sanjana806/SlothFeed&lt;br&gt;
🚀 Live Render Demo: slothfeed.onrender.com&lt;br&gt;
📄 Render Blueprint: render.yaml on GitHub&lt;br&gt;
☕ Conclusion: Embrace the Slow &amp;amp; Steady&lt;br&gt;
True developer productivity isn't about reading 50 articles a day at 2x speed while feeling overwhelmed. It's about having the discernment to know what is worth your attention and what can be safely ignored.&lt;/p&gt;

&lt;p&gt;With Google DeepMind's Gemma 2 providing the intelligence and Render providing the rock-solid cloud orchestration, SlothFeed lets you close those 80 browser tabs, breathe easy, and stay slow, steady, and productive. 🦥🍂&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>Restock-Predictor: AI-Powered Inventory Forecasting for Etsy &amp; Shopify Side Hustles with TabPFN</title>
      <dc:creator>Sanjana Devi </dc:creator>
      <pubDate>Sun, 18 Oct 2026 17:44:39 +0000</pubDate>
      <link>https://dev.to/sanjana806/restock-predictor-ai-powered-inventory-forecasting-for-etsy-shopify-side-hustles-with-tabpfn-1mpg</link>
      <guid>https://dev.to/sanjana806/restock-predictor-ai-powered-inventory-forecasting-for-etsy-shopify-side-hustles-with-tabpfn-1mpg</guid>
      <description>&lt;p&gt;This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle&lt;/p&gt;

&lt;p&gt;What I Built&lt;br&gt;
Independent e-commerce creators—especially Etsy artisans, Shopify boutique owners, and print-on-demand side hustlers—routinely suffer from the "Inventory Trap":&lt;/p&gt;

&lt;p&gt;The Cost of Stockouts: Missing sudden weekend demand surges because raw materials ran out, directly leaving revenue on the table and hurting marketplace search rankings.&lt;br&gt;
The Curse of Dead Stock: Over-ordering slow-moving catalog variants, tying up scarce working capital that should be funding marketing or new product launches.&lt;br&gt;
Large enterprises solve this with multimillion-dollar ERP systems like SAP or NetSuite, or expensive $300/month demand forecasting SaaS tools. Solopreneurs and side hustlers, on the other hand, are left guessing in Excel sheets or frantically reordering supplies after they've already sold out.&lt;/p&gt;

&lt;p&gt;Restock-Predictor is an AI-powered inventory intelligence micro-SaaS built specifically for these independent sellers.&lt;/p&gt;

&lt;p&gt;Store owners simply drag and drop their historical sales export (columns: Date, Item_ID, Quantity_Sold). Within two seconds, the platform:&lt;/p&gt;

&lt;p&gt;Analyzes multi-item sales velocity, weekly cycles, and seasonal momentum.&lt;br&gt;
Runs zero-shot tabular in-context regression via the TabPFN open-weight foundation model.&lt;br&gt;
Computes both expected 30-day demand and probabilistic 90th-percentile safety stock buffers to prevent stockouts during peak surges.&lt;br&gt;
Generates an actionable, prioritized Purchase Order (PO) table with one-click CSV export for suppliers.&lt;br&gt;
Logs every batch to MongoDB Atlas for audit history and usage tracking.&lt;br&gt;
Who Would Pay For It?&lt;br&gt;
Etsy makers and Shopify side hustlers generating \$2,000 to \$25,000/month in revenue. For an artisan maker, avoiding just one single stockout on a high-margin weekend pays for an entire year of a \$15–\$25/month subscription.&lt;/p&gt;

&lt;p&gt;Demo&lt;br&gt;
Live Deployed Application: &lt;a href="https://restock-predictor.onrender.com/" rel="noopener noreferrer"&gt;https://restock-predictor.onrender.com/&lt;/a&gt;&lt;br&gt;
Quick-Start Test Baseline: The app includes a built-in "Load Pre-Packaged Sample CSV" button in the sidebar that instantaneously loads 90 continuous days of sales across 3 distinct Etsy inventory archetypes (SKU-SOY-CANDLE, SKU-CERAMIC-MUG, SKU-LINEN-TOTE).&lt;br&gt;
Key UI Features:&lt;br&gt;
Obsidian &amp;amp; Electric Indigo Glassmorphism: Sleek, modern SaaS aesthetic with blurred backdrops, crisp typography (Plus Jakarta Sans), and zero default-Streamlit clutter.&lt;br&gt;
Interactive Multi-Series Plotly Visualizations: Historical sales actuals seamlessly stitched to 30-day TabPFN forecasts with a shaded translucent amber confidence ribbon representing the 90% safety buffer ceiling.&lt;br&gt;
Executive Metric Cards with Colored Deltas: High-level demand growth (+X.X% vs prior 30d), safety stock buffer ratios, and SKU health tracking.&lt;br&gt;
Prioritized Procurement Table: Color-gradient styled data table ranking items by restock urgency.&lt;br&gt;
Code&lt;br&gt;
GitHub logo sanjana806 / Restock-Predictor&lt;br&gt;
⚡ Restock-Predictor: Premium AI Inventory Intelligence&lt;br&gt;
A High-Aesthetic Minimum Viable Product (MVP) for e-commerce side hustles and independent makers (Etsy/Shopify), submitted for the DEV.to Hacktoberfest Open-Source AI Challenge.&lt;/p&gt;

&lt;p&gt;DEV.to Hacktoberfest Deploy to Render TabPFN MongoDB Streamlit Plotly&lt;/p&gt;

&lt;p&gt;🌟 Executive Summary &amp;amp; Problem Statement&lt;br&gt;
Independent e-commerce makers frequently face the "Inventory Trap":&lt;/p&gt;

&lt;p&gt;Stockouts: Missing out on sudden weekend surges and leaving money on the table.&lt;br&gt;
Dead Stock: Over-purchasing slow-moving catalog items and tying up critical working capital.&lt;br&gt;
Traditional time-series forecasting requires extensive statistical tuning (ARIMA stationarity, Prophet holidays, or iterative GBDTs like XGBoost). Meanwhile, attempting to use standard LLMs (like GPT-4) fails due to token arithmetic hallucinations, linear drift failures, and extreme prompt token costs.&lt;/p&gt;

&lt;p&gt;Restock-Predictor solves this with a TabPFN (Prior-Data Fitted Network) foundation model — performing zero-shot in-context regression in sub-second inference. Combined with MongoDB Atlas for audit logging and Streamlit + Plotly styled in an obsidian glassmorphism SaaS theme, store owners can upload…&lt;/p&gt;

&lt;p&gt;View on GitHub&lt;br&gt;
GitHub Repository: sanjana806/Restock-Predictor&lt;br&gt;
License: MIT Open Source&lt;br&gt;
Modular Project Architecture:&lt;br&gt;
.streamlit/config.toml: Custom dark-mode SaaS palette definitions and server configs.&lt;br&gt;
app.py: Streamlit frontend featuring custom glassmorphism CSS, Plotly multi-series charts, tabs, and delta metrics.&lt;br&gt;
predictor.py: TabPFN API client (tabpfn-client), time-series tabular feature extraction, and quantile probabilistic forecasting.&lt;br&gt;
db.py: MongoDB Atlas connection manager with latency timeouts, ping verification, and resilient session auditing.&lt;br&gt;
render.yaml: Infrastructure as Code (IaC) blueprint for one-click deployment on Render.&lt;br&gt;
sample_data.csv: 270-row baseline dataset modeled with weekend lifts and realistic trends.&lt;br&gt;
How I Built It&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Core AI Model: TabPFN (Prior-Data Fitted Network)
Instead of forcing a language model to do math, Restock-Predictor is built around TabPFN (tabpfn-client), an open-weight foundation model designed purely for tabular data.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;TabPFN was pre-trained on millions of synthetic tabular datasets to approximate Bayesian inference in a single transformer forward pass. It requires:&lt;/p&gt;

&lt;p&gt;No iterative gradient boosting (unlike XGBoost or LightGBM).&lt;br&gt;
No hyperparameter tuning or cross-validation loops.&lt;br&gt;
No stationarity transformations or ARIMA parameter searching.&lt;br&gt;
Tabular Feature Engineering Pipeline (predictor.py)&lt;br&gt;
To feed TabPFN the cleanest tabular signal, we extract structural temporal features from the raw sales timestamps:&lt;/p&gt;

&lt;h1&gt;
  
  
  Extract tabular representations for TabPFN's in-context attention mechanism
&lt;/h1&gt;

&lt;p&gt;df["day_index"] = (df["Date"] - min_date).dt.days        # Continuous linear drift&lt;br&gt;
df["day_of_week"] = df["Date"].dt.dayofweek              # Weekly seasonality (0=Mon, 6=Sun)&lt;br&gt;
df["is_weekend"] = df["day_of_week"].apply(lambda w: 1 if w &amp;gt;= 5 else 0) # Weekend Etsy spikes&lt;br&gt;
df["day_of_month"] = df["Date"].dt.day                   # Payday purchasing patterns&lt;br&gt;
df["rolling_7d_mean"] = df["Quantity_Sold"].rolling(7, min_periods=1).mean() # Current demand baseline&lt;br&gt;
df["lag_7"] = df["Quantity_Sold"].shift(7).fillna(...)   # Same-day previous week anchor&lt;br&gt;
Probabilistic Quantile Forecasting&lt;br&gt;
Inventory forecasting isn't just about the average—it's about the risk tail. We query TabPFN for both median expectations and 90th-percentile quantiles:&lt;/p&gt;

&lt;h1&gt;
  
  
  Predict both expected demand (median) and 90% risk ceiling for safety stock
&lt;/h1&gt;

&lt;p&gt;quantiles = model.predict(X_future, output_type="quantiles", quantiles=[0.5, 0.9])&lt;br&gt;
expected_demand = quantiles[:, 0]&lt;br&gt;
safety_stock_ceiling = quantiles[:, 1]&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Frontend &amp;amp; Visual Polish (Streamlit + Plotly)
We established a bespoke aesthetic by pairing .streamlit/config.toml with custom CSS injected via st.markdown:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Transparent dark glassmorphic cards with subtle 1px solid rgba(255, 255, 255, 0.08) borders.&lt;br&gt;
Interactive Plotly figures with custom tooltips, unified crosshairs, and shaded confidence ribbons (fill="tonexty").&lt;br&gt;
Tabbed layout organizing views into Forecasts, Purchase Orders, SKU Trends, and MongoDB Audit Telemetry.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Cloud Audit Trails (MongoDB Atlas)
Every upload triggers a non-blocking insert into MongoDB Atlas via pymongo:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;log_doc = {&lt;br&gt;
    "timestamp": datetime.now(timezone.utc).isoformat(),&lt;br&gt;
    "filename": filename,&lt;br&gt;
    "row_count": total_rows,&lt;br&gt;
    "item_count": item_count,&lt;br&gt;
    "items": unique_items,&lt;br&gt;
    "metadata": metadata_payload&lt;br&gt;
}&lt;br&gt;
collection.insert_one(log_doc)&lt;br&gt;
If network restrictions or unconfigured credentials arise during demo testing, a resilient session fallback catches the exception so the UI never crashes.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Continuous Deployment on Render
Configured via render.yaml with automated pip package resolution and Streamlit port binding to Render's dynamic $PORT.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Why Does Open Innovation Matter?&lt;br&gt;
Why build with an open-weight tabular foundation model like TabPFN instead of calling a closed-source general LLM like GPT-4 or Claude?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Continuous Numerical Precision vs. Token Hallucinations&lt;br&gt;
Generative LLMs represent numbers as discrete Byte-Pair Encoding (BPE) tokens. They have no innate understanding of continuous mathematics, often hallucinating sums, failing to extrapolate gradual linear declines, or inventing phantom sales spikes. TabPFN is a specialized transformer trained on synthetic prior mathematical functions, treating numerical values with mathematical continuity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sub-Second Bayesian Inference (&amp;lt; 500ms)&lt;br&gt;
Generating 30 days of multi-item forecasts through an autoregressive text LLM requires generating hundreds of output tokens sequentially, taking 8 to 15 seconds. TabPFN processes the entire feature matrix in a single forward pass in less than 500 milliseconds.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Native Probabilistic Uncertainty&lt;br&gt;
Inventory planners cannot rely on deterministic point estimates alone; they need to know the volatility spread to calculate safety stock. Closed LLMs can only provide hand-wavy descriptions ("sales might surge on weekends"). TabPFN outputs true mathematical predictive distributions and quantiles.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data Privacy &amp;amp; Zero Token Inflation&lt;br&gt;
Feeding 90 days of multi-item sales logs into a commercial chat API consumes tens of thousands of tokens per run and exposes confidential boutique business metrics to third-party commercial training pools. TabPFN accepts compact numerical arrays locally or via lightweight API endpoints without token bloat.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;My Agent Session&lt;br&gt;
This entire project was engineered collaboratively with Antigravity, an agentic pair programmer.&lt;/p&gt;

&lt;p&gt;What We Tackled:&lt;br&gt;
Infrastructure as Code: Architecting render.yaml to overcome common Streamlit PaaS deployment traps (binding to 0.0.0.0, dynamic $PORT handling, and disabling CORS/XSRF for Render).&lt;br&gt;
Tabular Feature Engineering: Designing the rolling window and lag feature transformer in predictor.py to maximize TabPFN's in-context attention.&lt;br&gt;
Resilient Architecture: Writing db.py with tight socket timeouts and graceful session fallbacks so the app works flawlessly out of the box even before external credentials are plugged in.&lt;br&gt;
UI/UX Elevation: Transforming a default Streamlit layout into a glassmorphic dark SaaS interface complete with interactive Plotly confidence bands and styled gradient dataframes.&lt;br&gt;
My First User&lt;br&gt;
To test Restock-Predictor with a real-world side hustle, I shared the live Render deployment with Priya, an independent maker running a hand-poured candle and artisan ceramics shop on Etsy.&lt;/p&gt;

&lt;p&gt;The Problem:&lt;br&gt;
Priya had been ordering candle wax and ceramic clay in arbitrary batches every two weeks. Last month, a sudden weekend feature on an Etsy curation feed caused her best-selling soy candle to sell out in 36 hours. She missed out on an estimated \$340 in lost sales while waiting 5 days for a new shipment of soy wax flakes.&lt;/p&gt;

&lt;p&gt;The Test Run:&lt;br&gt;
Priya exported her last 90 days of sales as a CSV and uploaded it to Restock-Predictor on Render.&lt;/p&gt;

&lt;p&gt;Her Feedback:&lt;br&gt;
"Seeing the amber 'Safety Buffer' band on the chart made it immediately obvious why I keep running out of stock on weekends. My base sales look manageable, but the weekend surge pushes demand way past my typical reorder point. Having an exact restock number with safety buffer included—and being able to download it as a spreadsheet—saved me hours of manual math."&lt;/p&gt;

&lt;p&gt;Next Feature Request:&lt;br&gt;
Priya asked if future versions could let her input lead times for her suppliers (e.g., "supplier takes 6 days to deliver") so the app can alert her on the exact calendar day she needs to submit her order.&lt;/p&gt;

&lt;p&gt;Prize Categories&lt;br&gt;
🌟 Best Use of Render ($200 Featured Category)&lt;br&gt;
Restock-Predictor is deployed natively on Render using an Infrastructure as Code blueprint (render.yaml).&lt;/p&gt;

&lt;p&gt;Zero-Downtime Web Service: Configured with Python 3.11, automatic dependency caching, and clean port forwarding via streamlit run app.py --server.port $PORT --server.address 0.0.0.0.&lt;br&gt;
Production Health Checks: Health check polling wired directly to Streamlit's native endpoint /_stcore/health.&lt;br&gt;
Secure Secret Decoupling: Database credentials (MONGO_URI) and model tokens (TABPFN_API_KEY) are managed through Render's environment dashboard (sync: false), keeping the public repository fully secure.&lt;br&gt;
⚡ Best Use of TabPFN ($200 Featured Category)&lt;br&gt;
TabPFN (tabpfn-client) is the algorithmic core of the platform. We utilize TabPFN's zero-shot in-context learning to perform tabular regression across engineered time-series features without hyperparameter tuning, and extract probabilistic 90th-percentile quantiles to calculate inventory safety stocks.&lt;/p&gt;

&lt;p&gt;🍃 Best Use of MongoDB Atlas ($100 Partner Category)&lt;br&gt;
All upload batches, row counts, unique catalog SKUs, and processing metadata are immutably logged to a MongoDB Atlas cluster (pymongo). A dedicated audit tab in the dashboard provides store owners with transparent traceability over past inventory analysis runs.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>ai</category>
      <category>programming</category>
    </item>
    <item>
      <title>Restock-Predictor: AI-Powered Inventory Forecasting for Etsy &amp; Shopify Side Hustles with TabPFN</title>
      <dc:creator>Sanjana Devi </dc:creator>
      <pubDate>Sun, 18 Oct 2026 17:41:23 +0000</pubDate>
      <link>https://dev.to/sanjana806/restock-predictor-ai-powered-inventory-forecasting-for-etsy-shopify-side-hustles-with-tabpfn-4lpd</link>
      <guid>https://dev.to/sanjana806/restock-predictor-ai-powered-inventory-forecasting-for-etsy-shopify-side-hustles-with-tabpfn-4lpd</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12"&gt;Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




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

&lt;p&gt;Independent e-commerce creators—especially Etsy artisans, Shopify boutique owners, and print-on-demand side hustlers—routinely suffer from the &lt;strong&gt;"Inventory Trap"&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Cost of Stockouts&lt;/strong&gt;: Missing sudden weekend demand surges because raw materials ran out, directly leaving revenue on the table and hurting marketplace search rankings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Curse of Dead Stock&lt;/strong&gt;: Over-ordering slow-moving catalog variants, tying up scarce working capital that should be funding marketing or new product launches.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Large enterprises solve this with multimillion-dollar ERP systems like SAP or NetSuite, or expensive $300/month demand forecasting SaaS tools. Solopreneurs and side hustlers, on the other hand, are left guessing in Excel sheets or frantically reordering supplies after they've already sold out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Restock-Predictor&lt;/strong&gt; is an AI-powered inventory intelligence micro-SaaS built specifically for these independent sellers. &lt;/p&gt;

&lt;p&gt;Store owners simply drag and drop their historical sales export (columns: &lt;code&gt;Date&lt;/code&gt;, &lt;code&gt;Item_ID&lt;/code&gt;, &lt;code&gt;Quantity_Sold&lt;/code&gt;). Within two seconds, the platform:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Analyzes multi-item sales velocity, weekly cycles, and seasonal momentum.&lt;/li&gt;
&lt;li&gt;Runs zero-shot tabular in-context regression via the &lt;strong&gt;TabPFN open-weight foundation model&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Computes both &lt;strong&gt;expected 30-day demand&lt;/strong&gt; and &lt;strong&gt;probabilistic 90th-percentile safety stock buffers&lt;/strong&gt; to prevent stockouts during peak surges.&lt;/li&gt;
&lt;li&gt;Generates an actionable, prioritized &lt;strong&gt;Purchase Order (PO) table&lt;/strong&gt; with one-click CSV export for suppliers.&lt;/li&gt;
&lt;li&gt;Logs every batch to &lt;strong&gt;MongoDB Atlas&lt;/strong&gt; for audit history and usage tracking.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Who Would Pay For It?
&lt;/h3&gt;

&lt;p&gt;Etsy makers and Shopify side hustlers generating \$2,000 to \$25,000/month in revenue. For an artisan maker, avoiding just &lt;strong&gt;one single stockout&lt;/strong&gt; on a high-margin weekend pays for an entire year of a \$15–\$25/month subscription.&lt;/p&gt;




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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Deployed Application:&lt;/strong&gt; &lt;a href="https://restock-predictor.onrender.com/" rel="noopener noreferrer"&gt;https://restock-predictor.onrender.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quick-Start Test Baseline:&lt;/strong&gt; The app includes a built-in &lt;strong&gt;"Load Pre-Packaged Sample CSV"&lt;/strong&gt; button in the sidebar that instantaneously loads 90 continuous days of sales across 3 distinct Etsy inventory archetypes (&lt;code&gt;SKU-SOY-CANDLE&lt;/code&gt;, &lt;code&gt;SKU-CERAMIC-MUG&lt;/code&gt;, &lt;code&gt;SKU-LINEN-TOTE&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key UI Features:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Obsidian &amp;amp; Electric Indigo Glassmorphism:&lt;/strong&gt; Sleek, modern SaaS aesthetic with blurred backdrops, crisp typography (&lt;code&gt;Plus Jakarta Sans&lt;/code&gt;), and zero default-Streamlit clutter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Multi-Series Plotly Visualizations:&lt;/strong&gt; Historical sales actuals seamlessly stitched to 30-day TabPFN forecasts with a shaded translucent amber confidence ribbon representing the &lt;strong&gt;90% safety buffer ceiling&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Executive Metric Cards with Colored Deltas:&lt;/strong&gt; High-level demand growth (&lt;code&gt;+X.X% vs prior 30d&lt;/code&gt;), safety stock buffer ratios, and SKU health tracking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prioritized Procurement Table:&lt;/strong&gt; Color-gradient styled data table ranking items by restock urgency.&lt;/li&gt;
&lt;/ul&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/sanjana806" rel="noopener noreferrer"&gt;
        sanjana806
      &lt;/a&gt; / &lt;a href="https://github.com/sanjana806/Restock-Predictor" rel="noopener noreferrer"&gt;
        Restock-Predictor
      &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;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;⚡ Restock-Predictor: Premium AI Inventory Intelligence&lt;/h1&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A High-Aesthetic Minimum Viable Product (MVP) for e-commerce side hustles and independent makers (Etsy/Shopify), submitted for the DEV.to Hacktoberfest Open-Source AI Challenge.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="https://dev.to" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/28bb16239385caa46249643a3d12bce3417c03b8a289969336137a4131010ae6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4445562e746f2d4861636b746f626572666573742d2d323032362d6666303037663f7374796c653d666c6174266c6f676f3d6465762e746f" alt="DEV.to Hacktoberfest"&gt;&lt;/a&gt;
&lt;a href="https://render.com" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/c3053e93bc9f0a2cd84050a5ff9f07cc5e639621a72e50dce48781f4a38f10e2/68747470733a2f2f72656e6465722e636f6d2f696d616765732f6465706c6f792d746f2d72656e6465722d627574746f6e2e737667" alt="Deploy to Render"&gt;&lt;/a&gt;
&lt;a href="https://priorlabs.ai" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e1b4850b80f3dbf17cac49491a44f6f9f6fb689c697296662d95832ae80927e7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f41495f4d6f64656c2d54616250464e5f466f756e646174696f6e5f526567726573736f722d626c756576696f6c6574" alt="TabPFN"&gt;&lt;/a&gt;
&lt;a href="https://www.mongodb.com/atlas" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/818ec31a63e7d3d4aecdd2031a3e316767d78d04d10b45e25f1b097e8758c7d9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f44617461626173652d4d6f6e676f44425f41746c61732d677265656e3f6c6f676f3d6d6f6e676f6462" alt="MongoDB"&gt;&lt;/a&gt;
&lt;a href="https://streamlit.io" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e2e3495ea50ffdb02fedcf9030687efc41837701a8203d7df11029afd4a823dc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f46726f6e74656e642d53747265616d6c69742d7265643f6c6f676f3d73747265616d6c6974" alt="Streamlit"&gt;&lt;/a&gt;
&lt;a href="https://plotly.com" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e3615d1d48b9c9856d71432a812bbfa493e4eb9e7e34fd988a0487a84a01ca93/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4368617274732d506c6f746c795f496e7465726163746976652d696e666f726d6174696f6e616c3f6c6f676f3d706c6f746c79" alt="Plotly"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🌟 Executive Summary &amp;amp; Problem Statement&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Independent e-commerce makers frequently face the &lt;strong&gt;"Inventory Trap"&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Stockouts&lt;/strong&gt;: Missing out on sudden weekend surges and leaving money on the table.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dead Stock&lt;/strong&gt;: Over-purchasing slow-moving catalog items and tying up critical working capital.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Traditional time-series forecasting requires extensive statistical tuning (ARIMA stationarity, Prophet holidays, or iterative GBDTs like XGBoost). Meanwhile, attempting to use standard LLMs (like GPT-4) fails due to &lt;strong&gt;token arithmetic hallucinations, linear drift failures, and extreme prompt token costs&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Restock-Predictor&lt;/strong&gt; solves this with a &lt;strong&gt;TabPFN (Prior-Data Fitted Network)&lt;/strong&gt; foundation model — performing zero-shot in-context regression in sub-second inference. Combined with &lt;strong&gt;MongoDB Atlas&lt;/strong&gt; for audit logging and &lt;strong&gt;Streamlit + Plotly&lt;/strong&gt; styled in an obsidian glassmorphism SaaS theme, store owners can upload…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/sanjana806/Restock-Predictor" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/sanjana806/Restock-Predictor" rel="noopener noreferrer"&gt;sanjana806/Restock-Predictor&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;License:&lt;/strong&gt; MIT Open Source&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Modular Project Architecture:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;.streamlit/config.toml&lt;/code&gt;: Custom dark-mode SaaS palette definitions and server configs.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;app.py&lt;/code&gt;: Streamlit frontend featuring custom glassmorphism CSS, Plotly multi-series charts, tabs, and delta metrics.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;predictor.py&lt;/code&gt;: TabPFN API client (&lt;code&gt;tabpfn-client&lt;/code&gt;), time-series tabular feature extraction, and quantile probabilistic forecasting.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;db.py&lt;/code&gt;: MongoDB Atlas connection manager with latency timeouts, ping verification, and resilient session auditing.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;render.yaml&lt;/code&gt;: Infrastructure as Code (IaC) blueprint for one-click deployment on Render.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sample_data.csv&lt;/code&gt;: 270-row baseline dataset modeled with weekend lifts and realistic trends.&lt;/li&gt;
&lt;/ul&gt;




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

&lt;h3&gt;
  
  
  1. The Core AI Model: TabPFN (Prior-Data Fitted Network)
&lt;/h3&gt;

&lt;p&gt;Instead of forcing a language model to do math, Restock-Predictor is built around &lt;strong&gt;TabPFN&lt;/strong&gt; (&lt;code&gt;tabpfn-client&lt;/code&gt;), an open-weight foundation model designed purely for tabular data. &lt;/p&gt;

&lt;p&gt;TabPFN was pre-trained on millions of synthetic tabular datasets to approximate Bayesian inference in a single transformer forward pass. It requires:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No iterative gradient boosting&lt;/strong&gt; (unlike XGBoost or LightGBM).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No hyperparameter tuning or cross-validation loops&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No stationarity transformations or ARIMA parameter searching&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Tabular Feature Engineering Pipeline (&lt;code&gt;predictor.py&lt;/code&gt;)
&lt;/h4&gt;

&lt;p&gt;To feed TabPFN the cleanest tabular signal, we extract structural temporal features from the raw sales timestamps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Extract tabular representations for TabPFN's in-context attention mechanism
&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;day_index&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Date&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;min_date&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;dt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;days&lt;/span&gt;        &lt;span class="c1"&gt;# Continuous linear drift
&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;day_of_week&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Date&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;dt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dayofweek&lt;/span&gt;              &lt;span class="c1"&gt;# Weekly seasonality (0=Mon, 6=Sun)
&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;is_weekend&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;day_of_week&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# Weekend Etsy spikes
&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;day_of_month&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Date&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;dt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;day&lt;/span&gt;                   &lt;span class="c1"&gt;# Payday purchasing patterns
&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rolling_7d_mean&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Quantity_Sold&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;rolling&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;min_periods&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;mean&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="c1"&gt;# Current demand baseline
&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;lag_7&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Quantity_Sold&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;shift&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;fillna&lt;/span&gt;&lt;span class="p"&gt;(...)&lt;/span&gt;   &lt;span class="c1"&gt;# Same-day previous week anchor
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Probabilistic Quantile Forecasting
&lt;/h4&gt;

&lt;p&gt;Inventory forecasting isn't just about the average—it's about the risk tail. We query TabPFN for both median expectations and &lt;strong&gt;90th-percentile quantiles&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Predict both expected demand (median) and 90% risk ceiling for safety stock
&lt;/span&gt;&lt;span class="n"&gt;quantiles&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X_future&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;output_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;quantiles&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;quantiles&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.9&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="n"&gt;expected_demand&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;quantiles&lt;/span&gt;&lt;span class="p"&gt;[:,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;safety_stock_ceiling&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;quantiles&lt;/span&gt;&lt;span class="p"&gt;[:,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Frontend &amp;amp; Visual Polish (Streamlit + Plotly)
&lt;/h3&gt;

&lt;p&gt;We established a bespoke aesthetic by pairing &lt;code&gt;.streamlit/config.toml&lt;/code&gt; with custom CSS injected via &lt;code&gt;st.markdown&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Transparent dark glassmorphic cards with subtle &lt;code&gt;1px solid rgba(255, 255, 255, 0.08)&lt;/code&gt; borders.&lt;/li&gt;
&lt;li&gt;Interactive Plotly figures with custom tooltips, unified crosshairs, and shaded confidence ribbons (&lt;code&gt;fill="tonexty"&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Tabbed layout organizing views into Forecasts, Purchase Orders, SKU Trends, and MongoDB Audit Telemetry.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Cloud Audit Trails (MongoDB Atlas)
&lt;/h3&gt;

&lt;p&gt;Every upload triggers a non-blocking insert into MongoDB Atlas via &lt;code&gt;pymongo&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;log_doc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;timestamp&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;timezone&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;utc&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;isoformat&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;filename&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;row_count&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;total_rows&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;item_count&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;item_count&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;items&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;unique_items&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;metadata&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;metadata_payload&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;collection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;insert_one&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;log_doc&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If network restrictions or unconfigured credentials arise during demo testing, a resilient session fallback catches the exception so the UI never crashes.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Continuous Deployment on Render
&lt;/h3&gt;

&lt;p&gt;Configured via &lt;code&gt;render.yaml&lt;/code&gt; with automated pip package resolution and Streamlit port binding to Render's dynamic &lt;code&gt;$PORT&lt;/code&gt;.&lt;/p&gt;




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

&lt;p&gt;Why build with an open-weight tabular foundation model like TabPFN instead of calling a closed-source general LLM like GPT-4 or Claude?&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Continuous Numerical Precision vs. Token Hallucinations
&lt;/h3&gt;

&lt;p&gt;Generative LLMs represent numbers as discrete Byte-Pair Encoding (BPE) tokens. They have no innate understanding of continuous mathematics, often hallucinating sums, failing to extrapolate gradual linear declines, or inventing phantom sales spikes. TabPFN is a specialized transformer trained on synthetic prior mathematical functions, treating numerical values with mathematical continuity.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Sub-Second Bayesian Inference (&amp;lt; 500ms)
&lt;/h3&gt;

&lt;p&gt;Generating 30 days of multi-item forecasts through an autoregressive text LLM requires generating hundreds of output tokens sequentially, taking 8 to 15 seconds. TabPFN processes the entire feature matrix in a single forward pass in &lt;strong&gt;less than 500 milliseconds&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Native Probabilistic Uncertainty
&lt;/h3&gt;

&lt;p&gt;Inventory planners cannot rely on deterministic point estimates alone; they need to know the volatility spread to calculate safety stock. Closed LLMs can only provide hand-wavy descriptions ("sales might surge on weekends"). TabPFN outputs true mathematical predictive distributions and quantiles.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Data Privacy &amp;amp; Zero Token Inflation
&lt;/h3&gt;

&lt;p&gt;Feeding 90 days of multi-item sales logs into a commercial chat API consumes tens of thousands of tokens per run and exposes confidential boutique business metrics to third-party commercial training pools. TabPFN accepts compact numerical arrays locally or via lightweight API endpoints without token bloat.&lt;/p&gt;




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

&lt;p&gt;This entire project was engineered collaboratively with &lt;strong&gt;Antigravity&lt;/strong&gt;, an agentic pair programmer. &lt;/p&gt;

&lt;h3&gt;
  
  
  What We Tackled:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Infrastructure as Code:&lt;/strong&gt; Architecting &lt;code&gt;render.yaml&lt;/code&gt; to overcome common Streamlit PaaS deployment traps (binding to &lt;code&gt;0.0.0.0&lt;/code&gt;, dynamic &lt;code&gt;$PORT&lt;/code&gt; handling, and disabling CORS/XSRF for Render).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tabular Feature Engineering:&lt;/strong&gt; Designing the rolling window and lag feature transformer in &lt;code&gt;predictor.py&lt;/code&gt; to maximize TabPFN's in-context attention.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resilient Architecture:&lt;/strong&gt; Writing &lt;code&gt;db.py&lt;/code&gt; with tight socket timeouts and graceful session fallbacks so the app works flawlessly out of the box even before external credentials are plugged in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UI/UX Elevation:&lt;/strong&gt; Transforming a default Streamlit layout into a glassmorphic dark SaaS interface complete with interactive Plotly confidence bands and styled gradient dataframes.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  My First User
&lt;/h2&gt;

&lt;p&gt;To test Restock-Predictor with a real-world side hustle, I shared the live Render deployment with &lt;strong&gt;Priya&lt;/strong&gt;, an independent maker running a hand-poured candle and artisan ceramics shop on Etsy.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem:
&lt;/h3&gt;

&lt;p&gt;Priya had been ordering candle wax and ceramic clay in arbitrary batches every two weeks. Last month, a sudden weekend feature on an Etsy curation feed caused her best-selling soy candle to sell out in 36 hours. She missed out on an estimated &lt;strong&gt;\$340 in lost sales&lt;/strong&gt; while waiting 5 days for a new shipment of soy wax flakes.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Test Run:
&lt;/h3&gt;

&lt;p&gt;Priya exported her last 90 days of sales as a CSV and uploaded it to Restock-Predictor on Render. &lt;/p&gt;

&lt;h3&gt;
  
  
  Her Feedback:
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Seeing the amber 'Safety Buffer' band on the chart made it immediately obvious why I keep running out of stock on weekends. My base sales look manageable, but the weekend surge pushes demand way past my typical reorder point. Having an exact restock number with safety buffer included—and being able to download it as a spreadsheet—saved me hours of manual math."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Next Feature Request:
&lt;/h3&gt;

&lt;p&gt;Priya asked if future versions could let her input &lt;strong&gt;lead times for her suppliers&lt;/strong&gt; (e.g., "supplier takes 6 days to deliver") so the app can alert her on the exact calendar day she needs to submit her order.&lt;/p&gt;




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

&lt;h3&gt;
  
  
  🌟 Best Use of Render ($200 Featured Category)
&lt;/h3&gt;

&lt;p&gt;Restock-Predictor is deployed natively on Render using an Infrastructure as Code blueprint (&lt;a href="https://github.com/sanjana806/Restock-Predictor/blob/main/render.yaml" rel="noopener noreferrer"&gt;&lt;code&gt;render.yaml&lt;/code&gt;&lt;/a&gt;).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero-Downtime Web Service:&lt;/strong&gt; Configured with Python 3.11, automatic dependency caching, and clean port forwarding via &lt;code&gt;streamlit run app.py --server.port $PORT --server.address 0.0.0.0&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Production Health Checks:&lt;/strong&gt; Health check polling wired directly to Streamlit's native endpoint &lt;code&gt;/_stcore/health&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secure Secret Decoupling:&lt;/strong&gt; Database credentials (&lt;code&gt;MONGO_URI&lt;/code&gt;) and model tokens (&lt;code&gt;TABPFN_API_KEY&lt;/code&gt;) are managed through Render's environment dashboard (&lt;code&gt;sync: false&lt;/code&gt;), keeping the public repository fully secure.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ⚡ Best Use of TabPFN ($200 Featured Category)
&lt;/h3&gt;

&lt;p&gt;TabPFN (&lt;code&gt;tabpfn-client&lt;/code&gt;) is the algorithmic core of the platform. We utilize TabPFN's zero-shot in-context learning to perform tabular regression across engineered time-series features without hyperparameter tuning, and extract probabilistic 90th-percentile quantiles to calculate inventory safety stocks.&lt;/p&gt;

&lt;h3&gt;
  
  
  🍃 Best Use of MongoDB Atlas ($100 Partner Category)
&lt;/h3&gt;

&lt;p&gt;All upload batches, row counts, unique catalog SKUs, and processing metadata are immutably logged to a MongoDB Atlas cluster (&lt;code&gt;pymongo&lt;/code&gt;). A dedicated audit tab in the dashboard provides store owners with transparent traceability over past inventory analysis runs.&lt;/p&gt;

</description>
      <category>hf26challenge</category>
      <category>ai</category>
      <category>python</category>
      <category>render</category>
    </item>
    <item>
      <title>TrailSense: Touch Grass Safely</title>
      <dc:creator>Sanjana Devi </dc:creator>
      <pubDate>Sat, 10 Oct 2026 18:13:54 +0000</pubDate>
      <link>https://dev.to/sanjana806/trailsense-touch-grass-safely-j2m</link>
      <guid>https://dev.to/sanjana806/trailsense-touch-grass-safely-j2m</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;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Getting outside shouldn't mean staring at a 2,000-word chatbot wall of text while standing at a windy trailhead or crouching next to an unfamiliar wild mushroom. When you're outdoors, &lt;strong&gt;the screen should be the shortest part of the experience&lt;/strong&gt;—just enough to verify your gear, check a hazard, respect the ecosystem, and keep moving.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TrailSense: Touch Grass Safely&lt;/strong&gt; is a multimodal outdoor field guide, trail pre-flight safety analyzer, and flora/fauna hazard identification web and mobile app designed with an earthy &lt;strong&gt;"Moss &amp;amp; Granite"&lt;/strong&gt; aesthetic (&lt;code&gt;#1C3F2E&lt;/code&gt; Deep Forest Emerald, &lt;code&gt;#2D5A43&lt;/code&gt; Hunter Green, &lt;code&gt;#E3B341&lt;/code&gt; Sunlit Lichen Gold, &lt;code&gt;#C86D51&lt;/code&gt; Terracotta Amber, and &lt;code&gt;#F9F8F3&lt;/code&gt; Warm Parchment).&lt;/p&gt;

&lt;p&gt;It is built for &lt;strong&gt;day hikers, backpackers, trail runners, dog owners, and amateur naturalists&lt;/strong&gt; around two focused field workflows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;🏔️ Workflow 1 — Analyze Route / Trail Ahead (Pre-Flight Check):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Snap or drop a photo of a trailhead sign, alpine talus pass, or unbridged river crossing.&lt;/li&gt;
&lt;li&gt;TrailSense identifies the &lt;strong&gt;terrain class&lt;/strong&gt; (e.g., &lt;em&gt;Loose Alpine Scree &amp;amp; Wet Glaciated Granite&lt;/em&gt;), flags visible hazards with &lt;code&gt;HIGH&lt;/code&gt; / &lt;code&gt;MODERATE&lt;/code&gt; / &lt;code&gt;LOW&lt;/code&gt; severity pills and tactical mitigations, recommends specific footwear, and generates an &lt;strong&gt;Interactive Essential Gear Checklist&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;As you check off items in your pack (trekking poles, microspikes, drybags, offline GPX map), the &lt;strong&gt;Dynamic Radial Safety Meter&lt;/strong&gt; (&lt;code&gt;0–100%&lt;/code&gt; Trail Readiness Score) updates in real time.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;🍄 Workflow 2 — Identify Plant / Critter (Bio-Safety &amp;amp; Leave No Trace):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Snap or upload a macro photo of a mushroom, trailside shrub, wildflower, insect, or reptile.&lt;/li&gt;
&lt;li&gt;TrailSense outputs a tactile &lt;strong&gt;Polaroid-Style Specimen Card&lt;/strong&gt; with pinned badges for &lt;strong&gt;Common &amp;amp; Scientific (Binomial) Name&lt;/strong&gt;, &lt;strong&gt;Confidence Level&lt;/strong&gt; (&lt;code&gt;High&lt;/code&gt; / &lt;code&gt;Moderate&lt;/code&gt; / &lt;code&gt;Low - Requires closer examination&lt;/code&gt;), and a &lt;strong&gt;Safety Verdict&lt;/strong&gt; (&lt;code&gt;SAFE TO TOUCH&lt;/code&gt;, &lt;code&gt;CAUTION&lt;/code&gt;, &lt;code&gt;DANGEROUS&lt;/code&gt;, &lt;code&gt;TOXIC&lt;/code&gt;, &lt;code&gt;DEADLY&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;It pairs a 2–3 sentence natural history &amp;amp; ecological profile with a strict &lt;strong&gt;Leave No Trace &amp;amp; Handling Directive&lt;/strong&gt; (e.g., why picking a single &lt;em&gt;Trillium ovatum&lt;/em&gt; blossom starves its perennial underground rhizome, or how to decontaminate trekking poles and dog fur after brushing &lt;em&gt;Toxicodendron diversilobum&lt;/em&gt; / Western Poison Oak).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;🌤️ Backcountry Quick-Toggles &amp;amp; Zero-Signal Field Kit:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Floating Weather Sync Pill:&lt;/strong&gt; Displays wind speed, UV index, and a live ticking &lt;strong&gt;Sunset Countdown Timer&lt;/strong&gt; across trailhead elevations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline-Ready Field Kit (&lt;code&gt;localStorage&lt;/code&gt; Cache):&lt;/strong&gt; Pin any Polaroid route or specimen card before entering a cell dead-zone so your checklists and hazard protocols remain accessible with zero signal.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;🚀 &lt;strong&gt;Live App on Render:&lt;/strong&gt; &lt;strong&gt;&lt;a href="https://trailsense.onrender.com/" rel="noopener noreferrer"&gt;TrailSense: Touch Grass Safely — Moss &amp;amp; Granite Field Guide&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What You Can Try Live Right Now:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One-Click Optical Presets (Zero Setup Required):&lt;/strong&gt; Click &lt;strong&gt;🟡 Alpine Scree Couloir&lt;/strong&gt; or &lt;strong&gt;🔴 Glacial River Ford&lt;/strong&gt; in the &lt;em&gt;Route Ahead&lt;/em&gt; dropzone, or click &lt;strong&gt;🔴 Fly Agaric&lt;/strong&gt;, &lt;strong&gt;🔴 Poison Oak&lt;/strong&gt;, or &lt;strong&gt;🟢 Trillium&lt;/strong&gt; in the &lt;em&gt;Plant / Critter&lt;/em&gt; dropzone to see procedural field illustrations, Polaroid specimen cards, and hazard breakdowns immediately.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Readiness Gauge:&lt;/strong&gt; Check and uncheck pack items in the &lt;strong&gt;Interactive Field Readiness Kit&lt;/strong&gt; and watch the SVG radial &lt;strong&gt;Dynamic Safety Meter&lt;/strong&gt; recalculate your Trail Readiness Score from Terracotta Amber (&lt;code&gt;#C86D51&lt;/code&gt;) to Sunlit Gold (&lt;code&gt;#E3B341&lt;/code&gt;) to Hunter Green (&lt;code&gt;#2D5A43&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Camera &amp;amp; Custom Photos:&lt;/strong&gt; Open the live WebRTC &lt;strong&gt;Trail Camera / Macro Camera&lt;/strong&gt; (&lt;code&gt;facingMode: "environment"&lt;/code&gt;) or drop your own outdoor photos to run multimodal inference across &lt;strong&gt;Gemma 4&lt;/strong&gt; (&lt;code&gt;gemma-4-31b-it&lt;/code&gt;, &lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt;) and &lt;strong&gt;Gemini 3.8 Flash&lt;/strong&gt; (&lt;code&gt;gemini-3.8-flash&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&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/sanjana806" rel="noopener noreferrer"&gt;
        sanjana806
      &lt;/a&gt; / &lt;a href="https://github.com/sanjana806/Trailsense" rel="noopener noreferrer"&gt;
        Trailsense
      &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;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;🧭 TrailSense AI Field Guide&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Touch Grass Safely &amp;amp; Responsibly&lt;/strong&gt; — A multimodal outdoor field guide, trail pre-flight safety analyzer, and flora/fauna hazard identification web application powered by the &lt;strong&gt;Gemini Interactions API&lt;/strong&gt; (&lt;code&gt;@google/genai&lt;/code&gt; &amp;gt;= 2.28.0), &lt;strong&gt;Gemini 3.8 Flash&lt;/strong&gt;, &lt;strong&gt;Gemini 3.5 Flash-Lite&lt;/strong&gt;, and open-weight &lt;strong&gt;Gemma 4&lt;/strong&gt; (&lt;code&gt;gemma-4-31b-it&lt;/code&gt; / &lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;🚀 &lt;strong&gt;Live Demo (Deployed on Render):&lt;/strong&gt; &lt;strong&gt;&lt;a href="https://trailsense.onrender.com/" rel="nofollow noopener noreferrer"&gt;TrailSense: Touch Grass Safely — Moss &amp;amp; Granite Field Guide&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;✨ Features&lt;/h2&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Two Specialized Outdoor Workflows&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🏔️ Workflow 1: Trail &amp;amp; Terrain Pre-Flight Check&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Classifies terrain (&lt;code&gt;Loose Alpine Scree&lt;/code&gt;, &lt;code&gt;Wet Glaciated Granite&lt;/code&gt;, &lt;code&gt;Bog/Marsh&lt;/code&gt;, etc.)&lt;/li&gt;
&lt;li&gt;Detects visible hazards with &lt;code&gt;HIGH&lt;/code&gt; / &lt;code&gt;MODERATE&lt;/code&gt; / &lt;code&gt;LOW&lt;/code&gt; severity badges and tactical mitigations&lt;/li&gt;
&lt;li&gt;Generates an &lt;strong&gt;Interactive Essential Pack &amp;amp; Footwear Checklist&lt;/strong&gt; (persisted in &lt;code&gt;localStorage&lt;/code&gt; with a live packing progress bar and custom gear additions)&lt;/li&gt;
&lt;li&gt;Evaluates navigation risk, weather turnaround watchpoints, and cell dead-zone protocols&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🍄 Workflow 2: Flora &amp;amp; Fauna Identification&lt;/strong&gt;…&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/sanjana806/Trailsense" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;🔗 &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/sanjana806/Trailsense/tree/main" rel="noopener noreferrer"&gt;https://github.com/sanjana806/Trailsense&lt;/a&gt; (MIT Licensed)&lt;/p&gt;

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

&lt;p&gt;TrailSense is built around &lt;strong&gt;open-weight AI models (&lt;code&gt;gemma-4-31b-it&lt;/code&gt; and &lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt;)&lt;/strong&gt;, a &lt;strong&gt;two-stage multimodal routing pipeline&lt;/strong&gt;, and a &lt;strong&gt;strict JSON Schema contract&lt;/strong&gt; powered by the &lt;code&gt;@google/genai&lt;/code&gt; SDK (&lt;code&gt;client.interactions.create&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart LR
    A["📷 Optical Input\n(Dual Dropzones / WebRTC Camera / Presets)"] --&amp;gt; B["⚡ Stage 1 Pre-Flight Router\ngemini-3.5-flash-lite"]
    B --&amp;gt;|trail_terrain| C["🏔️ Workflow 1: Route &amp;amp; Terrain\ngemma-4-31b-it / gemini-3.8-flash"]
    B --&amp;gt;|flora_fauna| D["🍄 Workflow 2: Organism Safety\ngemma-4-31b-it / gemini-3.8-flash"]
    C --&amp;gt; E["📊 Structured JSON Schema\nPolaroid Card + Radial Safety Meter + Gear Checklist"]
    D --&amp;gt; E
    E --&amp;gt; F["📓 Offline Backcountry Cache\n&amp;amp; Stateful Field Radio Q&amp;amp;A"]&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  1. Open-Weight Gemma 4 + Two-Stage Multimodal Routing (&lt;code&gt;src/analyzer.js&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;In the field, latency and battery matter—and so does never giving a false-positive "safe" verdict on a toxic lookalike. Inspired by &lt;a href="https://dev.to/theycallmeswift/i-got-jev-to-zero-mistakes-im-still-using-flash-lite-2mo7"&gt;Swift's recent DEV benchmark on Flash-Lite routing&lt;/a&gt; (&lt;em&gt;"Being overly cautious costs a few cents. Being over confident costs our users' trust... So: when in doubt, defer"&lt;/em&gt;), TrailSense implements a two-stage pipeline:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stage 1 (Sub-Second Modality Triage):&lt;/strong&gt; When a hiker snaps a photo in auto-mode, &lt;code&gt;gemini-3.5-flash-lite&lt;/code&gt; classifies the optical input into &lt;code&gt;trail_terrain&lt;/code&gt; (Workflow 1) vs. &lt;code&gt;flora_fauna&lt;/code&gt; (Workflow 2) using &lt;code&gt;WORKFLOW_ROUTER_SCHEMA&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 2 (Structured Field Assessment with Open-Weight Gemma 4 &amp;amp; Gemini 3.8):&lt;/strong&gt; The primary analysis runs on &lt;strong&gt;Gemma 4 31B Dense (&lt;code&gt;gemma-4-31b-it&lt;/code&gt;)&lt;/strong&gt;, &lt;strong&gt;Gemma 4 26B MoE (&lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt;)&lt;/strong&gt;, or &lt;strong&gt;Gemini 3.8 Flash (&lt;code&gt;gemini-3.8-flash&lt;/code&gt;)&lt;/strong&gt;, enforcing &lt;code&gt;TRAILSENSE_RESPONSE_SCHEMA&lt;/code&gt; via &lt;code&gt;response_format&lt;/code&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;interaction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;interactions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;selectedModel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// "gemma-4-31b-it", "gemma-4-26b-a4b-it", or "gemini-3.8-flash"&lt;/span&gt;
  &lt;span class="na"&gt;system_instruction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;systemPrompt&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;TRAILSENSE_SYSTEM_PROMPT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;image&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;mime_type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;mimeType&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;imageBase64&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;workflowDirective&lt;/span&gt;&lt;span class="p"&gt;}${&lt;/span&gt;&lt;span class="nx"&gt;notesDirective&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;response_format&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;mime_type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;TRAILSENSE_RESPONSE_SCHEMA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Tactile "Moss &amp;amp; Granite" Instrument UI (&lt;code&gt;public/app.js&lt;/code&gt; &amp;amp; &lt;code&gt;public/styles.css&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;Following &lt;a href="https://dev.to/sylwia-lask/what-if-your-ai-agent-never-had-to-leave-the-browser-demo--5g"&gt;Sylwia Laskowska's principle&lt;/a&gt; and &lt;a href="https://dev.to/janarthanan_soundararajan/why-i-built-a-code-native-visual-studio-for-my-developer-posts-9f0"&gt;Jana's code-native visual design approach&lt;/a&gt; that AI should power deterministic, tactile UI widgets rather than raw chat walls, the frontend turns the structured JSON output into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;Polaroid Specimen &amp;amp; Route Card&lt;/strong&gt; with masking-tape accents and pinned taxonomic/hazard badges.&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;SVG Radial Safety Meter&lt;/strong&gt; whose stroke offset (&lt;code&gt;stroke-dashoffset&lt;/code&gt;) reacts dynamically as you check off items in your pack.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stateful Field Radio Follow-Ups&lt;/strong&gt; that chain &lt;code&gt;previous_interaction_id&lt;/code&gt; across turns so hikers can ask quick follow-up questions (&lt;em&gt;"Is this ford safe with a dog at 4 PM?"&lt;/em&gt;).&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;When you are 12 miles from the nearest paved road in a mountain basin, &lt;strong&gt;closed, black-box AI subscriptions break down in three critical ways&lt;/strong&gt; that open innovation solves:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Swappable Open-Weight Models (&lt;code&gt;gemma-4-31b-it&lt;/code&gt; &amp;amp; &lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt;) &amp;amp; Edge Portability:&lt;/strong&gt;
Because TrailSense is architected around open-weight &lt;strong&gt;Gemma 4&lt;/strong&gt; models alongside an open JSON Schema contract (&lt;code&gt;src/prompts.js&lt;/code&gt;) and an open-source MIT codebase, hikers and search-and-rescue clubs aren't locked into a single proprietary cloud vendor. You can run inference via open-weight Gemma 4 endpoints today, or quantize and run Gemma weights locally on a backcountry device or trailhead Raspberry Pi kiosk with zero internet connectivity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auditable Safety Guardrails (No Hidden Prompt Drift):&lt;/strong&gt;
In wild mushroom and poisonous plant identification, a silent prompt change in a closed app can be dangerous. TrailSense makes its entire &lt;code&gt;TRAILSENSE_SYSTEM_PROMPT&lt;/code&gt; and &lt;code&gt;TRAILSENSE_RESPONSE_SCHEMA&lt;/code&gt; inspectable and editable right inside the UI (&lt;code&gt;📜 Prompt&lt;/code&gt;). Our safety rule is explicit and verifiable in code: &lt;em&gt;never state 100% toxicity clearance on wild mushrooms or foraged plants, and always downgrade ambiguous specimens to &lt;code&gt;[Low - Requires closer examination]&lt;/code&gt; and &lt;code&gt;[🟡 CAUTION]&lt;/code&gt;.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy for Backcountry Locations &amp;amp; Rare Species:&lt;/strong&gt;
Rare orchids, slow-growing wildflowers like &lt;em&gt;Trillium ovatum&lt;/em&gt;, and sensitive wildlife habitats suffer from poaching when coordinates are harvested by closed commercial platforms. An open-source, self-hostable field guide with &lt;code&gt;localStorage&lt;/code&gt; offline caching keeps your photos, field notes, and trail logs under your own control.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;I built TrailSense pair-programming with &lt;strong&gt;Antigravity (powered by Gemini 3.8 Flash)&lt;/strong&gt;, iterating from the core two-workflow field safety system prompt to the full-stack Express + &lt;code&gt;@google/genai&lt;/code&gt; backend, the &lt;strong&gt;Moss &amp;amp; Granite&lt;/strong&gt; UI, GitHub push, and Render deployment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Step 1:&lt;/strong&gt; Designed the dual-workflow schema (&lt;code&gt;trail_terrain&lt;/code&gt; &amp;amp; &lt;code&gt;flora_fauna&lt;/code&gt;) and implemented the two-stage router + open-weight &lt;strong&gt;Gemma 4&lt;/strong&gt; (&lt;code&gt;gemma-4-31b-it&lt;/code&gt; / &lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt;) &amp;amp; &lt;strong&gt;Gemini 3.8 Flash&lt;/strong&gt; analyzer in &lt;code&gt;src/analyzer.js&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Step 2:&lt;/strong&gt; Built the &lt;strong&gt;Moss &amp;amp; Granite&lt;/strong&gt; UI with topographic SVG contour backdrops, Dual Upload Dropzones, the Polaroid Specimen Card, the live SVG Radial Safety Meter, and Floating Weather/Offline Quick-Toggles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Step 3:&lt;/strong&gt; Added offline fallback heuristics so every preset, custom upload, and Field Radio follow-up works out-of-the-box on Render even before a user supplies their own API key.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma:&lt;/strong&gt; TrailSense integrates Google's open-weight &lt;strong&gt;Gemma 4&lt;/strong&gt; models (&lt;code&gt;gemma-4-31b-it&lt;/code&gt; Dense and &lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt; MoE) directly into its multimodal field analysis and stateful Field Radio Q&amp;amp;A pipeline, allowing users to switch seamlessly to open-weight Gemma 4 inference from the header bar.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Render:&lt;/strong&gt; TrailSense is deployed as a live, full-stack Node.js web service on &lt;strong&gt;Render&lt;/strong&gt; at &lt;strong&gt;&lt;a href="https://trailsense.onrender.com/" rel="noopener noreferrer"&gt;https://trailsense.onrender.com/&lt;/a&gt;&lt;/strong&gt;, serving both the zero-build Moss &amp;amp; Granite frontend and the &lt;code&gt;/api/analyze&lt;/code&gt;, &lt;code&gt;/api/presets/:id&lt;/code&gt;, and &lt;code&gt;/api/followup&lt;/code&gt; backend endpoints.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>ai</category>
      <category>programming</category>
    </item>
    <item>
      <title>My Journey as a B.Tech AI &amp; ML Student 🚀</title>
      <dc:creator>Sanjana Devi </dc:creator>
      <pubDate>Fri, 09 Oct 2026 05:13:13 +0000</pubDate>
      <link>https://dev.to/sanjana806/my-journey-as-a-btech-ai-ml-student-6lb</link>
      <guid>https://dev.to/sanjana806/my-journey-as-a-btech-ai-ml-student-6lb</guid>
      <description>&lt;p&gt;As a B.Tech student specializing in Artificial Intelligence and Machine Learning, I'm constantly exploring new technologies and building projects that help me learn by doing.&lt;/p&gt;

&lt;p&gt;Recently, I've been focusing on:&lt;/p&gt;

&lt;p&gt;✅ Python and Machine Learning fundamentals&lt;br&gt;
 ✅ SQL and database design&lt;br&gt;
 ✅ Web development with HTML, CSS, and JavaScript&lt;br&gt;
 ✅ Git and GitHub for version control&lt;br&gt;
 ✅ Using AI tools to improve productivity and learning&lt;/p&gt;

&lt;p&gt;One thing I've learned is that consistency beats intensity. Spending even one hour every day coding, reading documentation, or working on a project compounds into significant progress over time.&lt;/p&gt;

&lt;p&gt;My current goal is to build projects that combine AI and web development while contributing more to open-source communities.&lt;/p&gt;

&lt;p&gt;What are you currently learning or building? I'd love to connect with fellow developers, students, and creators on a similar journey.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
