# StudyLens for my tensed sister juggling with her academics

> Source: <https://dev.to/shashwatsinha03/studylens-for-my-tensed-sister-juggling-with-her-academics-5fd0>
> Published: 2026-10-04 06:29:54+00:00

*This is a submission for the [Hacktoberfest Weekend Challenge: Build for a Friend](https://dev.to/challenges/hacktoberfest-weekend-2026-10-01)*

**Built for:** 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.

StudyLens turns passive reading into active learning — completely on your machine. No API keys, no cloud, no accounts, no telemetry.

**Upload a PDF/TXT → Get:**

```
ollama pull gemma3:1b
ollama serve
pip install -r requirements.txt
streamlit run app.py
```

Opens at `http://localhost:8501` — works on any machine that runs Python + Ollama (tested on macOS, Linux, Windows).

[github.com/ShashwatSinha03/HF_BuildForAFriend](https://github.com/ShashwatSinha03/HF_BuildForAFriend)

```
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
```

**Stack:** Python • Streamlit • Ollama • Gemma 3 1B • PyPDF • Requests

**Architecture decisions that matter:**

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

**Sprint-based development** (6 sprints over 3 days):

**This project exists because of open weights and local inference.**

If I'd used a closed API:

**With Gemma 3 1B + Ollama:**

The "small model" constraints forced better engineering: lightweight retrieval, strict prompting, defensive parsing, batch evaluation. Those are *better* patterns that scale up — not compromises.

*"Wait, it's actually free? And my PDFs don't get uploaded anywhere? Damn, broski"*

Yep, that's my sister, after using it for her midterms prep

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.
