<?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: Piyush</title>
    <description>The latest articles on DEV Community by Piyush (@piyusshhjangid).</description>
    <link>https://dev.to/piyusshhjangid</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%2F4159450%2Ff388693f-5754-443e-9104-74fdf533d4f1.png</url>
      <title>DEV Community: Piyush</title>
      <link>https://dev.to/piyusshhjangid</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/piyusshhjangid"/>
    <language>en</language>
    <item>
      <title>PrepFlow — From Study Material to an Actual Study Plan</title>
      <dc:creator>Piyush</dc:creator>
      <pubDate>Mon, 05 Oct 2026 06:42:03 +0000</pubDate>
      <link>https://dev.to/piyusshhjangid/prepflow-from-study-material-to-an-actual-study-plan-58e3</link>
      <guid>https://dev.to/piyusshhjangid/prepflow-from-study-material-to-an-actual-study-plan-58e3</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What if AI didn't just explain your notes, but actually figured out what you should study next?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is my submission for the &lt;strong&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I built &lt;strong&gt;PrepFlow&lt;/strong&gt; because students don't usually have a shortage of study material.&lt;/p&gt;

&lt;p&gt;They have the opposite problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Too much of it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;PDFs. Notes. Syllabi. Previous-year questions. Multiple subjects. Weak topics. Different confidence levels. And a deadline that keeps getting closer.&lt;/p&gt;

&lt;p&gt;The difficult question isn't:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“What does this PDF say?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It's:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“Given everything I need to learn, how should I spend the limited time I have left?”&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's the problem PrepFlow tries to solve.&lt;/p&gt;




&lt;h1&gt;
  
  
  🧠 The Idea
&lt;/h1&gt;

&lt;p&gt;PrepFlow takes this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    BEFORE PREPFLOW

       ┌─────────┐   ┌─────────┐   ┌─────────┐
       │  PDFs   │   │  Notes  │   │  Syllabus│
       └────┬────┘   └────┬────┘   └────┬────┘
            │             │             │
            └─────────────┼─────────────┘
                          │
                          ▼
                  ┌───────────────┐
                  │     STUDENT   │
                  │               │
                  │ "What do I    │
                  │ study today?" │
                  └───────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and turns it into:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                     WITH PREPFLOW

 PDF / TEXT
     │
     ▼
┌──────────────┐
│   EXTRACT    │
│ page-aware   │
│ text         │
└──────┬───────┘
       ▼
┌──────────────┐
│    CHUNK     │
│ deterministic│
│ boundaries   │
└──────┬───────┘
       ▼
┌──────────────┐
│    GEMMA     │
│ understand   │
│ material     │
└──────┬───────┘
       ▼
┌──────────────┐
│   VERIFY     │
│ evidence +   │
│ structured   │
│ output       │
└──────┬───────┘
       ▼
┌──────────────┐
│   PRIORITIZE │
│ importance   │
│ weakness     │
│ urgency      │
│ difficulty   │
└──────┬───────┘
       ▼
┌──────────────┐
│    PLAN      │
│ capacity +   │
│ prerequisites│
│ revision     │
└──────┬───────┘
       ▼
┌──────────────────────────┐
│ TODAY                    │
│                          │
│ 1. Dynamic Programming  │
│ 2. Graph Traversal      │
│ 3. Revise Greedy        │
│                          │
│ 145 / 160 min planned   │
└──────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important part is that &lt;strong&gt;AI doesn't generate the final timetable&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That distinction shaped almost the entire architecture.&lt;/p&gt;




&lt;h1&gt;
  
  
  🎯 The Core Principle
&lt;/h1&gt;

&lt;p&gt;I split the system into two responsibilities:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;AI should do&lt;/th&gt;
&lt;th&gt;Software should do&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Understand unstructured material&lt;/td&gt;
&lt;td&gt;Calculate available time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Identify topics&lt;/td&gt;
&lt;td&gt;Calculate priority&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Identify subtopics&lt;/td&gt;
&lt;td&gt;Enforce capacity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Suggest prerequisites&lt;/td&gt;
&lt;td&gt;Validate evidence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Estimate semantic difficulty&lt;/td&gt;
&lt;td&gt;Persist state&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Connect topics to source evidence&lt;/td&gt;
&lt;td&gt;Schedule tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Interpret weak-topic hints&lt;/td&gt;
&lt;td&gt;Schedule revision&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Produce structured analysis&lt;/td&gt;
&lt;td&gt;Handle progress&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Recover missed work&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Why?
&lt;/h3&gt;

