# Patternwise: Stop Grinding. Start Learning Patterns. Your Open-Source AI Interview Coach.

> Source: <https://dev.to/452harsh/patternwise-the-ai-coach-that-says-dont-solve-another-problem-yet-59oc>
> Published: 2026-10-04 10:30:39+00:00

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

**Patternwise** is a DSA and System Design practice workspace with an **AI interview coach** built on open-weight Gemma models. It answers one question every morning:

*"Given everything I've practised so far, what should I learn, revise, or practise today?"*

I built it for **Nikhil**, a friend from my office who recently started preparing for interviews.

When he started, he jumped between multiple websites and couldn't keep track of his progress across them. Some sites only cover DSA, others only System Design, but today's interviews expect **both**. And even within one site, a list of hundreds of problems tells you what you've done, not what to do next: *Is sliding window still weak? Should I learn something new, or redo what I failed last week?* It never tells you to **stop**.

So I built one place for both DSA and System Design (HLD and LLD), with an AI coach on top that looks at everything he's practised and tells him what to work on today. Now he can just open it and practise.

Patternwise does three things:

The feature I'm proudest of: **the coach knows when *not* to give you another problem.** If you keep failing the same idea across different problems, it says so:

**Don't solve another problem yet.** You've struggled with *Variable Window: Longest Valid* on 4 different problems recently. Spend 10 minutes on the invariant, then try one guided problem.

That's the difference between a coach and a problem generator.

🔗 **Live:** [https://patternwise.onrender.com](https://patternwise.onrender.com) · password: `patternwise-demo`

The demo account has three weeks of realistic practice history: strong hashing, a sliding-window pattern that keeps going wrong, an overdue binary search, and a System Design concept with slipping ratings. That way you can see the coach react to real signals. Try:

A personal, pattern-first preparation workspace for **DSA** (data structures and algorithms) and **System Design** (HLD and LLD). It combines a curated curriculum with a tracker built around recognition, spaced-repetition revision, daily plans, notes, workspaces and analytics, plus an **AI interview coach** that runs on open-weight models and answers: *"Given everything I've practised, what should I do today?"*

It's built with Next.js 16, React 19 and TypeScript, styled with Tailwind CSS v4 and shadcn/ui on Base UI, and stores data in MongoDB. It's a single-user app that you sign in to with a password.

Most practice tracking is a checklist of problems. Patternwise is organised around the **pattern** instead: how to recognise it, the core idea, a template, variations, pitfalls and where else it applies. Every solve, review and note feeds a spaced-repetition schedule, so things you're shaky on come back before you forget them. System Design gets the…

**Stack:** Next.js 16 (App Router), React 19, TypeScript, Tailwind v4 and shadcn/ui; MongoDB Atlas (data plus vector search); deployed on **Render**.

**Open-source AI:**

| Role | Model | Where it runs | 
|---|---|---|
| Coaching, hints, interviewer | **Gemma 4 26B-A4B** | Google AI Studio (production) | 
| Same, fully local | **Gemma 4 E2B** (QAT, 4.3 GB) | Ollama on my 8 GB M1, about 28 tokens/s | 
| Retrieval embeddings | **EmbeddingGemma** (768-d) | Hugging Face Inference (production) or Ollama (local) | 

Small open models are good at explanation and dialogue. They're bad at arithmetic over a user's history, and they'll happily invent "you've solved 12 sliding-window problems". So I split the work:

**The engine** (`lib/coach/`) is plain, pure TypeScript and fully tested:

**Gemma** gets those facts as structured text, plus retrieved curriculum. It runs under strict rules: every user-specific claim must come from the supplied data, and if the data doesn't say, it says it doesn't know. The server recomputes all facts from MongoDB on every request, so the browser can't feed the model made-up stats.

**RAG on MongoDB Atlas Vector Search:**

`knowledge` collection with a `knowledge_vector` index filtered by module.
**DSA and System Design stay separate.** Every coach request is scoped to one module, so a System Design answer never drags in your DSA history, and vice versa.

**It closes the loop.** Interview results, "explain it back" scores, and practice logged anywhere in the app feed straight back into tomorrow's plan.

**Things I had to solve:**

`<thought>…</thought>`, and switching that off isn't supported for this model. I wrote a small stream filter that drops the block, even when a tag is split across chunks, and adds token headroom so the answer isn't cut short.
For an interview coach, open models aren't a philosophy point. They decide **who can use it**.

**What Nikhil said** after trying it:

"Honestly, I really liked the concept behind [Patternwise]. Instead of just solving hundreds of random DSA questions, it focuses more on understanding the patterns. I feel that once you know the pattern, you can approach and solve a lot of different questions on your own, rather than just remembering solutions.

I also liked the way the preparation is structured with a proper timeline, so it's easier to know what to focus on and when. The System Design part is also really helpful because it covers both LLD and HLD. Overall, I think it's a much more practical way to prepare for interviews instead of just going through a huge list of problems."

That's exactly the shift I was going for: from *how many problems have I solved?* to *which patterns do I actually understand?*

I built Patternwise with an AI coding agent, **Claude Code**, as my pair programmer. I set the direction: what Nikhil needed, the features, the design decisions, and what to cut. I also tested every step in the browser. The agent wrote and refactored most of the code with me, ran the checks, and debugged the issues we hit along the way, like Gemma 4's inline reasoning tags and the embedding mismatch between Ollama and Hugging Face.

`render.yaml`). The repo also includes an optional Render Blueprint that self-hosts Gemma via Ollama behind a key-checking proxy (`deploy/render-ollama`).
