DEV Community

Cover image for PrepFlow โ€” From Study Material to an Actual Study Plan
Piyush
Piyush

Posted on

PrepFlow โ€” From Study Material to an Actual Study Plan

Hacktoberfest Weekend Challenge: Build for a Friend Submission ๐Ÿค

What if AI didn't just explain your notes, but actually figured out what you should study next?

This is my submission for the Hacktoberfest Weekend Challenge: Build for a Friend.

I built PrepFlow because students don't usually have a shortage of study material.

They have the opposite problem.

Too much of it.

PDFs. Notes. Syllabi. Previous-year questions. Multiple subjects. Weak topics. Different confidence levels. And a deadline that keeps getting closer.

The difficult question isn't:

โ€œWhat does this PDF say?โ€

It's:

โ€œGiven everything I need to learn, how should I spend the limited time I have left?โ€

That's the problem PrepFlow tries to solve.


๐Ÿง  The Idea

PrepFlow takes this:

                    BEFORE PREPFLOW

       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
       โ”‚  PDFs   โ”‚   โ”‚  Notes  โ”‚   โ”‚  Syllabusโ”‚
       โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜
            โ”‚             โ”‚             โ”‚
            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                          โ”‚
                          โ–ผ
                  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                  โ”‚     STUDENT   โ”‚
                  โ”‚               โ”‚
                  โ”‚ "What do I    โ”‚
                  โ”‚ study today?" โ”‚
                  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026 ๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026

and turns it into:

                     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   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026 ๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026

The important part is that AI doesn't generate the final timetable.

That distinction shaped almost the entire architecture.


๐ŸŽฏ The Core Principle

I split the system into two responsibilities:

AI should do Software should do
Understand unstructured material Calculate available time
Identify topics Calculate priority
Identify subtopics Enforce capacity
Suggest prerequisites Validate evidence
Estimate semantic difficulty Persist state
Connect topics to source evidence Schedule tasks
Interpret weak-topic hints Schedule revision
Produce structured analysis Handle progress
Recover missed work

Why?

Because I don't want an LLM deciding whether:

โ€œYou have 120 minutes available, so I'll give you 157 minutes of work.โ€

That's not intelligence.

That's a bug.

So PrepFlow follows a simple rule:

AI interprets. Deterministic software decides.


๐Ÿ”„ The Full PrepFlow Pipeline

The repository currently implements the complete path from material ingestion through planning, daily execution, revision, and progress.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  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              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026 ๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026

๐Ÿค– Why This Isn't "Chat With Your PDF"

There are thousands of projects that can answer:

โ€œSummarize chapter 4.โ€

That wasn't the product I wanted to build.

PrepFlow's model produces structured knowledge, not the final answer the student follows.

The application then transforms that knowledge into an executable workflow.

                 GENERIC PDF CHAT

PDF โ”€โ”€โ”€โ”€โ”€โ”€โ–บ LLM โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Answer


                 PREPFLOW

PDF
 โ”‚
 โ–ผ
Extraction
 โ”‚
 โ–ผ
Chunking
 โ”‚
 โ–ผ
Gemma
 โ”‚
 โ–ผ
Structured Topics
 โ”‚
 โ–ผ
Evidence Verification
 โ”‚
 โ–ผ
Priority Engine
 โ”‚
 โ–ผ
Capacity Engine
 โ”‚
 โ–ผ
Planner
 โ”‚
 โ–ผ
Daily Tasks
 โ”‚
 โ–ผ
Progress
 โ”‚
 โ–ผ
Revision
๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026 ๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026

The difference is subtle but important:

The output isn't text.

The output is a decision system.


๐Ÿ” Evidence Is First-Class

One of the parts I cared about most was preventing the model from inventing study topics.

If Gemma says:

โ€œDynamic Programming is highly important.โ€

PrepFlow doesn't simply trust it.

The model must provide source evidence.

The system then checks that evidence against the extracted source text and derives the PDF page programmatically.

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
๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026 ๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026

This gives each topic a traceable relationship back to the material.

The repository documents the same architecture: model output is parsed, schema-validated, then evidence-verified before topics are accepted.


๐Ÿงฎ How PrepFlow Decides What Matters

Not every topic deserves equal time.

PrepFlow combines multiple bounded factors:

Factor What it represents
Importance How important the topic is
Weakness How weak the student is
Foundation Whether other topics depend on it
Difficulty How demanding it is
Urgency How close the exam is
Emphasis Explicit emphasis in the source
Evidence Strength of supporting evidence
Revision Need for later review

This produces a bounded priority score rather than asking the model to invent one.

                  TOPIC PRIORITY