&lt;p&gt;Because I don't want an LLM deciding whether:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“You have 120 minutes available, so I'll give you 157 minutes of work.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's not intelligence.&lt;/p&gt;

&lt;p&gt;That's a bug.&lt;/p&gt;

&lt;p&gt;So PrepFlow follows a simple rule:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;AI interprets. Deterministic software decides.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  🔄 The Full PrepFlow Pipeline
&lt;/h1&gt;

&lt;p&gt;The repository currently implements the complete path from material ingestion through planning, daily execution, revision, and progress.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────┐
│  STUDY SETUP        │
│                     │
│ Exam date           │
│ Hours/day            │
│ Study days           │
│ Weak topics          │
│ Confidence           │
│ Buffer               │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│ MATERIAL INGESTION   │
│                     │
│ PDF / pasted text   │
│ Page preservation   │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│ DETERMINISTIC       │
│ CHUNKING             │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│ GEMMA               │
│                     │
│ Topics              │
│ Subtopics           │
│ Difficulty          │
│ Importance          │
│ Prerequisites       │
│ Evidence            │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│ VALIDATION          │
│                     │
│ JSON → Zod          │
│ Evidence matching   │
│ Page derivation     │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│ KNOWLEDGE MODEL     │
│                     │
│ Subjects            │
│ Topics              │
│ Prerequisites       │
│ Evidence            │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│ PRIORITY ENGINE     │
│                     │
│ Importance          │
│ Weakness            │
│ Foundation          │
│ Difficulty          │
│ Urgency             │
│ Emphasis            │
│ Evidence            │
│ Revision            │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│ CAPACITY ENGINE     │
│                     │
│ Available minutes   │
│ Buffer              │
│ Revision reserve    │
│ Exam deadline       │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│ PLANNER             │
│                     │
│ MUST                │
│ SHOULD              │
│ IF TIME             │
│ DEFER               │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│ DAILY EXECUTION     │
│                     │
│ Start               │
│ Complete            │
│ Skip                │
│ Progress            │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│ REVISION + RECOVERY │
│                     │
│ +1 / +3 / +7        │
│ Missed tasks        │
│ Rebalance           │
│ Replan              │
└─────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  🤖 Why This Isn't "Chat With Your PDF"
&lt;/h1&gt;

&lt;p&gt;There are thousands of projects that can answer:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Summarize chapter 4.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That wasn't the product I wanted to build.&lt;/p&gt;

&lt;p&gt;PrepFlow's model produces &lt;strong&gt;structured knowledge&lt;/strong&gt;, not the final answer the student follows.&lt;/p&gt;

&lt;p&gt;The application then transforms that knowledge into an executable workflow.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                 GENERIC PDF CHAT

PDF ──────► LLM ──────► Answer


                 PREPFLOW

PDF
 │
 ▼
Extraction
 │
 ▼
Chunking
 │
 ▼
Gemma
 │
 ▼
Structured Topics
 │
 ▼
Evidence Verification
 │
 ▼
Priority Engine
 │
 ▼
Capacity Engine
 │
 ▼
Planner
 │
 ▼
Daily Tasks
 │
 ▼
Progress
 │
 ▼
Revision
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The difference is subtle but important:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The output isn't text.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The output is a decision system.&lt;/strong&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  🔍 Evidence Is First-Class
&lt;/h1&gt;

&lt;p&gt;One of the parts I cared about most was preventing the model from inventing study topics.&lt;/p&gt;

&lt;p&gt;If Gemma says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Dynamic Programming is highly important.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;PrepFlow doesn't simply trust it.&lt;/p&gt;

&lt;p&gt;The model must provide source evidence.&lt;/p&gt;

&lt;p&gt;The system then checks that evidence against the extracted source text and derives the PDF page programmatically.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Gemma says:

Topic:
Dynamic Programming

Evidence:
"Dynamic programming solves problems
by combining solutions to overlapping
subproblems."

             │
             ▼

       SOURCE MATERIAL

             │
             ▼

     Does this exact evidence
       exist in the source?

        ┌────┴────┐
       YES        NO
        │          │
        ▼          ▼
    ACCEPT       REJECT
        │
        ▼
   derive PDF page
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives each topic a traceable relationship back to the material.&lt;/p&gt;

