<?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: Bikram Pun</title>
    <description>The latest articles on DEV Community by Bikram Pun (@bikrampun).</description>
    <link>https://dev.to/bikrampun</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%2F943546%2F1ebcd183-63a4-4616-a333-56f1485c8e03.jpeg</url>
      <title>DEV Community: Bikram Pun</title>
      <link>https://dev.to/bikrampun</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bikrampun"/>
    <language>en</language>
    <item>
      <title>Restock: next week's order for small shops, from the sales file they already have</title>
      <dc:creator>Bikram Pun</dc:creator>
      <pubDate>Sun, 18 Oct 2026 15:40:21 +0000</pubDate>
      <link>https://dev.to/bikrampun/restock-next-weeks-order-for-small-shops-from-the-sales-file-they-already-have-5e18</link>
      <guid>https://dev.to/bikrampun/restock-next-weeks-order-for-small-shops-from-the-sales-file-they-already-have-5e18</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;Small shops run out of their best sellers on their busiest days. Owners guess how much to order, and on a busy Saturday a guess often isn't enough: the croissants 🥐 are sold out by 10 a.m.&lt;/p&gt;

&lt;p&gt;I built Restock for a small mart in Hetauda, Nepal, that records every sale in a POS system and keeps running out of its best sellers during weekend offers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Restock&lt;/strong&gt; takes the sales file a shop already has, from a POS or Excel, and gives back:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;how much of each item it will likely sell next week&lt;/li&gt;
&lt;li&gt;a &lt;strong&gt;safe amount&lt;/strong&gt; that still covers a busy week&lt;/li&gt;
&lt;li&gt;an order message to copy and send to your supplier, on WhatsApp, SMS or email
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Order to cover Sun 18 Oct to Sat 24 Oct:
- Baguette: 176
- Banana bread slice: 258
- Cinnamon roll: 174
- Sourdough loaf: 247
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In the sample, croissants 🥐 aren't on the list: the 500 already on the shelf cover the week.&lt;/p&gt;

&lt;p&gt;No account, no store integration, no setup call. Upload one CSV, check which columns hold the date, item and units sold, and type what's on the shelf. If the file has a stock column, Restock fills that in for you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who would pay:&lt;/strong&gt; any small shop that loses sales when its best sellers run out, like a bakery, grocery or pharmacy. Running out on one busy day can lose more money than a small monthly fee, so Restock is worth paying for if it stops that from happening even once a month.&lt;/p&gt;

&lt;p&gt;Before showing a forecast, Restock tests itself on your own sales. It hides your last 7 days, predicts them, then checks how close it got, and compares that with the simple rule most owners use: "order the same as last week". If Restock does worse than that rule, it tells you, so you know before you spend money on an order.&lt;/p&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Live:&lt;/strong&gt; &lt;a href="https://restock-4nle.onrender.com" rel="noopener noreferrer"&gt;https://restock-4nle.onrender.com&lt;/a&gt;. Click "Try it with sample bakery data", no file needed.&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%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0vm8rf80ape9htvsi7i2.png" 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%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0vm8rf80ape9htvsi7i2.png" alt="Restock start screen" width="800" height="536"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;That's the whole setup: one upload box, a sample button, and a plain note about where the data goes.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftrb5c9qgcpmhsqv03qxx.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftrb5c9qgcpmhsqv03qxx.gif" alt="Changing stock updates the order" width="800" height="596"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Change what's on the shelf and the order updates: 300 baguettes cover the week, so Baguette drops off; with only 200 croissants, Croissant joins the order.&lt;/em&gt;&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%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fka1zafxjcc9jm1hjtyqh.png" 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%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fka1zafxjcc9jm1hjtyqh.png" alt="Next 7 days forecast table" width="800" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The forecast: what each item will likely sell, and the safe amount for a busy week.&lt;/em&gt;&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%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsinuym33b9m9octwmyge.png" 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%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsinuym33b9m9octwmyge.png" alt="Baguette sales and forecast chart" width="800" height="670"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;One item day by day: the last 4 weeks of actual sales, then the next 7 days with a quiet-to-busy range.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/bikrampun" rel="noopener noreferrer"&gt;
        bikrampun
      &lt;/a&gt; / &lt;a href="https://github.com/bikrampun/restock" rel="noopener noreferrer"&gt;
        restock
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Next week's demand per item for small shops, forecast with TabPFN (open-weight tabular model). Hacktoberfest 2026 DEV challenge.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Restock&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;Upload past sales, get next week's demand per item with a safe amount to prep or order. Built on &lt;a href="https://github.com/PriorLabs/TabPFN" rel="noopener noreferrer"&gt;TabPFN&lt;/a&gt;, an open-weight foundation model for tabular data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Live demo:&lt;/strong&gt; &lt;a href="https://restock-4nle.onrender.com" rel="nofollow noopener noreferrer"&gt;https://restock-4nle.onrender.com&lt;/a&gt; (click "Try it with sample bakery data"; no file needed).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it works:&lt;/strong&gt; &lt;a href="https://dev.to/bikrampun/restock-next-weeks-order-for-small-shops-from-the-sales-file-they-already-have-5e18" rel="nofollow"&gt;Restock on DEV&lt;/a&gt;, with the architecture diagram and the accuracy check.&lt;/p&gt;

