<?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: Let Gemma Turn Your Syllabus Into a Study Plan</title>
      <dc:creator>Piyush</dc:creator>
      <pubDate>Sun, 25 Oct 2026 05:29:22 +0000</pubDate>
      <link>https://dev.to/piyusshhjangid/prepflow-let-gemma-turn-your-syllabus-into-a-study-plan-38f4</link>
      <guid>https://dev.to/piyusshhjangid/prepflow-let-gemma-turn-your-syllabus-into-a-study-plan-38f4</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week3-2026-10-19"&gt;Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady&lt;/a&gt; 🦥&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;I built &lt;strong&gt;PrepFlow&lt;/strong&gt;, an open-source study planner that turns a syllabus and notes into a prioritized, day-by-day plan for an exam.&lt;/p&gt;

&lt;p&gt;The task I wanted to make easier is the planning around studying: pulling topics out of course material, estimating how much work they need, deciding what to study first, and fitting it all around the time left before an exam. When a day gets missed, the plan needs to recover too.&lt;/p&gt;

&lt;p&gt;PrepFlow takes text or a text-based PDF, an exam date, and the time available to study. It uses Gemma to propose subjects and topics from the material. Then the application checks the model’s work, estimates effort, prioritizes topics, and schedules study and revision sessions.&lt;/p&gt;

&lt;p&gt;Each topic includes a quote from the source material, so students can check where it came from. If the work does not fit before the exam, PrepFlow explains the capacity problem and shows what it protects and defers.&lt;/p&gt;

&lt;p&gt;The aim is simple: spend less time organizing study and more time learning.&lt;/p&gt;

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

&lt;p&gt;There is no hosted demo yet. PrepFlow has not been deployed or tested with real users. You can run it locally by following the &lt;a href="https://github.com/piyusshhjangid/PrepFlow" rel="noopener noreferrer"&gt;setup guide in the repository&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Local setup
&lt;/h3&gt;

&lt;p&gt;You’ll need Node.js 22.22.2 or newer, PostgreSQL, and either a local Ollama model or a configured hosted AI provider. Docker is optional.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/piyusshhjangid/PrepFlow.git
&lt;span class="nb"&gt;cd &lt;/span&gt;PrepFlow
npm &lt;span class="nb"&gt;install
&lt;/span&gt;npm run db:up
ollama pull gemma4:e4b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copy the API environment example and configure it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Copy-Item&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;apps/api/.env.example&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;apps/api/.env&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set the database and AI provider values in &lt;code&gt;apps/api/.env&lt;/code&gt;, then apply the database migrations:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Start the API and frontend in separate terminals:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run dev:api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run dev:web
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open &lt;a href="http://localhost:5173" rel="noopener noreferrer"&gt;http://localhost:5173&lt;/a&gt;. The README includes Windows setup instructions for using PostgreSQL without Docker, environment-variable details, and troubleshooting.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/piyusshhjangid/PrepFlow" rel="noopener noreferrer"&gt;piyusshhjangid/PrepFlow on GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The repository contains the full-stack application, setup instructions, architecture and pipeline docs, and a preserved browser-only prototype with its own evaluation materials.&lt;/p&gt;

&lt;p&gt;The supported application is the full-stack monorepo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apps/web         React + TypeScript + Vite frontend
apps/api         Express + TypeScript backend
packages/shared  Zod schemas and types shared by frontend and backend
Prisma           PostgreSQL schema and migrations
docs/            Setup, architecture, AI, security, planning, and deployment docs
experiments/     Preserved browser-only prototype and its separate evaluation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The main application and the browser-only prototype came from different branches and have different architectures. I kept the prototype under &lt;code&gt;experiments/sloth-browser-prototype/&lt;/code&gt; rather than mixing its browser-only design into the full-stack app. Its evaluation files describe that prototype; they are not benchmarks of the full-stack application.&lt;/p&gt;

&lt;h3&gt;
  
  
  The analysis and planning flow
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Text or text-based PDF
        ↓
Extract and split material into chunks
        ↓
Gemma proposes subjects and topics
        ↓
Parse and validate the model response
        ↓
Check evidence against the original material
        ↓
Merge topics and estimate effort
        ↓
Save analysis to PostgreSQL
        ↓
Prioritize topics and build a capacity-aware plan
        ↓
Study tasks, revision, and progress
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The repository also contains an architecture illustration for the &lt;strong&gt;preserved browser-only prototype&lt;/strong&gt;. It is not a diagram of the full-stack app:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fpiyusshhjangid%2FPrepFlow%2Fmain%2Fexperiments%2Fsloth-browser-prototype%2Fdocs%2Farchitecture.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fpiyusshhjangid%2FPrepFlow%2Fmain%2Fexperiments%2Fsloth-browser-prototype%2Fdocs%2Farchitecture.svg" alt="Architecture of the preserved PrepFlow browser-only prototype, where study input flows through Gemma analysis, evidence checks, deterministic planning, and daily tasks" width="760" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;PrepFlow is a TypeScript monorepo. The frontend uses React, Vite, and Tailwind. The API uses Express and TypeScript. PostgreSQL stores application data through Prisma, and shared Zod schemas keep validation consistent between the frontend and backend.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let the model interpret; let application code decide
&lt;/h3&gt;