Importance โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
Weakness โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
Foundation โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
Difficulty โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
Urgency โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
Emphasis โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ–บ PRIORITY SCORE โ”€โ”€โ–บ PLAN
Evidence โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
Revision โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026 ๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026

โฑ๏ธ The Planner Knows When You Don't Have Enough Time

This was one of the most important product decisions.

Suppose the student has:

40.5 hours of estimated work

but only:

24 hours available

A typical AI timetable might confidently distribute everything across the available days.

PrepFlow doesn't.

It tells the truth.

ESTIMATED WORK
โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 40.5h

AVAILABLE TIME
โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 24.0h

                         โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
                         16.5h OVERLOAD
๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026 ๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026

Then it prioritizes the work:

Tier Meaning
๐Ÿ”ด MUST Highest-value work to protect
๐ŸŸ  SHOULD Important if capacity permits
๐ŸŸก IF TIME Useful but lower priority
โšช DEFER Cannot realistically fit

The planner therefore answers two questions:

  1. What should I study?
  2. What should I stop pretending I can finish?

That second question is surprisingly important.


๐Ÿงฑ Prerequisites Matter

A study plan shouldn't tell someone to learn:

โ€œAdvanced Dynamic Programmingโ€

before:

โ€œDynamic Programming fundamentals.โ€

PrepFlow models prerequisite relationships.

Arrays
  โ”‚
  โ–ผ
Recursion
  โ”‚
  โ–ผ
Dynamic Programming
  โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Knapsack
  โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Longest Common Subsequence
๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026 ๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026

The planner can therefore account for foundational topics instead of treating every topic as an independent checkbox.


๐Ÿ“… A Plan Is Not Finished When It Is Generated

Real students miss tasks.

That's normal.

So PrepFlow treats planning as a feedback loop:

          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ”‚ INITIAL PLAN โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                 โ”‚
                 โ–ผ
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ”‚     TODAY    โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                 โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ–ผ        โ–ผ        โ–ผ
     COMPLETE   SKIP    MISS
        โ”‚        โ”‚        โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                 โ”‚
                 โ–ผ
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚ RECOVERY /      โ”‚
        โ”‚ REBALANCE       โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                 โ”‚
                 โ–ผ
          NEW PLAN VERSION
๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026 ๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026

Completed work is preserved.

Unfinished work can be recovered or re-planned.

This is much closer to how real studying works than generating one static timetable.


๐Ÿ” Revision Is Built Into the Plan

Studying a topic once isn't enough.

PrepFlow schedules revision sessions after learning using spaced intervals.

Conceptually:

LEARN
  โ”‚
  โ”œโ”€โ”€โ”€โ”€ +1 study day โ”€โ”€โ”€โ”€โ–บ REVISION 1
  โ”‚
  โ”œโ”€โ”€โ”€โ”€ +3 study days โ”€โ”€โ”€โ”€โ–บ REVISION 2
  โ”‚
  โ””โ”€โ”€โ”€โ”€ +7 study days โ”€โ”€โ”€โ”€โ–บ REVISION 3
๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026 ๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026

The planner also respects the exam boundary and available study days.


๐Ÿ—๏ธ Architecture

The repository is a TypeScript monorepo containing the React frontend, Express/TypeScript API, and shared schemas/types.

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
๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026 ๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026

๐Ÿง  Why the AI Layer Is Replaceable

I didn't want the entire application to become dependent on one model.

The architecture therefore separates:

                APPLICATION

                    โ”‚
                    โ–ผ
             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
             โ”‚ AI PROVIDER โ”‚
             โ”‚ INTERFACE   โ”‚
             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                    โ”‚
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ–ผ         โ–ผ         โ–ผ
       Ollama     Gemini     Fake
       + Gemma     + Gemma   Provider
๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026 ๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026

The model can change without rewriting the planning engine, database layer, or frontend.

The repository currently exposes ollama, gemini, and fake provider modes.


๐Ÿ›ก๏ธ AI Security and Trust Boundaries

The system treats uploaded study material as untrusted input.

USER MATERIAL
     โ”‚
     โ”‚ untrusted
     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ nonce +      โ”‚
โ”‚ delimiters   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ–ผ
     GEMMA
       โ”‚
       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ tolerant     โ”‚
โ”‚ JSON parsing โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Zod schema   โ”‚
โ”‚ validation   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ source       โ”‚
โ”‚ evidence     โ”‚
โ”‚ verification โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ–ผ
     ACCEPT
๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026 ๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026

The model receives no application secrets or tools.

Its output is never treated as trusted application state.

The repository also documents bounded retries, analysis concurrency limits, upload limits, CORS controls, and environment-based secrets.


