<?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: perfectsea</title>
    <description>The latest articles on DEV Community by perfectsea (@chanrylejay).</description>
    <link>https://dev.to/chanrylejay</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%2F3959600%2F451a5495-b4f1-4e57-b3fe-d44fd4f55a3c.png</url>
      <title>DEV Community: perfectsea</title>
      <link>https://dev.to/chanrylejay</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chanrylejay"/>
    <language>en</language>
    <item>
      <title>Why Hardcoded Recipes Beat AI: Building a Filipino Meal Cost Engine with Real Market Data</title>
      <dc:creator>perfectsea</dc:creator>
      <pubDate>Thu, 04 Jun 2026 05:14:37 +0000</pubDate>
      <link>https://dev.to/chanrylejay/why-hardcoded-recipes-beat-ai-building-a-filipino-meal-cost-engine-with-real-market-data-5ao7</link>
      <guid>https://dev.to/chanrylejay/why-hardcoded-recipes-beat-ai-building-a-filipino-meal-cost-engine-with-real-market-data-5ao7</guid>
      <description>&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.amazonaws.com%2Fuploads%2Farticles%2F94gtca2ltliniadp7iw8.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F94gtca2ltliniadp7iw8.jpg" alt=" "&gt;&lt;/a&gt;Every Filipino household has heard this question at least ten thousand times:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Ma, ano ulam?"&lt;/strong&gt; &lt;em&gt;(Mom, what's for dinner?)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It's so universal it's practically a national catchphrase. And now that I'm the one who cooks and shops at the wet market (palengke), I hear it in my own head — every single day.&lt;/p&gt;

&lt;p&gt;The problem isn't cooking. It's &lt;em&gt;deciding what to cook&lt;/em&gt; when ingredient prices change daily and you're trying to stretch a budget.&lt;/p&gt;

&lt;p&gt;So I built a web app to answer the question with math instead of guesswork.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Live:&lt;/strong&gt; &lt;a href="https://ma-anoulam.vercel.app" rel="noopener noreferrer"&gt;ma-anoulam.vercel.app&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/chanrylejay/ano-ulam" rel="noopener noreferrer"&gt;chanrylejay/ano-ulam&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Here in the Philippines, the Department of Agriculture publishes a daily price bulletin called &lt;strong&gt;Bantay Presyo&lt;/strong&gt; — it tracks commodity prices (vegetables, meat, fish, rice, cooking oil) across Metro Manila markets and supermarkets. It's publicly available as a PDF on their website.&lt;/p&gt;

&lt;p&gt;The data exists. But nobody is using it to help regular people decide what to cook.&lt;/p&gt;

&lt;p&gt;I wanted to build something that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pulls real market prices every day automatically&lt;/li&gt;
&lt;li&gt;Figures out which meals are cheapest to cook right now&lt;/li&gt;
&lt;li&gt;Shows per-ingredient cost breakdowns so you know exactly what you're spending&lt;/li&gt;
&lt;li&gt;Runs by itself with no manual work&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  V1: The AI Approach (And Why It Failed)
&lt;/h2&gt;

&lt;p&gt;My first instinct was to let AI handle everything. I sent the price data to DeepSeek and asked it to generate Filipino recipe suggestions with cost estimates.&lt;/p&gt;

&lt;p&gt;The results were... not great.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Accuracy: 6-7 out of 10.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here's what went wrong:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Wrong ingredients:&lt;/strong&gt; It would suggest "Sinigang na Baboy" but include ingredients that don't belong in sinigang&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;English names:&lt;/strong&gt; It used "eggplant" instead of "talong," "string beans" instead of "sitaw" — which felt wrong for a Filipino cooking app&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bad cost estimates:&lt;/strong&gt; It would guess prices instead of calculating from the actual data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Invented recipes:&lt;/strong&gt; It occasionally generated dishes that don't exist in Filipino cuisine&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inconsistent portions:&lt;/strong&gt; Serving sizes varied wildly between suggestions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AI is excellent at many things. Generating accurate, domain-specific structured data about Filipino wet market cooking is not one of them.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Pivot: Hardcoded Recipes + Pure Math
&lt;/h2&gt;

&lt;p&gt;I threw out the AI recipe generation entirely and did something that felt almost too simple:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I hardcoded all the recipes myself.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;47 Filipino recipes. Each one with verified ingredients, quantities, units, and the exact DA commodity name each ingredient maps to. All based on actual palengke shopping experience — what you'd really buy, in what quantities, at what unit.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adobo: 3/4 kg chicken, soy sauce, vinegar, bawang, paminta&lt;/li&gt;
&lt;li&gt;Sinigang na Baboy: 3/4 kg pork, sampaloc mix, kangkong, talong, siling haba&lt;/li&gt;
&lt;li&gt;Ginisang sardinas: 1 can sardines, kamatis, sibuyas, bawang&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cost calculation is pure JavaScript math:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;For each recipe:
  For each required ingredient:
    Look up today's price from DB
    Multiply by quantity needed
    Apply palengke rate overrides for small items
  Sum = total meal cost
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The "palengke rate overrides" handle a real-world quirk: DA prices are per kilo, but at the palengke you buy bawang (garlic) by the bulb and sibuyas (onion) by the piece. So for small quantities (≤0.20 kg), I override with actual per-piece palengke rates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bawang: ₱175/kg → 1 ulo ≈ ₱7&lt;/li&gt;
&lt;li&gt;Sibuyas: ₱80/kg → 1 pc ≈ ₱8&lt;/li&gt;
&lt;li&gt;Luya (ginger): ₱125/kg → 1 piraso ≈ ₱5&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Result: 10/10 accuracy.&lt;/strong&gt; Every cost matches what you'd actually pay at the market.&lt;/p&gt;

&lt;p&gt;AI is still in the system — but only for natural language reasoning. After the cost engine selects the 8 cheapest meals, I send a summary to DeepSeek and ask "Bakit ito ang mura ngayon?" (Why is this cheap today?). That's a ~500 token call. The AI explains trends in conversational Filipino. That's it.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Daily Pipeline
&lt;/h2&gt;

&lt;p&gt;Everything runs automatically via Vercel Cron Jobs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;8:00 AM Manila — PRICE INGESTION
  DA Bantay Presyo website
  → Find today's Daily Price Index PDF
  → Download and extract text via pdf-parse
  → Send to DeepSeek for CSV extraction
  → Parse CSV in JavaScript
  → Batch upsert ~98 commodity prices into Neon PostgreSQL

8:05 AM Manila — MEAL SUGGESTION
  Pull today's prices from database
  → Pull yesterday's prices for trend comparison
  → Run 47 recipes through cost engine
  → Balanced selection (max 2 fish, 2 chicken, 2 pork, 1 beef, 1 egg, 1 veggie)
  → Avoid duplicate main ingredients in same result set
  → 3-pass selection: strict balanced → relax duplicates → fill remaining
  → Send 8 cheapest to DeepSeek for "Bakit?" reasoning only
  → Cache everything in database

When a user visits:
  → Read from cache
  → Render meal cards with cost breakdowns
  → Zero AI calls. Instant load.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key insight: &lt;strong&gt;every user visit is just a database read.&lt;/strong&gt; No AI inference, no scraping, no computation. All the expensive work happens once a day at 8 AM, and the results are cached.&lt;/p&gt;




&lt;h2&gt;
  
  
  Frontend Decisions
&lt;/h2&gt;

&lt;p&gt;A few design choices that matter:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Filipino naming convention:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Meat cuts in English: Chicken Breast, Ground Pork, Beef&lt;/li&gt;
&lt;li&gt;Vegetables and spices in Filipino: Kamatis, Talong, Bawang, Luya&lt;/li&gt;
&lt;li&gt;Fish in Filipino: Bangus, Galunggong, Tamban&lt;/li&gt;
&lt;li&gt;Recipe names in Filipino: Adobo, Sinigang, Tinola, Ginisang Sardinas&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This matches how Filipinos actually talk about food — you say "chicken breast" but you'd never say "tomato" when you mean "kamatis."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Per-ingredient cost breakdown:&lt;/strong&gt;&lt;br&gt;
Each meal card shows every ingredient with its cost, color-coded green (required) or rose (optional). Optional ingredients at ₱0 are automatically hidden. Trend arrows (↑↓→) show if prices went up, down, or stayed the same.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Receipt-style price dashboard:&lt;/strong&gt;&lt;br&gt;
The /prices page shows all ~55-60 commodities in a single-column receipt layout. Color thresholds: green (≤₱100/kg), amber (≤₱250/kg), red (₱251+/kg). Search bar and category filter pills for quick browsing.&lt;/p&gt;




&lt;h2&gt;
  
  
  Cost Breakdown
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Monthly Cost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Vercel Hosting&lt;/td&gt;
&lt;td&gt;$0 (Hobby plan)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Neon PostgreSQL&lt;/td&gt;
&lt;td&gt;$0 (Free tier, Singapore region)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DeepSeek API&lt;/td&gt;
&lt;td&gt;~$0.15–0.30&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Domain&lt;/td&gt;
&lt;td&gt;$0 (using .vercel.app)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$0.15–0.30/month&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That's less than ₱20/month to run a full-stack web app with daily automated data pipelines.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Real Lesson
&lt;/h2&gt;

&lt;p&gt;This project taught me something I keep coming back to:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Know when to use AI and when not to.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI is incredible at:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Natural language reasoning and explanation&lt;/li&gt;
&lt;li&gt;Text extraction from messy PDFs&lt;/li&gt;
&lt;li&gt;Conversational responses&lt;/li&gt;
&lt;li&gt;Translation and summarization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AI struggles with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Domain-specific structured data (Filipino recipes, palengke quantities)&lt;/li&gt;
&lt;li&gt;Precise numerical calculations (cost per ingredient)&lt;/li&gt;
&lt;li&gt;Cultural accuracy (what actually goes in sinigang vs. what ChatGPT thinks goes in sinigang)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For structured, domain-specific data: &lt;strong&gt;hardcoded databases + math engines will outperform AI generation every time.&lt;/strong&gt; Use AI for what it's actually good at — reasoning and language — and let deterministic systems handle the data.&lt;/p&gt;




&lt;h2&gt;
  
  
  Built With
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Next.js 14&lt;/strong&gt; (App Router) + &lt;strong&gt;TypeScript&lt;/strong&gt; + &lt;strong&gt;Tailwind CSS&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Neon PostgreSQL&lt;/strong&gt; (Singapore region) for prices, recipes, suggestions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DeepSeek API&lt;/strong&gt; (deepseek-chat) for PDF extraction and reasoning&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vercel&lt;/strong&gt; hosting + &lt;strong&gt;Vercel Cron Jobs&lt;/strong&gt; for daily automation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pdf-parse v2&lt;/strong&gt; for PDF text extraction&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI-assisted development&lt;/strong&gt;: Bolt.new for initial scaffold, VS Code for everything else&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'm not a traditional software engineer — I come from 4+ years in operations and content moderation. I build production systems using AI-assisted development tools. This project was scaffolded in Bolt.new, extended and debugged in VS Code, version-controlled via GitHub, and deployed on Vercel.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;🔗 &lt;strong&gt;Live:&lt;/strong&gt; &lt;a href="https://ma-anoulam.vercel.app" rel="noopener noreferrer"&gt;ma-anoulam.vercel.app&lt;/a&gt;&lt;br&gt;
💻 &lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/chanrylejay/ano-ulam" rel="noopener noreferrer"&gt;github.com/chanrylejay/ano-ulam&lt;/a&gt; (MIT License)&lt;/p&gt;

&lt;p&gt;If you cook at home and shop at the palengke — or if you know someone who does — give it a try. Recipe suggestions and feedback are welcome.&lt;/p&gt;

&lt;p&gt;And if you're building something where you're tempted to have AI generate structured data: try hardcoding it first. You might be surprised at the difference.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built by &lt;a href="https://linkedin.com/in/chanrylejay" rel="noopener noreferrer"&gt;Chanryle Jay Cagara&lt;/a&gt; · Manila, Philippines&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>nextjs</category>
      <category>opensource</category>
    </item>
    <item>
      <title>I build a project calculator web app for n8n / automation folks</title>
      <dc:creator>perfectsea</dc:creator>
      <pubDate>Sat, 30 May 2026 07:24:34 +0000</pubDate>
      <link>https://dev.to/chanrylejay/i-build-a-project-calculator-web-app-for-n8n-automation-folks-2imf</link>
      <guid>https://dev.to/chanrylejay/i-build-a-project-calculator-web-app-for-n8n-automation-folks-2imf</guid>
      <description>&lt;p&gt;The Problem&lt;br&gt;
I freelance with n8n and the hardest part isn't building workflows — it's answering the question: "How much should I charge for this?"&lt;br&gt;
There's no tool for it. I Googled. I searched the n8n community. Nothing. Every pricing discussion ends with "it depends."&lt;br&gt;
So I built one.&lt;br&gt;
What It Does&lt;br&gt;
n8n Project Calculator — describe what the client needs and it gives you:&lt;/p&gt;

&lt;p&gt;Estimated build cost (flat rate)&lt;br&gt;
Monthly hosting breakdown (self-hosted vs cloud)&lt;br&gt;
Complexity rating so you know what you're walking into&lt;/p&gt;

&lt;p&gt;It uses AI to analyze the project requirements and generate a realistic estimate based on n8n-specific factors like node count, integrations, AI agents, and hosting setup.&lt;br&gt;
Stack&lt;/p&gt;

&lt;p&gt;Frontend: Next.js (scaffolded with Bolt.new)&lt;br&gt;
Hosting: Vercel (free tier)&lt;br&gt;
AI: DeepSeek API (serverless function)&lt;br&gt;
Monthly cost to run: ~$0&lt;/p&gt;

&lt;p&gt;Built in one day. Five rounds of visual review and bug fixing to reach production quality.&lt;br&gt;
Who It's For&lt;/p&gt;

&lt;p&gt;Freelancers doing n8n/automation work who need to quote projects&lt;br&gt;
Clients/businesses trying to budget for an automation project&lt;br&gt;
Anyone curious what workflow automation actually costs&lt;/p&gt;

&lt;p&gt;Try It, save it, bookmark it, it might help you in the future&lt;br&gt;
🔗 &lt;a href="https://n8n-project-calculator.vercel.app" rel="noopener noreferrer"&gt;https://n8n-project-calculator.vercel.app&lt;/a&gt;&lt;/p&gt;

</description>
      <category>n8n</category>
      <category>automation</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