&lt;p&gt;Gemma has a specific role: it reads study material and proposes structured subjects and topics. The model does not decide the final schedule.&lt;/p&gt;

&lt;p&gt;The API parses the model response and validates it against a schema. It then checks the proposed topic evidence against the original material. Application code handles persistence, topic merging, effort estimates, priorities, prerequisite handling, available capacity, dates, and revision scheduling.&lt;/p&gt;

&lt;p&gt;That boundary makes the result easier to inspect. The model can help interpret text, while the important planning rules stay in code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Evidence students can inspect
&lt;/h3&gt;

&lt;p&gt;PrepFlow checks whether a proposed quote can be found in the source material. Evidence gets a support label:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;direct&lt;/code&gt; means the evidence closely supports the topic.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;nearby&lt;/code&gt; means related evidence appears close to the match.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;weak&lt;/code&gt; means the match is uncertain and should be treated cautiously.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Weak evidence is surfaced as a caution instead of being silently presented as strong support. The topic also keeps its source quote so a student can review it.&lt;/p&gt;

&lt;p&gt;Importance is checked against material emphasis too. If the model marks a topic as highly important without a supporting emphasis cue in the source, PrepFlow lowers the importance to medium. The goal is to avoid treating a model’s confident wording as proof.&lt;/p&gt;

&lt;h3&gt;
  
  
  A plan that accounts for time
&lt;/h3&gt;

&lt;p&gt;Planning is deterministic. PrepFlow uses the exam date, study days, daily time budget, topic importance, confidence, weak-topic status, and prerequisites to organize work.&lt;/p&gt;

&lt;p&gt;The plan includes revision sessions after studying a topic, and avoids scheduling revision after the final study day. If all the work will not fit, PrepFlow reports the mismatch and shows what was deferred rather than hiding the capacity problem.&lt;/p&gt;

&lt;p&gt;The app also includes a daily task view, task completion tracking, progress, missed-work recovery, and plan rebalancing. Rebalancing creates a new plan version while preserving completed work.&lt;/p&gt;

&lt;h3&gt;
  
  
  Main application API
&lt;/h3&gt;

&lt;p&gt;The API exposes endpoints for analysis, plans, and daily work. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST /api/exams/:examId/analysis
GET  /api/exams/:examId/analysis/result
POST /api/exams/:examId/plan
GET  /api/exams/:examId/plan/today
POST /api/exams/:examId/plan/rebalance
POST /api/study-tasks/:taskId/complete
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Testing and verification
&lt;/h3&gt;

&lt;p&gt;The repository includes shared, API, frontend, and PostgreSQL integration tests. Automated AI tests use a deterministic fake provider so they do not need a model or network access.&lt;/p&gt;

&lt;p&gt;I have not verified a real Gemma run for this submission, and the app has not been deployed. The full test and build suite also has not been verified locally on my machine, so I’m not claiming production readiness or real-model quality results.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;Open-weight AI makes it possible to build a local inference path. PrepFlow can run Gemma through Ollama, giving users the option to process their study materials with a model running on their configured machine.&lt;/p&gt;

&lt;p&gt;The model layer is also replaceable. A hosted provider is supported too, but the parsing, validation, evidence checks, and planning rules live in the application. Those rules can be inspected and improved without depending on a closed API to decide how a student should spend their time.&lt;/p&gt;

&lt;p&gt;There is a privacy trade-off to be clear about: when a hosted provider is configured, material chunks are sent to that provider. Local Ollama inference is the option for keeping model requests local, but I have not verified a real Gemma run for this submission.&lt;/p&gt;

&lt;p&gt;Open source also made it possible to preserve and compare the browser prototype separately from the full-stack application. The prototype remains available for its own code and evaluation artifacts without confusing its results with the main app.&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s Next
&lt;/h2&gt;

&lt;p&gt;The next useful validation is a real end-to-end session: run a real Gemma model on sample study material, inspect the resulting evidence and plan, capture genuine screenshots, and test the workflow with students who consent to give feedback.&lt;/p&gt;

&lt;p&gt;That would help answer the questions automated checks can’t: do the source quotes make the topics trustworthy, does the plan feel realistic, and is the recovery flow helpful after a missed day?&lt;/p&gt;

&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;I don’t have a shareable agent-session link for this submission.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Lazy Payoff
&lt;/h2&gt;

&lt;p&gt;I haven’t measured minutes saved or tested PrepFlow with real students, so I can’t claim a specific time-saving number yet.&lt;/p&gt;