&lt;p&gt;The repository documents the same architecture: model output is parsed, schema-validated, then evidence-verified before topics are accepted.&lt;/p&gt;




&lt;h1&gt;
  
  
  🧮 How PrepFlow Decides What Matters
&lt;/h1&gt;

&lt;p&gt;Not every topic deserves equal time.&lt;/p&gt;

&lt;p&gt;PrepFlow combines multiple bounded factors:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Factor&lt;/th&gt;
&lt;th&gt;What it represents&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Importance&lt;/td&gt;
&lt;td&gt;How important the topic is&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Weakness&lt;/td&gt;
&lt;td&gt;How weak the student is&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Foundation&lt;/td&gt;
&lt;td&gt;Whether other topics depend on it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Difficulty&lt;/td&gt;
&lt;td&gt;How demanding it is&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Urgency&lt;/td&gt;
&lt;td&gt;How close the exam is&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Emphasis&lt;/td&gt;
&lt;td&gt;Explicit emphasis in the source&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Evidence&lt;/td&gt;
&lt;td&gt;Strength of supporting evidence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Revision&lt;/td&gt;
&lt;td&gt;Need for later review&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This produces a bounded priority score rather than asking the model to invent one.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                  TOPIC PRIORITY

Importance ────────┐
Weakness ──────────┤
Foundation ────────┤
Difficulty ────────┤
Urgency ───────────┤
Emphasis ──────────┼──► PRIORITY SCORE ──► PLAN
Evidence ──────────┤
Revision ──────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  ⏱️ The Planner Knows When You Don't Have Enough Time
&lt;/h1&gt;

&lt;p&gt;This was one of the most important product decisions.&lt;/p&gt;

&lt;p&gt;Suppose the student has:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;40.5 hours of estimated work&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;but only:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;24 hours available&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A typical AI timetable might confidently distribute everything across the available days.&lt;/p&gt;

&lt;p&gt;PrepFlow doesn't.&lt;/p&gt;

&lt;p&gt;It tells the truth.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ESTIMATED WORK
████████████████████████████████████████ 40.5h

AVAILABLE TIME
████████████████████████ 24.0h

                         ───────────────
                         16.5h OVERLOAD
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then it prioritizes the work:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tier&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;🔴 MUST&lt;/td&gt;
&lt;td&gt;Highest-value work to protect&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🟠 SHOULD&lt;/td&gt;
&lt;td&gt;Important if capacity permits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🟡 IF TIME&lt;/td&gt;
&lt;td&gt;Useful but lower priority&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;⚪ DEFER&lt;/td&gt;
&lt;td&gt;Cannot realistically fit&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The planner therefore answers two questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;What should I study?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What should I stop pretending I can finish?&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That second question is surprisingly important.&lt;/p&gt;




&lt;h1&gt;
  
  
  🧱 Prerequisites Matter
&lt;/h1&gt;

&lt;p&gt;A study plan shouldn't tell someone to learn:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Advanced Dynamic Programming”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;before:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Dynamic Programming fundamentals.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;PrepFlow models prerequisite relationships.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Arrays
  │
  ▼
Recursion
  │
  ▼
Dynamic Programming
  │
  ├──────────────► Knapsack
  │
  └──────────────► Longest Common Subsequence
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The planner can therefore account for foundational topics instead of treating every topic as an independent checkbox.&lt;/p&gt;




&lt;h1&gt;
  
  
  📅 A Plan Is Not Finished When It Is Generated
&lt;/h1&gt;

&lt;p&gt;Real students miss tasks.&lt;/p&gt;

&lt;p&gt;That's normal.&lt;/p&gt;

&lt;p&gt;So PrepFlow treats planning as a feedback loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;          ┌──────────────┐
          │ INITIAL PLAN │
          └──────┬───────┘
                 │
                 ▼
          ┌──────────────┐
          │     TODAY    │
          └──────┬───────┘
                 │
        ┌────────┼────────┐
        ▼        ▼        ▼
     COMPLETE   SKIP    MISS
        │        │        │
        └────────┴────────┘
                 │
                 ▼
        ┌─────────────────┐
        │ RECOVERY /      │
        │ REBALANCE       │
        └────────┬────────┘
                 │
                 ▼
          NEW PLAN VERSION
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Completed work is preserved.&lt;/p&gt;

