<?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: Shashwat Sinha</title>
    <description>The latest articles on DEV Community by Shashwat Sinha (@shashwatsinha03).</description>
    <link>https://dev.to/shashwatsinha03</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%2F4153733%2F5806b48a-bbdc-490d-89b7-758e5c687c69.jpg</url>
      <title>DEV Community: Shashwat Sinha</title>
      <link>https://dev.to/shashwatsinha03</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shashwatsinha03"/>
    <language>en</language>
    <item>
      <title>StudyLens for my tensed sister juggling with her academics</title>
      <dc:creator>Shashwat Sinha</dc:creator>
      <pubDate>Sun, 04 Oct 2026 06:29:54 +0000</pubDate>
      <link>https://dev.to/shashwatsinha03/studylens-for-my-tensed-sister-juggling-with-her-academics-5fd0</link>
      <guid>https://dev.to/shashwatsinha03/studylens-for-my-tensed-sister-juggling-with-her-academics-5fd0</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  StudyLens — A Local-First AI Study Assistant
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Built for:&lt;/strong&gt; My younger sister, who's drowning in lecture PDFs and needs a study tool that works offline, respects her privacy, and doesn't require a $20/month subscription.&lt;/p&gt;




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

&lt;p&gt;StudyLens turns passive reading into active learning — completely on your machine. No API keys, no cloud, no accounts, no telemetry.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Upload a PDF/TXT → Get:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🧠 Understand&lt;/strong&gt; — Ask questions, get grounded answers with citations from your material&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📚 Revise&lt;/strong&gt; — One-click structured revision sheet (concepts, key terms, relationships, "remember" facts, common confusions)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🎯 Quiz&lt;/strong&gt; — 5 or 10 mixed MCQ/short-answer questions, auto-scored with weak-area identification&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⏱️ Exam Mode&lt;/strong&gt; — "I have 30 minutes" → prioritized study plan (Must Know / Good to Know / Skim) with time estimates&lt;/li&gt;
&lt;/ul&gt;




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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama pull gemma3:1b
ollama serve
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;Opens at &lt;code&gt;http://localhost:8501&lt;/code&gt; — works on any machine that runs Python + Ollama (tested on macOS, Linux, Windows).&lt;/p&gt;




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

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/ShashwatSinha03/HF_BuildForAFriend" rel="noopener noreferrer"&gt;github.com/ShashwatSinha03/HF_BuildForAFriend&lt;/a&gt;&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;study-lens/
├── app.py          # Streamlit UI + orchestration
├── llm.py          # Ollama client + prompts + robust JSON parsing
├── document.py     # PDF/TXT extraction + keyword retrieval
├── requirements.txt
└── README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






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

&lt;p&gt;&lt;strong&gt;Stack:&lt;/strong&gt; Python • Streamlit • Ollama • Gemma 3 1B • PyPDF • Requests&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Architecture decisions that matter:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Constraint&lt;/th&gt;
&lt;th&gt;Solution&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;No cloud/API keys&lt;/td&gt;
&lt;td&gt;Local Ollama + Gemma 3 1B (815MB)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Small model, unreliable JSON&lt;/td&gt;
&lt;td&gt;Multi-strategy parser (standard → trailing-comma fix → duplicate-key removal → regex fallback)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No embeddings/vector DB&lt;/td&gt;
&lt;td&gt;Lightweight keyword-overlap retrieval (TF-IDF-inspired, ~30% of doc sent to LLM)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Limited compute&lt;/td&gt;
&lt;td&gt;Single LLM call per action; batch short-answer eval; conservative token limits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Privacy-first&lt;/td&gt;
&lt;td&gt;Zero network calls except localhost:11434; session-only state&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Sprint-based development&lt;/strong&gt; (6 sprints over 3 days):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Foundation — upload, extraction, session state, Ollama health checks&lt;/li&gt;
&lt;li&gt;Explain — grounded Q&amp;amp;A with retrieval&lt;/li&gt;
&lt;li&gt;Revise — structured revision sheets&lt;/li&gt;
&lt;li&gt;Quiz — MCQ + short answer, batch evaluation, weak areas&lt;/li&gt;
&lt;li&gt;Exam Mode — time-bounded prioritization&lt;/li&gt;
&lt;li&gt;Polish — robust parsing, error UX, README, .gitignore&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Why Open Innovation Matters
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;This project exists because of open weights and local inference.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If I'd used a closed API:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;❌ &lt;strong&gt;Cost&lt;/strong&gt; — $20/month per user minimum&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;Privacy&lt;/strong&gt; — lecture notes sent to third parties&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;Offline&lt;/strong&gt; — no studying on planes, in libraries, or with spotty campus WiFi&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;Customization&lt;/strong&gt; — can't tweak prompts, retrieval, or model behavior&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;Longevity&lt;/strong&gt; — API deprecation, price hikes, or service shutdown kills the tool&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;With Gemma 3 1B + Ollama:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Free forever&lt;/strong&gt; — runs on hardware she already owns&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Private&lt;/strong&gt; — her notes never leave her machine&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Offline-first&lt;/strong&gt; — works anywhere&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Hackable&lt;/strong&gt; — every prompt, retrieval strategy, and UI decision is in plain Python&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Sustainable&lt;/strong&gt; — no vendor lock-in; model runs as long as Python runs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The "small model" constraints forced better engineering: lightweight retrieval, strict prompting, defensive parsing, batch evaluation. Those are &lt;em&gt;better&lt;/em&gt; patterns that scale up — not compromises.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Friend Test
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Wait, it's actually free? And my PDFs don't get uploaded anywhere? Damn, broski"&lt;/em&gt;&lt;br&gt;&lt;br&gt;
Yep, that's my sister, after using it for her midterms prep&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's the whole point. Open innovation doesn't just lower barriers — it changes what's possible to build for the people you care about.&lt;/p&gt;

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