&lt;p&gt;The intended payoff is fewer rounds of copying topics into a planner, guessing how much time they need, and rebuilding the schedule after a disruption. PrepFlow handles that planning work and shows its reasoning, so students can spend less energy organizing and more time studying.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma:&lt;/strong&gt; PrepFlow includes a local Gemma-through-Ollama integration. A real-model run is not yet verified or shown in a public demo, so the integration is implemented but not demonstrated here.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  hf26challenge #devchallenge #hacktoberfest #ai #opensource
&lt;/h1&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>BriefBill: Turning Messy Client Briefs into Professional Proposals with Gemma</title>
      <dc:creator>Piyush</dc:creator>
      <pubDate>Sun, 18 Oct 2026 19:38:10 +0000</pubDate>
      <link>https://dev.to/piyusshhjangid/briefbill-turning-messy-client-briefs-into-professional-proposals-with-gemma-4gk8</link>
      <guid>https://dev.to/piyusshhjangid/briefbill-turning-messy-client-briefs-into-professional-proposals-with-gemma-4gk8</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12"&gt;Hacktoberfest Open-Source AI Challenge — Week 2: Side Hustle&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;Freelancers often receive client requests through scattered messages, rough notes, or vague descriptions. Turning those into a clear proposal takes time—and missing a requirement early can lead to confusion later.&lt;/p&gt;

&lt;p&gt;I built &lt;strong&gt;BriefBill&lt;/strong&gt;, an AI-powered proposal generator that helps freelancers turn a messy client brief into a structured, editable proposal.&lt;/p&gt;

&lt;p&gt;BriefBill is designed to help freelancers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Extract key requirements from a client's brief.&lt;/li&gt;
&lt;li&gt;Organize deliverables, assumptions, and unanswered questions.&lt;/li&gt;
&lt;li&gt;Draft a professional proposal that can be reviewed and edited.&lt;/li&gt;
&lt;li&gt;Work with a structured proposal instead of starting from a blank page.&lt;/li&gt;
&lt;li&gt;Prepare a client-ready document using the proposal's editing and print/export workflow.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The intended users are independent freelancers and small service businesses that want to spend less time formatting proposals and more time delivering their work.&lt;/p&gt;

&lt;p&gt;The business idea is straightforward: if BriefBill saves freelancers time and helps them communicate scope more clearly, it could become a useful paid tool. That is a hypothesis I want to validate with real users.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Try BriefBill:&lt;/strong&gt; &lt;a href="https://briefbill.onrender.com/" rel="noopener noreferrer"&gt;https://briefbill.onrender.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The application is publicly deployed. Try entering a realistic client brief and review the generated proposal, including the extracted requirements, deliverables, assumptions, and questions.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;GitHub repository:&lt;/strong&gt; &lt;a href="https://github.com/piyusshhjangid/BriefBill" rel="noopener noreferrer"&gt;https://github.com/piyusshhjangid/BriefBill&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The repository contains the application source code and setup instructions.&lt;/p&gt;

&lt;p&gt;I wanted this to be more than an AI prompt wrapped in a UI. The project includes a structured generation workflow, validation, and tests around the application's behavior.&lt;/p&gt;

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

&lt;p&gt;BriefBill combines a web application with a Gemma-powered proposal-generation workflow.&lt;/p&gt;

&lt;p&gt;The AI integration uses &lt;strong&gt;Gemma 4 26B A4B IT&lt;/strong&gt;, accessed through Google's Gemini API. The model helps interpret unstructured client briefs and produce structured proposal content.&lt;/p&gt;

&lt;p&gt;The core workflow is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Input:&lt;/strong&gt; The freelancer provides a client brief.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analysis:&lt;/strong&gt; Gemma interprets the request and identifies requirements, deliverables, assumptions, and missing information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validation:&lt;/strong&gt; The generated output is checked against the application's expected structure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Proposal creation:&lt;/strong&gt; The structured result is presented in an editable proposal workflow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Finalization:&lt;/strong&gt; The freelancer can review the content and prepare it for sharing or printing.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One important design decision is to keep proposal content generation separate from deterministic application logic. AI is useful for interpreting ambiguous language and drafting content; calculations and other predictable operations should be handled by application code rather than relying on the model to do arithmetic correctly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Testing and verification
&lt;/h3&gt;

&lt;p&gt;Before deployment, I ran the project's automated checks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;131 tests passed&lt;/strong&gt; across 8 test files.&lt;/li&gt;
&lt;li&gt;Production build completed successfully.&lt;/li&gt;
&lt;li&gt;Lint checks passed.&lt;/li&gt;
&lt;li&gt;Formatting checks passed.&lt;/li&gt;
&lt;li&gt;The live-inference verification command succeeded locally, and the returned output passed schema validation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The live-inference check was a functional verification, not a benchmark. I am not claiming a particular accuracy rate or production-scale performance from it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;For a project like BriefBill, the quality of the result depends on how well a model handles ordinary but ambiguous language.&lt;/p&gt;

&lt;p&gt;A freelancer might write something like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“I need a simple website for my bakery with a menu, contact form, and a way to update products. Can you give me a quote?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Turning that into a useful proposal requires more than rewriting the sentence. The system needs to identify the requested work, recognize what remains unclear, and organize the information into something a client can review.&lt;/p&gt;