&lt;p&gt;Unfinished work can be recovered or re-planned.&lt;/p&gt;

&lt;p&gt;This is much closer to how real studying works than generating one static timetable.&lt;/p&gt;




&lt;h1&gt;
  
  
  🔁 Revision Is Built Into the Plan
&lt;/h1&gt;

&lt;p&gt;Studying a topic once isn't enough.&lt;/p&gt;

&lt;p&gt;PrepFlow schedules revision sessions after learning using spaced intervals.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LEARN
  │
  ├──── +1 study day ────► REVISION 1
  │
  ├──── +3 study days ────► REVISION 2
  │
  └──── +7 study days ────► REVISION 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The planner also respects the exam boundary and available study days.&lt;/p&gt;




&lt;h1&gt;
  
  
  🏗️ Architecture
&lt;/h1&gt;

&lt;p&gt;The repository is a TypeScript monorepo containing the React frontend, Express/TypeScript API, and shared schemas/types.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PrepFlow/
│
├── apps/
│   ├── api/
│   │   ├── domain/
│   │   │   ├── planning/
│   │   │   └── analysis/
│   │   │
│   │   ├── infrastructure/
│   │   │   ├── prisma/
│   │   │   ├── PDF extraction
│   │   │   └── AI providers
│   │   │
│   │   └── HTTP API
│   │
│   └── web/
│       ├── React
│       ├── TypeScript
│       ├── Vite
│       └── Tailwind
│
├── packages/
│   └── shared/
│       └── Zod schemas + shared types
│
├── docs/
│   ├── analysis.md
│   ├── planning.md
│   └── decisions/
│
└── PostgreSQL + Prisma
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  🧠 Why the AI Layer Is Replaceable
&lt;/h1&gt;

&lt;p&gt;I didn't want the entire application to become dependent on one model.&lt;/p&gt;

&lt;p&gt;The architecture therefore separates:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                APPLICATION

                    │
                    ▼
             ┌─────────────┐
             │ AI PROVIDER │
             │ INTERFACE   │
             └──────┬──────┘
                    │
          ┌─────────┼─────────┐
          ▼         ▼         ▼
       Ollama     Gemini     Fake
       + Gemma     + Gemma   Provider
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The model can change without rewriting the planning engine, database layer, or frontend.&lt;/p&gt;

&lt;p&gt;The repository currently exposes &lt;code&gt;ollama&lt;/code&gt;, &lt;code&gt;gemini&lt;/code&gt;, and &lt;code&gt;fake&lt;/code&gt; provider modes.&lt;/p&gt;




&lt;h1&gt;
  
  
  🛡️ AI Security and Trust Boundaries
&lt;/h1&gt;

&lt;p&gt;The system treats uploaded study material as &lt;strong&gt;untrusted input&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;USER MATERIAL
     │
     │ untrusted
     ▼
┌──────────────┐
│ nonce +      │
│ delimiters   │
└──────┬───────┘
       ▼
     GEMMA
       │
       ▼
┌──────────────┐
│ tolerant     │
│ JSON parsing │
└──────┬───────┘
       ▼
┌──────────────┐
│ Zod schema   │
│ validation   │
└──────┬───────┘
       ▼
┌──────────────┐
│ source       │
│ evidence     │
│ verification │
└──────┬───────┘
       ▼
     ACCEPT
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The model receives no application secrets or tools.&lt;/p&gt;

&lt;p&gt;Its output is never treated as trusted application state.&lt;/p&gt;

&lt;p&gt;The repository also documents bounded retries, analysis concurrency limits, upload limits, CORS controls, and environment-based secrets.&lt;/p&gt;




&lt;h1&gt;
  
  
  🧪 Testing the Important Parts
&lt;/h1&gt;

&lt;p&gt;I didn't want the project to only work in a happy-path demo.&lt;/p&gt;

