<?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: Tony</title>
    <description>The latest articles on DEV Community by Tony (@codemasterip).</description>
    <link>https://dev.to/codemasterip</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3896860%2F716978b1-3ea3-4dc5-965a-be82c04bfcb1.jpg</url>
      <title>DEV Community: Tony</title>
      <link>https://dev.to/codemasterip</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codemasterip"/>
    <language>en</language>
    <item>
      <title>I run 17 AI tools on Supabase Edge Functions + Gemini 2.5 Flash. My monthly cost? Less than a coffee.</title>
      <dc:creator>Tony</dc:creator>
      <pubDate>Tue, 28 Apr 2026 14:46:36 +0000</pubDate>
      <link>https://dev.to/codemasterip/i-run-17-ai-tools-on-supabase-edge-functions-gemini-25-flash-my-monthly-cost-less-than-a-3jfc</link>
      <guid>https://dev.to/codemasterip/i-run-17-ai-tools-on-supabase-edge-functions-gemini-25-flash-my-monthly-cost-less-than-a-3jfc</guid>
      <description>&lt;p&gt;Here's the exact stack, with code you can copy.&lt;/p&gt;

&lt;p&gt;Why this combo wins&lt;br&gt;
Need    SolutionCost&lt;br&gt;
Database + Auth Supabase    Free tier covers a lot&lt;br&gt;
AI inference    Gemini 2.5 Flash    ~$0.075/M input tokens&lt;br&gt;
Server compute  Edge Functions  Free 500k invocations/mo&lt;br&gt;
Rate limiting   Postgres table  Free&lt;br&gt;
Sharing images  Edge Function + SVG Free&lt;br&gt;
No Vercel pro. No OpenAI bill. No Redis. Just Supabase and a free Google AI Studio key.&lt;/p&gt;

&lt;p&gt;The pattern (one Edge Function, all your AI)&lt;br&gt;
// supabase/functions/ai-task/index.ts&lt;br&gt;
import "&lt;a href="https://deno.land/x/xhr@0.1.0/mod.ts" rel="noopener noreferrer"&gt;https://deno.land/x/xhr@0.1.0/mod.ts&lt;/a&gt;";&lt;br&gt;
import { createClient } from 'jsr:@supabase/supabase-js@2';&lt;/p&gt;