&lt;p&gt;Before showing a forecast, it hides your last 7 days, forecasts them, and tells you how far off it was compared with "same as last week".&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Run it&lt;/h2&gt;
&lt;/div&gt;

&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;pip install -r requirements.txt
cp .env.example .env   &lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; then paste your free key from https://platform.priorlabs.ai/account/api-keys&lt;/span&gt;
streamlit run app.py&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Private mode: &lt;code&gt;pip install tabpfn&lt;/code&gt; and the app runs TabPFN-3.5's downloadable weights on your own machine instead of the API, so sales data stays on the laptop. First accept the non-commercial license at &lt;a href="https://platform.priorlabs.ai/accept-license" rel="nofollow noopener noreferrer"&gt;https://platform.priorlabs.ai/accept-license&lt;/a&gt;, signed in to the account whose key is in &lt;code&gt;.env&lt;/code&gt;. The…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/bikrampun/restock" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Repo: &lt;a href="https://github.com/bikrampun/restock" rel="noopener noreferrer"&gt;https://github.com/bikrampun/restock&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;About 230 lines of Python in one &lt;code&gt;app.py&lt;/code&gt;. The live app calls TabPFN with an API key; the test script, &lt;code&gt;check.py&lt;/code&gt;, swaps in a fake model so anyone can test the app without a key or spending credits.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&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%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffilg5c12hlnyw951mogt.png" 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%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffilg5c12hlnyw951mogt.png" alt="Restock architecture diagram" width="800" height="368"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The CSV is cleaned into daily totals, TabPFN forecasts the next 7 days, and the order is the safe amount minus what's on the shelf.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The model.&lt;/strong&gt; &lt;a href="https://github.com/PriorLabs/TabPFN" rel="noopener noreferrer"&gt;TabPFN&lt;/a&gt; is an AI model for spreadsheet-style data. It was trained in advance on millions of made-up tables, so it doesn't need training for each shop: you give it your rows and it predicts straight away. Prior Labs showed with &lt;a href="https://github.com/PriorLabs/tabpfn-time-series" rel="noopener noreferrer"&gt;TabPFN-TS&lt;/a&gt; that this works for sales forecasting too. For each day, Restock gives it five simple facts: the item, the day of the week (weekends sell more), the day of the month (paydays), the month (seasons), and a running day count (slow growth or decline).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cleaning a messy file.&lt;/strong&gt; Real exports are messy, so most of the code is cleanup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;one row per sale or one row per day both work; days with no sales count as zero&lt;/li&gt;
&lt;li&gt;dates can be &lt;code&gt;2026-08-01&lt;/code&gt; or day-first &lt;code&gt;01/08/2026&lt;/code&gt;, common outside the US&lt;/li&gt;
&lt;li&gt;"Croissant", "croissant " and "CROISSANT" become one item&lt;/li&gt;
&lt;li&gt;items under 3 weeks old, or with no sales in 2 weeks, are left out with a note&lt;/li&gt;
&lt;li&gt;problems point to the spreadsheet row, like &lt;code&gt;Row 12: "abc" isn't a number&lt;/code&gt;, so you can fix them in Excel&lt;/li&gt;
&lt;/ul&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%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3fpqpprt6wbd2qkbdmsh.png" 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%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3fpqpprt6wbd2qkbdmsh.png" alt="Messages for a messy CSV" width="800" height="817"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What a messy file looks like in Restock: blue notes for what it fixed by itself, yellow for what you should check, red for what you need to fix.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;From forecast to order.&lt;/strong&gt; TabPFN gives a range for each day, not one number: a quiet day, a normal day and a busy day. "Expected" adds up the normal days. "Safe amount" adds up the busy days, so it's enough even if the whole week runs busy. The order is the safe amount minus what's on the shelf:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Safe amount = sum of the 7 busy-day forecasts
Order       = max(0, Safe amount - In stock now)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For baguettes in the sample: a safe amount of 276, with 100 on the shelf, so order 176. An item with enough stock gets 0 and drops out of the message.&lt;/p&gt;