&lt;p&gt;The current test suite covers multiple layers:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;What is tested&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Shared&lt;/td&gt;
&lt;td&gt;Schemas and shared logic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API&lt;/td&gt;
&lt;td&gt;Business logic and routes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Web&lt;/td&gt;
&lt;td&gt;Frontend behavior&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HTTP&lt;/td&gt;
&lt;td&gt;End-to-end API routing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Planning&lt;/td&gt;
&lt;td&gt;Priority, capacity, scheduling&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Randomized invariants&lt;/td&gt;
&lt;td&gt;Planner safety properties&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PostgreSQL&lt;/td&gt;
&lt;td&gt;Real persistence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Concurrency&lt;/td&gt;
&lt;td&gt;Rebalance/version behavior&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PDF extraction&lt;/td&gt;
&lt;td&gt;Real document parsing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Current validation:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;423 automated tests passing&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;20/20 real PostgreSQL integration tests passing&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The integration tests include persistence and concurrent plan-rebalancing scenarios.&lt;/p&gt;




&lt;h1&gt;
  
  
  📊 What the Test Numbers Actually Mean
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AUTOMATED TESTS

Shared       ████████████████████  22
API          ████████████████████ 358
Web          ████████████████████ 43
                                  ───
TOTAL                              423
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real database integration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PostgreSQL integration

Passed     ████████████████████ 20
Failed                           0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I also validated the PDF extraction pipeline against a real academic PDF and compared the extracted page structure against the source.&lt;/p&gt;




&lt;h1&gt;
  
  
  🧰 Technology Stack
&lt;/h1&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Frontend&lt;/td&gt;
&lt;td&gt;React + TypeScript&lt;/td&gt;
&lt;td&gt;Component-based UI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Build&lt;/td&gt;
&lt;td&gt;Vite&lt;/td&gt;
&lt;td&gt;Fast development/build&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Styling&lt;/td&gt;
&lt;td&gt;Tailwind CSS&lt;/td&gt;
&lt;td&gt;Consistent UI system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backend&lt;/td&gt;
&lt;td&gt;Node.js + Express&lt;/td&gt;
&lt;td&gt;Lightweight API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Language&lt;/td&gt;
&lt;td&gt;TypeScript&lt;/td&gt;
&lt;td&gt;Shared type safety&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Validation&lt;/td&gt;
&lt;td&gt;Zod&lt;/td&gt;
&lt;td&gt;Runtime contracts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;PostgreSQL&lt;/td&gt;
&lt;td&gt;Relational persistence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ORM&lt;/td&gt;
&lt;td&gt;Prisma&lt;/td&gt;
&lt;td&gt;Type-safe DB access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PDF&lt;/td&gt;
&lt;td&gt;PDF.js&lt;/td&gt;
&lt;td&gt;Page-aware extraction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI&lt;/td&gt;
&lt;td&gt;Gemma&lt;/td&gt;
&lt;td&gt;Open-weight material analysis&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local AI&lt;/td&gt;
&lt;td&gt;Ollama&lt;/td&gt;
&lt;td&gt;Local model execution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Testing&lt;/td&gt;
&lt;td&gt;Vitest&lt;/td&gt;
&lt;td&gt;Fast automated testing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CI&lt;/td&gt;
&lt;td&gt;GitHub Actions&lt;/td&gt;
&lt;td&gt;Automated verification&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h1&gt;
  
  
  🌍 Why Open Innovation Matters
&lt;/h1&gt;

&lt;p&gt;Study material can be surprisingly sensitive.&lt;/p&gt;

&lt;p&gt;It can contain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Personal information&lt;/li&gt;
&lt;li&gt;University documents&lt;/li&gt;
&lt;li&gt;Assignments&lt;/li&gt;
&lt;li&gt;Private notes&lt;/li&gt;
&lt;li&gt;Exam preparation&lt;/li&gt;
&lt;li&gt;Proprietary material&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's why I wanted PrepFlow's architecture to support &lt;strong&gt;local/open-weight AI&lt;/strong&gt;, rather than making a cloud LLM the only possible path.&lt;/p&gt;

&lt;p&gt;Gemma sits behind an AI-provider abstraction instead of being hardcoded into the application's business logic.&lt;/p&gt;