&lt;p&gt;Gemma gave me a model I could integrate into that workflow and evaluate as part of a real application. The open-weight model ecosystem also creates opportunities for developers to experiment with different deployment approaches, compare models, and build more specialized products around their capabilities.&lt;/p&gt;

&lt;p&gt;For this version, I use the Gemini API rather than claiming to self-host the model. That distinction matters: open-weight models can expand developer choice, but the actual hosting and inference setup still determines the costs, privacy properties, and operational constraints of an application.&lt;/p&gt;

&lt;p&gt;My goal with BriefBill is to demonstrate a practical use of an open-weight model—not just ask it a question, but make it one component of a product with a defined audience, a repeatable workflow, and validation around its output.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Primary category: Best Use of Gemma&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;BriefBill integrates Gemma into a concrete workflow for transforming unstructured client requests into structured proposals.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Want to Improve Next
&lt;/h2&gt;

&lt;p&gt;The next step is to get feedback from freelancers who regularly prepare client proposals. I want to learn whether the generated structure is genuinely useful, which parts need the most editing, and whether the tool saves enough time to justify paying for it.&lt;/p&gt;

&lt;p&gt;Other priorities include improving proposal quality for different freelance services, refining error handling, and evaluating the experience with a broader range of real-world briefs.&lt;/p&gt;

&lt;p&gt;BriefBill is a working starting point, and I want to improve it based on actual usage rather than assumptions.&lt;/p&gt;




&lt;p&gt;Built for the Hacktoberfest Open-Source AI Challenge — Week 2: Side Hustle.&lt;/p&gt;

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

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>gemma</category>
      <category>opensource</category>
    </item>
    <item>
      <title>🌿 PocketWalk: Building an AI-Assisted Walking Planner With Deterministic Fallbacks</title>
      <dc:creator>Piyush</dc:creator>
      <pubDate>Mon, 12 Oct 2026 04:03:27 +0000</pubDate>
      <link>https://dev.to/piyusshhjangid/pocketwalk-building-an-ai-assisted-walking-planner-with-deterministic-fallbacks-35kd</link>
      <guid>https://dev.to/piyusshhjangid/pocketwalk-building-an-ai-assisted-walking-planner-with-deterministic-fallbacks-35kd</guid>
      <description>&lt;p&gt;A small experiment in making AI useful without making it responsible for everything.&lt;/p&gt;

&lt;p&gt;What if planning a short walk took less effort than deciding whether to go outside?&lt;/p&gt;

&lt;p&gt;PocketWalk is an AI-assisted walking planner that turns a few simple preferences into a structured walking plan. Choose a duration, select a difficulty, optionally enter a city, and get a practical three-step plan designed to help you spend less time planning and more time walking.&lt;/p&gt;

&lt;p&gt;But the interesting part isn't just generating a plan with AI. It's deciding what should happen when AI returns unexpected output, a provider is unavailable, or a generated suggestion needs additional validation.&lt;/p&gt;

&lt;p&gt;That is the engineering problem I wanted to explore.&lt;/p&gt;

&lt;p&gt;Live app: &lt;a href="https://pocketwalk.onrender.com" rel="noopener noreferrer"&gt;https://pocketwalk.onrender.com&lt;/a&gt;&lt;br&gt;
Demo video: [INSERT YOUR DEMO VIDEO URL]&lt;br&gt;
Source code: [INSERT YOUR GITHUB REPOSITORY URL]&lt;/p&gt;

&lt;p&gt;🌱 01. The Problem: Planning Shouldn't Become Another Task&lt;/p&gt;

&lt;p&gt;Going for a walk sounds simple, but even a small decision can involve several questions:&lt;/p&gt;

&lt;p&gt;How much time do I have?&lt;/p&gt;

&lt;p&gt;Should I take an easy walk or something more active?&lt;/p&gt;

&lt;p&gt;What should I do during the walk?&lt;/p&gt;

&lt;p&gt;What if I don't know the area?&lt;/p&gt;

&lt;p&gt;Can I get a useful suggestion without creating another account or sharing unnecessary information?&lt;/p&gt;

&lt;p&gt;I wanted to build a small tool that reduces this friction.&lt;/p&gt;

&lt;p&gt;PocketWalk focuses on a deliberately narrow workflow:&lt;/p&gt;

&lt;p&gt;Input&lt;/p&gt;

&lt;p&gt;Purpose&lt;/p&gt;

&lt;p&gt;Duration&lt;/p&gt;

&lt;p&gt;Plan a 10, 20, or 40-minute walk&lt;/p&gt;

&lt;p&gt;Difficulty&lt;/p&gt;

&lt;p&gt;Choose easy or normal&lt;/p&gt;

&lt;p&gt;Optional city&lt;/p&gt;

&lt;p&gt;Supply location context when available&lt;/p&gt;

&lt;p&gt;Generated plan&lt;/p&gt;

&lt;p&gt;Receive a structured, three-step walking experience&lt;/p&gt;

&lt;p&gt;The product deliberately avoids accounts, persistent walking history, GPS tracking, and notifications.&lt;/p&gt;