&lt;p&gt;const corsHeaders = {&lt;br&gt;
  'Access-Control-Allow-Origin': '*',&lt;br&gt;
  'Access-Control-Allow-Headers': 'authorization, content-type',&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;Deno.serve(async (req) =&amp;gt; {&lt;br&gt;
  if (req.method === 'OPTIONS') return new Response(null, { headers: corsHeaders });&lt;/p&gt;

&lt;p&gt;const { prompt, taskType } = await req.json();&lt;/p&gt;

&lt;p&gt;// 1. Rate limit (atomic via Postgres)&lt;br&gt;
  const supabase = createClient(&lt;br&gt;
    Deno.env.get('SUPABASE_URL')!,&lt;br&gt;
    Deno.env.get('SUPABASE_SERVICE_ROLE_KEY')!&lt;br&gt;
  );&lt;/p&gt;

&lt;p&gt;const userId = req.headers.get('x-user-id');&lt;br&gt;
  const { data: rl } = await supabase.rpc('check_rate_limit', { &lt;br&gt;
    p_user_id: userId, &lt;br&gt;
    p_function: taskType,&lt;br&gt;
    p_max: 10,&lt;br&gt;
  });&lt;/p&gt;

&lt;p&gt;if (!rl.allowed) {&lt;br&gt;
    return new Response(JSON.stringify({ error: 'Rate limited' }), { &lt;br&gt;
      status: 429, headers: corsHeaders &lt;br&gt;
    });&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;// 2. Call Gemini&lt;br&gt;
  const aiResponse = await fetch(&lt;br&gt;
    &lt;code&gt;https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=${Deno.env.get('GEMINI_API_KEY')}&lt;/code&gt;,&lt;br&gt;
    {&lt;br&gt;
      method: 'POST',&lt;br&gt;
      headers: { 'Content-Type': 'application/json' },&lt;br&gt;
      body: JSON.stringify({&lt;br&gt;
        contents: [{ parts: [{ text: prompt }] }],&lt;br&gt;
        generationConfig: { temperature: 0.7, maxOutputTokens: 2048 },&lt;br&gt;
      }),&lt;br&gt;
    }&lt;br&gt;
  );&lt;/p&gt;

&lt;p&gt;const data = await aiResponse.json();&lt;br&gt;
  const text = data.candidates?.[0]?.content?.parts?.[0]?.text ?? '';&lt;/p&gt;

&lt;p&gt;return new Response(JSON.stringify({ text }), { &lt;br&gt;
    headers: { ...corsHeaders, 'Content-Type': 'application/json' } &lt;br&gt;
  });&lt;br&gt;
});&lt;br&gt;
The atomic rate limiter (Postgres FTW)&lt;br&gt;
create table rate_limits (&lt;br&gt;
  id uuid primary key default gen_random_uuid(),&lt;br&gt;
  user_id uuid not null,&lt;br&gt;
  function_name text not null,&lt;br&gt;
  request_count integer default 1,&lt;br&gt;
  window_start timestamptz default now()&lt;br&gt;
);&lt;/p&gt;

&lt;p&gt;create or replace function check_rate_limit(&lt;br&gt;
  p_user_id uuid, p_function text, p_max int&lt;br&gt;
) returns json language plpgsql security definer as $$&lt;br&gt;
declare&lt;br&gt;
  v_count int;&lt;br&gt;
begin&lt;br&gt;
  -- Clean old windows (&amp;gt;1h)&lt;br&gt;
  delete from rate_limits &lt;br&gt;
  where user_id = p_user_id and function_name = p_function &lt;br&gt;
    and window_start &amp;lt; now() - interval '1 hour';&lt;/p&gt;

&lt;p&gt;-- Count current&lt;br&gt;
  select coalesce(sum(request_count), 0) into v_count&lt;br&gt;
  from rate_limits &lt;br&gt;
  where user_id = p_user_id and function_name = p_function;&lt;/p&gt;

&lt;p&gt;if v_count &amp;gt;= p_max then&lt;br&gt;
    return json_build_object('allowed', false, 'used', v_count);&lt;br&gt;
  end if;&lt;/p&gt;

&lt;p&gt;insert into rate_limits (user_id, function_name) values (p_user_id, p_function);&lt;br&gt;
  return json_build_object('allowed', true, 'used', v_count + 1);&lt;br&gt;
end;&lt;br&gt;
$$;&lt;br&gt;
Why it's atomic: the delete + insert happen in a single transaction. No race conditions, no Redis needed.&lt;/p&gt;

&lt;p&gt;The cost breakdown (real numbers)&lt;br&gt;
For ~50,000 AI requests/month:&lt;/p&gt;

&lt;p&gt;Gemini 2.5 Flash: ~$3.50 (mostly input tokens)&lt;br&gt;
Supabase Free tier: $0 (covered by free quota)&lt;br&gt;
Edge Function invocations: $0 (under 500k limit)&lt;br&gt;
Total: ~$3.50/month for production AI.&lt;/p&gt;

&lt;p&gt;If I needed image gen, I'd add Lovable AI's free gemini-2.5-flash-image-preview and pay even less.&lt;/p&gt;

&lt;p&gt;Gotchas I hit&lt;br&gt;
No external Deno deps in Edge Functions. Use crypto.subtle natively. External imports cause bundling failures.&lt;br&gt;
Set verify_jwt = false for public-facing functions in supabase/config.toml, or your unauth users get 401s.&lt;br&gt;
Use service role key on the server, never on the client. Always.&lt;br&gt;
Try the stack live&lt;br&gt;
All 17 tools running this exact stack: codemasterip.com&lt;/p&gt;

&lt;p&gt;Drop a ⭐ if this helped, and let me know what you'd build with it.&lt;/p&gt;

</description>
      <category>supabase</category>
      <category>ai</category>
      <category>edgefuctions</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>I made an AI that roasts your code (and it's brutally honest)</title>
      <dc:creator>Tony</dc:creator>
      <pubDate>Mon, 27 Apr 2026 05:35:37 +0000</pubDate>
      <link>https://dev.to/codemasterip/i-made-an-ai-that-roasts-your-code-and-its-brutally-honest-4in0</link>
      <guid>https://dev.to/codemasterip/i-made-an-ai-that-roasts-your-code-and-its-brutally-honest-4in0</guid>
      <description>&lt;p&gt;We've all been there: you push code thinking it's clean, then a senior dev comments "why?" on line 47 and your soul leaves your body.&lt;/p&gt;

&lt;p&gt;I built Code Roast to give you that experience before the PR — for free, with AI, in 15 languages.&lt;/p&gt;

&lt;p&gt;The brief&lt;br&gt;
Build an AI code reviewer that's funny, honest, and educational.&lt;br&gt;
Bonus: it should hurt a little (so you remember the lesson).&lt;/p&gt;

&lt;p&gt;The result&lt;br&gt;
You paste code → the AI returns:&lt;/p&gt;

&lt;p&gt;A roast ("This 47-line function violates SRP harder than my New Year's resolutions")&lt;br&gt;
A severity badge (mild → catastrophic) you can share&lt;br&gt;
Actionable fixes (because being mean isn't useful without solutions)&lt;br&gt;
The prompt that makes it work&lt;br&gt;
After 30+ iterations, this is the structure that consistently produces funny + useful:&lt;/p&gt;

&lt;p&gt;const prompt = `You are a senior dev reviewing code for a junior. Be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;BRUTAL but FAIR (no personal attacks, only the code)
&lt;/li&gt;
&lt;li&gt;SPECIFIC (cite line numbers, name the antipattern)&lt;/li&gt;
&lt;li&gt;CONSTRUCTIVE (every roast = one concrete fix)&lt;/li&gt;
&lt;li&gt;FUNNY (one joke max, never at the dev's expense)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Return JSON:&lt;br&gt;
{&lt;br&gt;
  "severity": "mild" | "medium" | "spicy" | "catastrophic",&lt;br&gt;
  "roast": "&amp;lt;2-3 sentences, the funny part&amp;gt;",&lt;br&gt;
  "issues": [{ "line": number, "problem": string, "fix": string }],&lt;br&gt;
  "verdict": ""&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Code to review:&lt;br&gt;
`&lt;code&gt;\&lt;/code&gt;&lt;br&gt;
${userCode}&lt;br&gt;
&lt;code&gt;\&lt;/code&gt;``;&lt;br&gt;
The key insights:&lt;/p&gt;

&lt;p&gt;Constraint produces creativity. "One joke max" forces the model to pick the best one.&lt;br&gt;
Structured output &amp;gt; prose. JSON makes the UI predictable and shareable.&lt;br&gt;
Severity as enum lets us show different badge designs (and a different Kody face per level).&lt;br&gt;
The tech stack (boring on purpose)&lt;br&gt;
Frontend: React + Vite + Tailwind&lt;br&gt;
AI: Gemini 2.5 Flash via Supabase Edge Function&lt;br&gt;
Rate limiting: Postgres rate_limits table, 5 roasts/hour for free, unlimited Pro&lt;br&gt;
Result sharing: dynamic 1200×630 SVG generated in another Edge Function&lt;br&gt;
The whole thing is ~400 lines of code for the feature itself.&lt;/p&gt;

&lt;p&gt;What surprised me&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Severity badges drive 80% of the shares.&lt;br&gt;
People love showing off a "Catastrophic 🔥" badge to their friends way more than the actual review. Make the outcome shareable, not the process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Multilingual roasts hit different.&lt;br&gt;
A Spanish dev got a roast that included a "madre mía" and tweeted it. Localized humor &amp;gt; translated humor.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Free tier converts.&lt;br&gt;
About 4% of users hit the free limit and upgrade. The tool itself is the funnel.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Try it (free, no signup needed)&lt;br&gt;
👉 codemasterip.com/code-roast&lt;/p&gt;

&lt;p&gt;Paste your worst code. I dare you.&lt;/p&gt;

&lt;p&gt;Have you built AI tools that lean into humor? What worked for you? Comments are open.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>javascript</category>
      <category>codereview</category>
      <category>webdev</category>
    </item>
    <item>
      <title>I built 17 AI tools for developers in 4 months. Here's what I learned about shipping fast.</title>
      <dc:creator>Tony</dc:creator>
      <pubDate>Sat, 25 Apr 2026 02:08:21 +0000</pubDate>
      <link>https://dev.to/codemasterip/i-built-17-ai-tools-for-developers-in-4-months-heres-what-i-learned-about-shipping-fast-5bno</link>
      <guid>https://dev.to/codemasterip/i-built-17-ai-tools-for-developers-in-4-months-heres-what-i-learned-about-shipping-fast-5bno</guid>
      <description>&lt;p&gt;From idea to 17 production AI tools using Gemini, Supabase Edge Functions, and a brutal focus on shipping. Real numbers, real mistakes, real lessons.&lt;/p&gt;

&lt;p&gt;Four months ago I had an idea: what if devs could roast their own code with AI, calculate their market salary, simulate interviews, and learn programming — all in one place, all free, all multilingual?&lt;/p&gt;

&lt;p&gt;Today CodeMasterIp has 17 production AI tools, runs in 15 languages, and serves thousands of devs. Here's what I learned shipping that fast.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Pick the boring stack on purpose
I went with React + Vite + Supabase + Gemini 2.5 Flash via Edge Functions. Nothing exotic. No K8s. No microservices.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Why? Because the bottleneck was never tech — it was always deciding what to build next.&lt;/p&gt;

&lt;p&gt;// One Edge Function. One model. One pattern. Repeat 17 times.&lt;br&gt;
const response = await fetch(&lt;br&gt;
  '&lt;a href="https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent" rel="noopener noreferrer"&gt;https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent&lt;/a&gt;',&lt;br&gt;
  {&lt;br&gt;
    method: 'POST',&lt;br&gt;
    headers: { 'Content-Type': 'application/json' },&lt;br&gt;
    body: JSON.stringify({ contents: [{ parts: [{ text: prompt }] }] }),&lt;br&gt;
  }&lt;br&gt;
);&lt;br&gt;
That's it. That's the architecture for all 17 tools.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Each tool ships as a "complete product"
Every tool has its own URL, its own OG image, its own shareable result page. Why? Because a tool that can't be shared on Twitter doesn't exist.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;/code-roast → AI roasts your code with severity badges&lt;br&gt;
/salary-calculator → market salary with country adjustments&lt;br&gt;
/dev-quiz → "what dev are you" personality test&lt;br&gt;
/typing-speed → WPM ranks for coders&lt;br&gt;
/dev-bingo → bingo card with dev clichés&lt;br&gt;
Each one has a /result/:id page that generates a custom 1200×630 SVG card via Edge Function. Twitter, LinkedIn, Reddit — all eat them up.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Free is not a strategy. It's the strategy.
Most tools competing with mine charge $9/mo. Mine are free. Why?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because attention is the bottleneck, not money. A free tool that 10,000 people share beats a $9 tool that 200 people pay for — every time.&lt;/p&gt;

&lt;p&gt;Monetization comes from the one thing people pay for: the AI chat with persistent context.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Internationalization from day 1
15 languages. react-i18next. Every tool, every page, every error message. The code? Pre-rendered in 12 languages inside  blocks for SEO.&lt;/li&gt;
&lt;/ol&gt;


&lt;h1&gt;Aprende programación con IA&lt;/h1&gt;
&lt;br&gt;
  &lt;h1&gt;Learn programming with AI&lt;/h1&gt;
&lt;br&gt;
  &lt;h1&gt;用AI学编程&lt;/h1&gt;

&lt;p&gt;Result: traffic from countries I didn't even target.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The most underrated growth lever: programmatic SEO
I generated 45,000 unique URLs programmatically by combining:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;12 languages × 200 topics × 18 page types&lt;br&gt;
Each one has unique content, unique meta tags, unique JSON-LD. Each one pings IndexNow on creation.&lt;/p&gt;

&lt;p&gt;Most never rank. Some rank #1 for long-tail queries I never imagined.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Mistakes I made (so you don't have to)
Built ads first, removed them later. AdSense killed page speed and SEO. -40% LCP. Removed everything.
Tried Reddit autopromo. r/learnprogramming closed my post in 2h. Lesson: provide value first, sell later.
Over-engineered auth early. Supabase auth + Google OAuth = 30 minutes. Done.
What I'd do differently
Ship the first tool in a weekend. Not 4. Not 17. One.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The 17 came from compounding learnings: each tool was 30% faster to build than the previous one because the patterns repeated.&lt;/p&gt;

&lt;p&gt;If you want to see all 17 tools in action: codemasterip.com. The Code Roast one is the most fun — paste any code and the AI will tell you what's wrong with it (with severity levels, like a real code review).&lt;/p&gt;

&lt;p&gt;What would you build with this stack? Drop it in the comments — I'm curious.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