&lt;p&gt;That gives the project a useful property:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The intelligence can evolve without rebuilding the product around a single AI provider.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  🆚 What PrepFlow Is — And Isn't
&lt;/h1&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;PrepFlow is&lt;/th&gt;
&lt;th&gt;PrepFlow isn't&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;AI-assisted planning&lt;/td&gt;
&lt;td&gt;A generic chatbot&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Evidence-backed analysis&lt;/td&gt;
&lt;td&gt;Blind LLM output&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deterministic scheduling&lt;/td&gt;
&lt;td&gt;LLM-generated timetable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Capacity-aware&lt;/td&gt;
&lt;td&gt;“Everything fits” fantasy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Revision-aware&lt;/td&gt;
&lt;td&gt;One-time checklist&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Explainable&lt;/td&gt;
&lt;td&gt;Black-box prioritization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Open-weight AI compatible&lt;/td&gt;
&lt;td&gt;Locked to one provider&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Built around execution&lt;/td&gt;
&lt;td&gt;Just another note summarizer&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h1&gt;
  
  
  💡 The Engineering Lesson
&lt;/h1&gt;

&lt;p&gt;The biggest thing I learned wasn't how to connect an AI model to a backend.&lt;/p&gt;

&lt;p&gt;It was learning &lt;strong&gt;where not to use AI&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A tempting architecture would have been:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PDF
 │
 ▼
LLM
 │
 ▼
"Here is your study plan."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's easy.&lt;/p&gt;

&lt;p&gt;It's also difficult to trust.&lt;/p&gt;

&lt;p&gt;PrepFlow instead looks more like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                 AI
                  │
                  ▼
        UNDERSTAND THE MATERIAL
                  │
                  ▼
             STRUCTURED DATA
                  │
                  ▼
        ┌────────────────────┐
        │ DETERMINISTIC CODE │
        │                    │
        │ Validate           │
        │ Prioritize         │
        │ Calculate          │
        │ Schedule           │
        │ Revise             │
        │ Recover            │
        └─────────┬──────────┘
                  │
                  ▼
             REAL PLAN
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That separation gives me much more confidence in the system.&lt;/p&gt;




&lt;h1&gt;
  
  
  🚀 What's Next
&lt;/h1&gt;

&lt;p&gt;PrepFlow is intentionally an MVP.&lt;/p&gt;

&lt;p&gt;The next areas I'd explore are:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Area&lt;/th&gt;
&lt;th&gt;Possible improvement&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Documents&lt;/td&gt;
&lt;td&gt;OCR for scanned PDFs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI&lt;/td&gt;
&lt;td&gt;More provider/model evaluation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Knowledge&lt;/td&gt;
&lt;td&gt;Better prerequisite inference&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Planning&lt;/td&gt;
&lt;td&gt;Calendar-aware scheduling&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Progress&lt;/td&gt;
&lt;td&gt;More sophisticated learning models&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI runtime&lt;/td&gt;
&lt;td&gt;Additional local/open-weight providers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UX&lt;/td&gt;
&lt;td&gt;Topic editing and plan refinement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Validation&lt;/td&gt;
&lt;td&gt;Larger real-student testing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The current repository roadmap already separates the completed repository/database, ingestion, AI analysis, and planning milestones from later topic-review, polish, deployment, and real-user testing.&lt;/p&gt;




&lt;h1&gt;
  
  
  🔗 Try It
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Source Code
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/piyusshhjangid/PrepFlow?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;github.com/piyusshhjangid/PrepFlow&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Local Development
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install
&lt;/span&gt;npm run db:migrate
npm run db:seed

npm run dev:api
npm run dev:web
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open the web application.&lt;/p&gt;

&lt;p&gt;The repository also documents the local Gemma/Ollama and hosted Gemma provider setup.&lt;/p&gt;




&lt;h1&gt;
  
  
  ❤️ Why “Build for a Friend” Matters
&lt;/h1&gt;

&lt;p&gt;Building for a friend changes the question.&lt;/p&gt;

&lt;p&gt;Instead of:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“What AI feature can I add?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;you start asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“What is actually making this person's life harder?”&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For PrepFlow, the answer was:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Students don't necessarily need more study material.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;They need help turning the material they already have into a realistic sequence of actions.&lt;/p&gt;

&lt;p&gt;So that's what I built.&lt;/p&gt;

&lt;p&gt;Not another chatbot.&lt;/p&gt;

&lt;p&gt;Not another PDF summarizer.&lt;/p&gt;

&lt;p&gt;A system that tries to answer one deceptively difficult question:&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;What should I study next?&lt;/strong&gt;
&lt;/h1&gt;




&lt;p&gt;Built for the &lt;strong&gt;Hacktoberfest Weekend Challenge — Build for a Friend&lt;/strong&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  devchallenge #weekendchallenge #hf26challenge #gemma
&lt;/h1&gt;

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