&lt;p&gt;The objective is not to build another giant wellness platform. It is to make one small activity easier to start.&lt;/p&gt;

&lt;p&gt;🏗️ 02. Architecture: Where AI Fits in the System&lt;/p&gt;

&lt;p&gt;PocketWalk uses a React and TypeScript frontend with an Express-based backend. The AI integration is designed to support a Gemma-compatible provider path, alongside a deterministic fallback.&lt;/p&gt;

&lt;p&gt;The important architectural decision is that model output should not automatically become trusted application output.&lt;/p&gt;

&lt;p&gt;flowchart TD&lt;br&gt;
    A[React + TypeScript UI] --&amp;gt; B[Express API]&lt;br&gt;
    B --&amp;gt; C[Request Validation]&lt;br&gt;
    C --&amp;gt; D{AI Provider Available?}&lt;br&gt;
    D --&amp;gt;|Yes| E[AI Generation]&lt;br&gt;
    D --&amp;gt;|No| F[Deterministic Fallback]&lt;br&gt;
    E --&amp;gt; G[Parse and Validate Output]&lt;br&gt;
    G --&amp;gt;|Valid| H[Structured Walk Plan]&lt;br&gt;
    G --&amp;gt;|Invalid| F&lt;br&gt;
    F --&amp;gt; H&lt;br&gt;
    H --&amp;gt; I[Display Plan to User]&lt;/p&gt;

&lt;p&gt;This is a conceptual view of the intended flow. Confirm exact module boundaries and error paths against the current source code before treating it as a complete implementation diagram.&lt;/p&gt;

&lt;p&gt;The responsibilities are intentionally separated&lt;/p&gt;

&lt;p&gt;Frontend — React and TypeScript&lt;/p&gt;

&lt;p&gt;Collects user preferences, submits requests, and presents the resulting walking plan.&lt;/p&gt;

&lt;p&gt;Backend — Express&lt;/p&gt;

&lt;p&gt;Handles API requests and provides a controlled boundary between the UI, external providers, and application logic.&lt;/p&gt;

&lt;p&gt;AI integration&lt;/p&gt;

&lt;p&gt;Generates contextual suggestions when a configured provider is available. The project supports a Gemma-compatible path, but the recorded demo does not show a live Gemma inference.&lt;/p&gt;

&lt;p&gt;Validation and fallback&lt;/p&gt;

&lt;p&gt;Generated output must be parsed and checked rather than accepted blindly. The fallback provides a deterministic alternative when AI generation is unavailable or unsuitable.&lt;/p&gt;

&lt;p&gt;This separation also makes it easier to change providers without making the entire application dependent on one model.&lt;/p&gt;

&lt;p&gt;💻 03. Engineering Detail: Treating AI Output as Untrusted&lt;/p&gt;

&lt;p&gt;One of the most important lessons from this project is that a successful API response does not automatically mean a useful or safe application response.&lt;/p&gt;

&lt;p&gt;An AI provider can return malformed JSON, unexpected fields, missing values, or suggestions that fail application-specific checks.&lt;/p&gt;

&lt;p&gt;The following simplified TypeScript example illustrates the validation boundary. It is an explanatory example, not a verbatim excerpt from PocketWalk.&lt;/p&gt;

&lt;p&gt;type WalkDifficulty = "easy" | "normal";&lt;/p&gt;