&lt;p&gt;For stock, Restock only trusts each item's &lt;strong&gt;latest&lt;/strong&gt; count. If that cell is blank, it shows 0 and names the row instead of using an older count. An older count is usually too high, which would make the order too small: the exact problem Restock exists to fix.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Honest numbers.&lt;/strong&gt; On the sample bakery data, TabPFN was off by 4.3 units per item per day, against 5.7 for "same as last week" (24% better). That data is made up with clean weekly patterns, and the app says so. Real shop sales are messier, so expect a smaller gain, and the app shows that number for your own file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stack.&lt;/strong&gt; Streamlit, pandas and &lt;code&gt;tabpfn-client&lt;/code&gt;, hosted free on Render. The live demo calls Prior Labs' API. If you install &lt;code&gt;tabpfn&lt;/code&gt;, the app switches to TabPFN's downloadable weights on your own laptop, so sales never leave it. &lt;del&gt;That path is coded but not yet tested end to end.&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update (Oct 19):&lt;/strong&gt; I've since tested private mode end to end: TabPFN-3.5's weights run on my laptop and work with Wi-Fi off, with the same forecast as the API.&lt;/p&gt;

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

&lt;p&gt;I read 24 public reviews of an established inventory forecasting tool on Capterra, Trustpilot, Reddit, Xero and Shopify. People like it, but the same complaint kept coming up: getting started. One reviewer wrote: "Initially navigating screen and tabs is confusing." Others thank the onboarding staff by name, because they needed help to get going. And every reviewer already ran their business on bigger software: Xero for accounting, a Shopify store, or a full business system (ERP).&lt;/p&gt;

&lt;p&gt;None of those 24 reviewers was a small local shop.&lt;/p&gt;

&lt;p&gt;An open, pre-trained model changes who can be served. Forecasting no longer needs a data team, a training pipeline or months of history. It needs one file. Prior Labs' free tier covers about 250 Restock runs a day (5 million daily credits, about 20,000 per run), so a free tool for small shops actually works. Anyone can read how Restock works, run it on their own laptop, or fork it for the shops in their town.&lt;/p&gt;

&lt;p&gt;One honest catch: TabPFN is free, but not for business use. To charge shops, I'd buy a licence from Prior Labs or switch to a free-for-business model like TimesFM or Chronos. Open models give me that choice. A closed AI service wouldn't.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of TabPFN:&lt;/strong&gt; TabPFN does all the forecasting. Its busy-day numbers decide how much to order, and a second TabPFN run tests the forecast against "same as last week" on the shop's own sales.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Render:&lt;/strong&gt; the app runs on Render's free plan from a one-file &lt;code&gt;render.yaml&lt;/code&gt;, with the TabPFN key kept as a Render secret.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Thanks to Prior Labs for publishing TabPFN, and to the Hacktoberfest team for a challenge that asked for something people would actually pay for.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>opensource</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