๐Ÿงช Testing the Important Parts

I didn't want the project to only work in a happy-path demo.

The current test suite covers multiple layers:

Layer What is tested
Shared Schemas and shared logic
API Business logic and routes
Web Frontend behavior
HTTP End-to-end API routing
Planning Priority, capacity, scheduling
Randomized invariants Planner safety properties
PostgreSQL Real persistence
Concurrency Rebalance/version behavior
PDF extraction Real document parsing

Current validation:

423 automated tests passing

and

20/20 real PostgreSQL integration tests passing

The integration tests include persistence and concurrent plan-rebalancing scenarios.


๐Ÿ“Š What the Test Numbers Actually Mean

AUTOMATED TESTS

Shared       โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  22
API          โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 358
Web          โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 43
                                  โ”€โ”€โ”€
TOTAL                              423
๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026 ๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026

Real database integration:

PostgreSQL integration

Passed     โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 20
Failed                           0
๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026 ๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026

I also validated the PDF extraction pipeline against a real academic PDF and compared the extracted page structure against the source.


๐Ÿงฐ Technology Stack

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

๐ŸŒ Why Open Innovation Matters

Study material can be surprisingly sensitive.

It can contain:

  • Personal information
  • University documents
  • Assignments
  • Private notes
  • Exam preparation
  • Proprietary material

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

Gemma sits behind an AI-provider abstraction instead of being hardcoded into the application's business logic.

That gives the project a useful property:

The intelligence can evolve without rebuilding the product around a single AI provider.


๐Ÿ†š What PrepFlow Is โ€” And Isn't

PrepFlow is PrepFlow isn't
AI-assisted planning A generic chatbot
Evidence-backed analysis Blind LLM output
Deterministic scheduling LLM-generated timetable
Capacity-aware โ€œEverything fitsโ€ fantasy
Revision-aware One-time checklist
Explainable Black-box prioritization
Open-weight AI compatible Locked to one provider
Built around execution Just another note summarizer

๐Ÿ’ก The Engineering Lesson

The biggest thing I learned wasn't how to connect an AI model to a backend.

It was learning where not to use AI.

A tempting architecture would have been:

PDF
 โ”‚
 โ–ผ
LLM
 โ”‚
 โ–ผ
"Here is your study plan."
๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026 ๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026

It's easy.

It's also difficult to trust.

PrepFlow instead looks more like:

                 AI
                  โ”‚
                  โ–ผ
        UNDERSTAND THE MATERIAL
                  โ”‚
                  โ–ผ
             STRUCTURED DATA
                  โ”‚
                  โ–ผ
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚ DETERMINISTIC CODE โ”‚
        โ”‚                    โ”‚
        โ”‚ Validate           โ”‚
        โ”‚ Prioritize         โ”‚
        โ”‚ Calculate          โ”‚
        โ”‚ Schedule           โ”‚
        โ”‚ Revise             โ”‚
        โ”‚ Recover            โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚
                  โ–ผ
             REAL PLAN
๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026 ๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026

That separation gives me much more confidence in the system.


๐Ÿš€ What's Next

PrepFlow is intentionally an MVP.

The next areas I'd explore are:

Area Possible improvement
Documents OCR for scanned PDFs
AI More provider/model evaluation
Knowledge Better prerequisite inference
Planning Calendar-aware scheduling
Progress More sophisticated learning models
AI runtime Additional local/open-weight providers
UX Topic editing and plan refinement
Validation Larger real-student testing

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.


๐Ÿ”— Try It

Source Code

github.com/piyusshhjangid/PrepFlow

Local Development

npm install
npm run db:migrate
npm run db:seed

npm run dev:api
npm run dev:web
๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026 ๐Ÿ† Live Soccer TV: piyusshhjangid/prepflow from study material to an actual study plan e - Info Live Streaming 2026

Then open the web application.

The repository also documents the local Gemma/Ollama and hosted Gemma provider setup.


โค๏ธ Why โ€œBuild for a Friendโ€ Matters

Building for a friend changes the question.

Instead of:

โ€œWhat AI feature can I add?โ€

you start asking:

โ€œWhat is actually making this person's life harder?โ€

For PrepFlow, the answer was:

Students don't necessarily need more study material.

They need help turning the material they already have into a realistic sequence of actions.

So that's what I built.

Not another chatbot.

Not another PDF summarizer.

A system that tries to answer one deceptively difficult question:

What should I study next?


Built for the Hacktoberfest Weekend Challenge โ€” Build for a Friend.

devchallenge #weekendchallenge #hf26challenge #gemma

Top comments (0)