&lt;p&gt;type WalkRequest = {&lt;br&gt;
  durationMinutes: 10 | 20 | 40;&lt;br&gt;
  difficulty: WalkDifficulty;&lt;br&gt;
  city?: string;&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;function validateWalkRequest(&lt;br&gt;
  input: unknown&lt;br&gt;
): WalkRequest | null {&lt;br&gt;
  if (typeof input !== "object" || input === null) {&lt;br&gt;
    return null;&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;const value = input as Record;&lt;/p&gt;

&lt;p&gt;const validDuration =&lt;br&gt;
    value.durationMinutes === 10 ||&lt;br&gt;
    value.durationMinutes === 20 ||&lt;br&gt;
    value.durationMinutes === 40;&lt;/p&gt;

&lt;p&gt;const validDifficulty =&lt;br&gt;
    value.difficulty === "easy" ||&lt;br&gt;
    value.difficulty === "normal";&lt;/p&gt;

&lt;p&gt;if (!validDuration || !validDifficulty) {&lt;br&gt;
    return null;&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;if (&lt;br&gt;
    value.city !== undefined &amp;amp;&amp;amp;&lt;br&gt;
    typeof value.city !== "string"&lt;br&gt;
  ) {&lt;br&gt;
    return null;&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;return {&lt;br&gt;
    durationMinutes: value.durationMinutes,&lt;br&gt;
    difficulty: value.difficulty,&lt;br&gt;
    ...(typeof value.city === "string"&lt;br&gt;
      ? { city: value.city }&lt;br&gt;
      : {}),&lt;br&gt;
  };&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Why this boundary matters&lt;/p&gt;

&lt;p&gt;It prevents arbitrary values from entering the core planning workflow.&lt;/p&gt;

&lt;p&gt;It makes the supported request shape explicit.&lt;/p&gt;

&lt;p&gt;It gives the backend a predictable contract.&lt;/p&gt;

&lt;p&gt;It allows invalid input to be rejected before expensive provider calls.&lt;/p&gt;

&lt;p&gt;In production code, I would prefer a shared runtime schema validator for stronger type inference, precise error messages, and consistent validation across routes.&lt;/p&gt;

&lt;p&gt;Model output needs its own validation&lt;/p&gt;

&lt;p&gt;Request validation is only the first boundary. AI-generated output requires independent checks.&lt;/p&gt;

&lt;p&gt;type WalkStep = {&lt;br&gt;
  title: string;&lt;br&gt;
  description: string;&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;type WalkPlan = {&lt;br&gt;
  steps: WalkStep[];&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;// Illustrative validation boundary.&lt;br&gt;
// A real implementation must validate every field and constraint.&lt;br&gt;
function validatePlanShape(&lt;br&gt;
  value: unknown&lt;br&gt;
): value is WalkPlan {&lt;br&gt;
  if (typeof value !== "object" || value === null) {&lt;br&gt;
    return false;&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;const steps = (value as Record).steps;&lt;/p&gt;

&lt;p&gt;return (&lt;br&gt;
    Array.isArray(steps) &amp;amp;&amp;amp;&lt;br&gt;
    steps.length === 3 &amp;amp;&amp;amp;&lt;br&gt;
    steps.every(&lt;br&gt;
      (step) =&amp;gt;&lt;br&gt;
        typeof step === "object" &amp;amp;&amp;amp;&lt;br&gt;
        step !== null &amp;amp;&amp;amp;&lt;br&gt;
        typeof (step as Record).title === "string" &amp;amp;&amp;amp;&lt;br&gt;
        typeof (step as Record).description === "string"&lt;br&gt;
    )&lt;br&gt;
  );&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;This checks structure, not real-world safety. Even a structurally valid plan may contain an inappropriate recommendation.&lt;/p&gt;

&lt;p&gt;That distinction is essential: schema validation can establish that output has the expected shape; it cannot prove that a route is safe or that every recommendation is correct.&lt;/p&gt;

&lt;p&gt;🛡️ 04. Fallbacks, Determinism, and Safety&lt;/p&gt;

&lt;p&gt;AI availability should not be the single point of failure for a small utility.&lt;/p&gt;

&lt;p&gt;PocketWalk includes a deterministic fallback path so the core experience can remain useful without a successful AI response.&lt;/p&gt;

&lt;p&gt;The intended behavior can be summarized as follows:&lt;/p&gt;

&lt;p&gt;Situation&lt;/p&gt;

&lt;p&gt;Design response&lt;/p&gt;

&lt;p&gt;Valid request&lt;/p&gt;

&lt;p&gt;Continue through the planning workflow&lt;/p&gt;

&lt;p&gt;Provider available&lt;/p&gt;

&lt;p&gt;Attempt AI-assisted generation&lt;/p&gt;

&lt;p&gt;Invalid generated structure&lt;/p&gt;

&lt;p&gt;Reject it rather than trusting it&lt;/p&gt;

&lt;p&gt;Provider unavailable&lt;/p&gt;

&lt;p&gt;Use deterministic fallback behavior&lt;/p&gt;

&lt;p&gt;Safety-related concern&lt;/p&gt;

&lt;p&gt;Apply application-level checks and provide appropriate caveats&lt;/p&gt;

&lt;p&gt;The project includes parsing, schema validation, business rules, and deterministic safety filters. These checks reduce avoidable errors, but they do not guarantee that a walking route is safe.&lt;/p&gt;

&lt;p&gt;PocketWalk should not be presented as a live navigation or emergency-response system. Users should exercise judgment, follow local conditions, and use established navigation or emergency services when necessary.&lt;/p&gt;

&lt;p&gt;Why I chose a fallback-first mindset&lt;/p&gt;

&lt;p&gt;A demo that works only when a particular model is available is fragile.&lt;/p&gt;

&lt;p&gt;A more resilient design separates the application's basic utility from the availability of its AI provider. This also makes testing easier because deterministic behavior can be exercised without depending on external model responses.&lt;/p&gt;

&lt;p&gt;🎨 05. The User Experience: Keep the Interface Focused&lt;/p&gt;

&lt;p&gt;PocketWalk is designed around a short interaction rather than a complicated dashboard.&lt;/p&gt;

&lt;p&gt;The main flow is:&lt;/p&gt;

&lt;p&gt;Choose a walk duration.&lt;/p&gt;

&lt;p&gt;Select the desired difficulty.&lt;/p&gt;

&lt;p&gt;Optionally provide a city.&lt;/p&gt;

&lt;p&gt;Generate and review the plan.&lt;/p&gt;

&lt;p&gt;Decide whether the suggested activity fits the situation.&lt;/p&gt;

&lt;p&gt;The interface should make the next action obvious and avoid asking for information that the core experience does not require.&lt;/p&gt;

&lt;p&gt;Suggested visual placements for the published article:&lt;/p&gt;

&lt;p&gt;[SCREENSHOT 1 — Home screen] Show the actual deployed app and its primary controls.&lt;/p&gt;

&lt;p&gt;[SCREENSHOT 2 — Generated plan] Show the three-step output and its readability on desktop or mobile.&lt;/p&gt;

&lt;p&gt;[SCREENSHOT 3 — Fallback behavior] Show the real fallback experience, if it can be captured reliably.&lt;/p&gt;

&lt;p&gt;[SCREENSHOT 4 — Responsive UI] Show the same workflow at a mobile viewport.&lt;/p&gt;

&lt;p&gt;Use screenshots from the real application rather than stock images. A short GIF of the complete interaction would be even more useful near the beginning of the article.&lt;/p&gt;

&lt;p&gt;🔄 06. The Request Lifecycle&lt;/p&gt;

&lt;p&gt;The following sequence shows the logical responsibilities involved in generating a plan.&lt;/p&gt;

&lt;p&gt;sequenceDiagram&lt;br&gt;
    actor User&lt;br&gt;
    participant UI as React UI&lt;br&gt;
    participant API as Express API&lt;br&gt;
    participant AI as AI Provider&lt;br&gt;
    participant V as Validation&lt;br&gt;
    participant F as Fallback&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User-&amp;gt;&amp;gt;UI: Select preferences
UI-&amp;gt;&amp;gt;API: Submit walk request
API-&amp;gt;&amp;gt;API: Validate request
API-&amp;gt;&amp;gt;AI: Request generated plan
AI--&amp;gt;&amp;gt;API: Candidate output
API-&amp;gt;&amp;gt;V: Parse and validate

alt Output passes checks
    V--&amp;gt;&amp;gt;API: Validated plan
else Provider or output failure
    API-&amp;gt;&amp;gt;F: Create fallback plan
    F--&amp;gt;&amp;gt;API: Deterministic plan
end

API--&amp;gt;&amp;gt;UI: Return plan
UI--&amp;gt;&amp;gt;User: Display result
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This is a logical sequence diagram, not evidence that every branch was exercised in the recorded demo. The fallback path is part of the documented design; the demo uses fallback behavior rather than a live Gemma inference.&lt;/p&gt;

&lt;p&gt;🧪 07. Testing and Verification&lt;/p&gt;

&lt;p&gt;A project should be evaluated by what was tested, not just by how polished the demo looks.&lt;/p&gt;

&lt;p&gt;The project verification snapshot recorded the following test counts:&lt;/p&gt;

&lt;p&gt;Test suite&lt;/p&gt;

&lt;p&gt;Recorded result&lt;/p&gt;

&lt;p&gt;Backend tests&lt;/p&gt;

&lt;p&gt;636&lt;/p&gt;

&lt;p&gt;Frontend tests&lt;/p&gt;

&lt;p&gt;151&lt;/p&gt;

&lt;p&gt;Browser checks — suite 1&lt;/p&gt;

&lt;p&gt;48&lt;/p&gt;

&lt;p&gt;Browser checks — suite 2&lt;/p&gt;

&lt;p&gt;22&lt;/p&gt;

&lt;p&gt;Browser checks — suite 3&lt;/p&gt;

&lt;p&gt;9&lt;/p&gt;

&lt;p&gt;These are counts from the recorded verification artifacts, not a claim that every test represents a unique feature or that every production integration is verified.&lt;/p&gt;

&lt;p&gt;The project also recorded build, bundle-scan, documentation-check, and audit checks. The exact status of each check should be confirmed against the latest repository state before publication.&lt;/p&gt;

&lt;p&gt;What the test counts do not prove&lt;/p&gt;

&lt;p&gt;Passing local tests does not automatically establish that:&lt;/p&gt;

&lt;p&gt;A live Gemma request succeeds in production.&lt;/p&gt;

&lt;p&gt;Live weather data is available in every environment.&lt;/p&gt;

&lt;p&gt;Sentry events are reaching a configured external project.&lt;/p&gt;

&lt;p&gt;A Docker image builds successfully.&lt;/p&gt;

&lt;p&gt;GitHub Actions has completed successfully.&lt;/p&gt;

&lt;p&gt;Every generated walking suggestion is safe.&lt;/p&gt;

&lt;p&gt;The recorded demo does not demonstrate live Gemma inference, live weather verification, Sentry ingestion, a Docker build, or a GitHub Actions run.&lt;/p&gt;

&lt;p&gt;I would rather state those limitations clearly than imply that unverified integrations work.&lt;/p&gt;

&lt;p&gt;🚀 08. Deployment&lt;/p&gt;

&lt;p&gt;PocketWalk is deployed at:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pocketwalk.onrender.com" rel="noopener noreferrer"&gt;https://pocketwalk.onrender.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The recorded deployment check confirmed that the application was reachable and that the root page returned HTTP 200.&lt;/p&gt;

&lt;p&gt;The documented production configuration uses the deterministic AI fallback (GEMMA_PROVIDER=none), the Open-Meteo weather provider configuration, and disabled Sentry reporting. A configured weather provider is not, by itself, proof that every live weather request succeeds.&lt;/p&gt;

&lt;p&gt;This deployment was useful for validating the real application entry point, but it should not be confused with verification of every optional integration.&lt;/p&gt;

&lt;p&gt;🧠 09. Why This Is an Open Innovation Project&lt;/p&gt;

&lt;p&gt;I wanted PocketWalk to explore a broader engineering principle: AI should be an optional capability that improves a useful product, not a dependency that makes the product unusable without it.&lt;/p&gt;

&lt;p&gt;That principle influences several design choices:&lt;/p&gt;

&lt;p&gt;Provider flexibility: avoid coupling the entire application to one model.&lt;/p&gt;

&lt;p&gt;Deterministic behavior: retain a useful fallback when generation is unavailable.&lt;/p&gt;

&lt;p&gt;Explicit validation: separate model output from trusted application data.&lt;/p&gt;

&lt;p&gt;Minimal data collection: avoid accounts, persistent history, and unnecessary tracking.&lt;/p&gt;

&lt;p&gt;Honest evaluation: distinguish local tests, deployed behavior, and integrations that remain unverified.&lt;/p&gt;

&lt;p&gt;These decisions make the project easier to reason about and give future contributors clearer places to improve it.&lt;/p&gt;

&lt;p&gt;📚 10. What I Learned&lt;/p&gt;

&lt;p&gt;Building PocketWalk reinforced several lessons for me as a student developer.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;AI integration is more than calling an API.&lt;br&gt;
Parsing, validation, failure handling, and predictable behavior are part of the feature.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A fallback is a product decision.&lt;br&gt;
It protects the basic experience from depending entirely on an external service.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tests and deployment evidence answer different questions.&lt;br&gt;
A passing test suite, a successful build, and a reachable deployment are separate forms of evidence.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Safety claims need boundaries.&lt;br&gt;
Validation can reject known invalid patterns, but it cannot certify that a route is safe in the real world.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scope matters.&lt;br&gt;
A small tool with a clear purpose can be a better learning project than a much larger application with many disconnected features.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🔭 11. What I Would Improve Next&lt;/p&gt;

&lt;p&gt;The next steps should be driven by verified gaps rather than adding features for their own sake.&lt;/p&gt;

&lt;p&gt;Add a repeatable integration test for a real Gemma-compatible provider.&lt;/p&gt;

&lt;p&gt;Verify live weather behavior with both successful responses and provider failures.&lt;/p&gt;

&lt;p&gt;Confirm external Sentry event ingestion with an intentional, safe test event.&lt;/p&gt;

&lt;p&gt;Run and record a reproducible Docker build.&lt;/p&gt;

&lt;p&gt;Verify the complete GitHub Actions workflow from a clean commit.&lt;/p&gt;

&lt;p&gt;Improve accessibility, mobile interaction, and error-state feedback.&lt;/p&gt;

&lt;p&gt;Document the limits of generated suggestions and the fallback behavior.&lt;/p&gt;

&lt;p&gt;Each item should be marked complete only after there is reproducible evidence.&lt;/p&gt;

&lt;p&gt;🌍 12. Closing&lt;/p&gt;

&lt;p&gt;PocketWalk started with a simple question: can an AI-assisted tool make going for a walk easier without making the experience unnecessarily complicated?&lt;/p&gt;

&lt;p&gt;The result is a small walking planner built around a focused UI, a backend API, AI-assisted generation, validation, and deterministic fallback behavior.&lt;/p&gt;

&lt;p&gt;It is not a certified navigation system, and the recorded demo does not prove every optional integration works live. Those boundaries are part of the project story, too.&lt;/p&gt;

&lt;p&gt;For me, the most valuable takeaway is that building with AI means designing for the moments when AI is unavailable, incorrect, or simply not needed.&lt;/p&gt;

&lt;p&gt;Sometimes the best AI product is the one that knows when not to depend on AI.&lt;/p&gt;

&lt;p&gt;Project links&lt;/p&gt;

&lt;p&gt;Live application: &lt;a href="https://pocketwalk.onrender.com" rel="noopener noreferrer"&gt;https://pocketwalk.onrender.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Demo video: &lt;a href="https://youtu.be/wruSn74VnNU" rel="noopener noreferrer"&gt;https://youtu.be/wruSn74VnNU&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub repository: &lt;a href="https://github.com/piyusshhjangid/PocketWalk" rel="noopener noreferrer"&gt;https://github.com/piyusshhjangid/PocketWalk&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Challenge: &lt;a href="https://dev.to/challenges/hacktoberfest-week1-2026-10-05"&gt;https://dev.to/challenges/hacktoberfest-week1-2026-10-05&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  devchallenge #hf26challenge #react #typescript
&lt;/h1&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>react</category>
      <category>typescript</category>
    </item>
    <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>
