<?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: Noah</title>
    <description>The latest articles on DEV Community by Noah (@ph0sm0).</description>
    <link>https://dev.to/ph0sm0</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%2F3632665%2Fa5514768-be57-4825-b6b7-38e27ac29229.png</url>
      <title>DEV Community: Noah</title>
      <link>https://dev.to/ph0sm0</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ph0sm0"/>
    <language>en</language>
    <item>
      <title>How I'd Build a Full Stack App on a $0–$20 Monthly Budget</title>
      <dc:creator>Noah</dc:creator>
      <pubDate>Thu, 05 Nov 2026 17:15:33 +0000</pubDate>
      <link>https://dev.to/ph0sm0/how-id-build-a-full-stack-app-on-a-0-20-monthly-budget-1nl3</link>
      <guid>https://dev.to/ph0sm0/how-id-build-a-full-stack-app-on-a-0-20-monthly-budget-1nl3</guid>
      <description>&lt;p&gt;How much does it actually cost to host a full stack application in 2026?&lt;/p&gt;

&lt;p&gt;With so many services offering free tiers, you can get surprisingly far without spending much. But choosing the right combination can get confusing.&lt;/p&gt;

&lt;p&gt;Should you use Vercel or Cloudflare? Supabase or Neon? Do you even need a separate authentication provider?&lt;/p&gt;

&lt;p&gt;I have worked on several full stack projects and would like to share what I learned to keep infrastructure costs down while choosing the right and reliable services.&lt;/p&gt;

&lt;p&gt;So here's my breakdown of the best free and low cost services I'd consider for building a full stack application, and how I'd use them together within a &lt;strong&gt;$0–$20 monthly budget&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Pricing and free tier limits are based on November 2026 information and may change.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does a Full Stack App Actually Need?
&lt;/h2&gt;

&lt;p&gt;Most applications need a frontend, backend, and database. Depending on the features, you might also need authentication, file storage, and email delivery.&lt;/p&gt;

&lt;p&gt;Thankfully, some providers cover several of these needs under one free plan.&lt;/p&gt;

&lt;p&gt;Let's compare the options.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frontend: Which Framework?
&lt;/h2&gt;

&lt;p&gt;Frameworks are generally free. The bigger consideration is how they affect hosting.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Framework&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;th&gt;Why choose it?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://vite.dev/" rel="noopener noreferrer"&gt;React + Vite&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;SPAs, dashboards&lt;/td&gt;
&lt;td&gt;Simple setup, static builds, cheap hosting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://nextjs.org/" rel="noopener noreferrer"&gt;Next.js&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Full stack React apps&lt;/td&gt;
&lt;td&gt;Server rendering, routing, server side logic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://astro.build/" rel="noopener noreferrer"&gt;Astro&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Blogs, documentation, content websites&lt;/td&gt;
&lt;td&gt;Static first architecture, minimal client side JavaScript&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;My choice would be React + Vite for simple interactive applications. Next.js when I actually need server side features.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frontend Hosting
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Cloudflare Pages
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://developers.cloudflare.com/pages/" rel="noopener noreferrer"&gt;Cloudflare Pages&lt;/a&gt; is one of my favorites for static websites.&lt;/p&gt;

&lt;p&gt;Static asset requests are free and unlimited, making it suitable for React + Vite and other static builds.&lt;/p&gt;

&lt;p&gt;Dynamic backend operations still have separate usage limits.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Vercel
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://vercel.com/pricing" rel="noopener noreferrer"&gt;Vercel&lt;/a&gt; offers a convenient Next.js deployment experience, including Git integration and preview deployments.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hobby:&lt;/strong&gt; $0, restricted to personal, non commercial use.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pro:&lt;/strong&gt; Starts at $20/month, with included usage credits.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'd consider it for commercial Next.js applications where the deployment workflow justifies the cost.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Netlify
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.netlify.com/pricing/" rel="noopener noreferrer"&gt;Netlify&lt;/a&gt; supports static hosting, serverless functions, and Git based deployments.&lt;/p&gt;

&lt;p&gt;Its free plan includes 300 monthly credits, consumed by resources such as bandwidth and compute.&lt;/p&gt;

&lt;p&gt;Personally I use Cloudflare Pages for static applications and Vercel for Next.js projects that need its platform features.&lt;/p&gt;

&lt;h2&gt;
  
  
  Backend: Where Should the API Run?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Cloudflare Workers
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://developers.cloudflare.com/workers/" rel="noopener noreferrer"&gt;Cloudflare Workers&lt;/a&gt; runs server side JavaScript without requiring you to manage servers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Free plan:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;100,000 requests/day&lt;/li&gt;
&lt;li&gt;10 ms CPU time per invocation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The paid plan starts at &lt;strong&gt;$5/month&lt;/strong&gt;, including 10 million requests and 30 million CPU milliseconds monthly, with additional usage billed separately.&lt;/p&gt;

&lt;p&gt;Great for lightweight APIs. CPU intensive operations may require a different setup.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Vercel Functions
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://vercel.com/docs/functions" rel="noopener noreferrer"&gt;Vercel Functions&lt;/a&gt; is convenient when your application already runs on Vercel.&lt;/p&gt;

&lt;p&gt;You can keep your frontend and API endpoints in one Next.js project without deploying a separate backend.&lt;/p&gt;

&lt;p&gt;Costs depend on your hosting plan and compute usage.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Supabase
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://supabase.com/pricing" rel="noopener noreferrer"&gt;Supabase&lt;/a&gt; combines PostgreSQL, authentication, file storage, and Edge Functions.&lt;/p&gt;

&lt;p&gt;Its free plan includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;500 MB database storage&lt;/li&gt;
&lt;li&gt;50,000 monthly active users for authentication&lt;/li&gt;
&lt;li&gt;Limited storage and function usage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Catch:&lt;/strong&gt; Inactive free projects can pause after a week, and automatic backups aren't included as they are on paid plans.&lt;/p&gt;

&lt;p&gt;My go to pick is usually Cloudflare Workers for lightweight APIs, Supabase when I want several backend features together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Databases: My Top Three
&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;Free allowance&lt;/th&gt;
&lt;th&gt;Best use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://neon.com/pricing" rel="noopener noreferrer"&gt;Neon&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;1 GB storage/project, 100 CU-hours/month&lt;/td&gt;
&lt;td&gt;Managed PostgreSQL with scale-to-zero compute&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://supabase.com/pricing" rel="noopener noreferrer"&gt;Supabase&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;500 MB PostgreSQL database&lt;/td&gt;
&lt;td&gt;Apps using Supabase Auth and Storage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://developers.cloudflare.com/d1/" rel="noopener noreferrer"&gt;Cloudflare D1&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;5M rows read/day, 100K rows written/day&lt;/td&gt;
&lt;td&gt;Lightweight SQL apps integrated with Workers&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;I'd personally consider Neon when I only need PostgreSQL, Supabase for an integrated backend, and D1 for small Cloudflare based applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Authentication: Avoid Building It From Scratch
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Provider&lt;/th&gt;
&lt;th&gt;Free allowance / advantage&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://clerk.com/pricing" rel="noopener noreferrer"&gt;Clerk&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Up to 50,000 monthly retained users, ready made auth UI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://supabase.com/docs/guides/auth" rel="noopener noreferrer"&gt;Supabase Auth&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;50,000 monthly active users, integrated with Supabase&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://firebase.google.com/docs/auth" rel="noopener noreferrer"&gt;Firebase Auth&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Generous free usage for supported methods; limits vary&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;One detail: &lt;strong&gt;monthly retained users and monthly active users are different metrics&lt;/strong&gt;, so don't directly compare Clerk's and Supabase's allowances.&lt;/p&gt;

&lt;p&gt;I'd choose Supabase Auth if I'm already using Supabase. Otherwise, Clerk is worth considering for its ready made authentication components.&lt;/p&gt;

&lt;h2&gt;
  
  
  File Storage: Don't Forget Bandwidth
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Cloudflare R2
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://developers.cloudflare.com/r2/pricing/" rel="noopener noreferrer"&gt;Cloudflare R2&lt;/a&gt; provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;10 GB month Standard storage free&lt;/li&gt;
&lt;li&gt;1 million Class A operations/month&lt;/li&gt;
&lt;li&gt;10 million Class B operations/month&lt;/li&gt;
&lt;li&gt;No internet egress bandwidth charges&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Operations and storage beyond the free allowance can still cost money.&lt;/p&gt;

&lt;h3&gt;
  
  
  Supabase Storage
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://supabase.com/docs/guides/storage" rel="noopener noreferrer"&gt;Supabase Storage&lt;/a&gt; includes 1 GB of file storage on its free plan, with separate bandwidth limits.&lt;/p&gt;

&lt;p&gt;A convenient choice if you're already using Supabase.&lt;/p&gt;

&lt;h3&gt;
  
  
  Neon Object Storage
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://neon.com/" rel="noopener noreferrer"&gt;Neon&lt;/a&gt; also offers object storage, with 5 GB included per free project under its October 2026 offering.&lt;/p&gt;

&lt;p&gt;My pick would be Cloudflare R2 for image heavy applications, especially when download bandwidth matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Transactional Emails
&lt;/h2&gt;

&lt;p&gt;For verification emails, password resets, and order confirmations:&lt;/p&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;Free / starting price&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://resend.com/pricing" rel="noopener noreferrer"&gt;Resend&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;3,000 emails/month, 100/day&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.brevo.com/pricing/" rel="noopener noreferrer"&gt;Brevo&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;300 emails/day free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://aws.amazon.com/ses/pricing/" rel="noopener noreferrer"&gt;Amazon SES&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Usage based, with sending options starting around $0.16 per 1,000 emails&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;I'd start with Resend for most small projects because of its simple API.&lt;/p&gt;

&lt;p&gt;Brevo is worth considering when a higher daily allowance matters. Amazon SES can be better at higher volumes, although its setup and account requirements are more steep.&lt;/p&gt;

&lt;h2&gt;
  
  
  Putting It Together: Three Budget Friendly Stacks
&lt;/h2&gt;

&lt;p&gt;We obviously don't need every service mentioned above. Here are three combinations I'd actually think about.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stack 1: $0/month
&lt;/h3&gt;

&lt;p&gt;For portfolios, experiments, and small applications:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Service&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 + Vite&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hosting&lt;/td&gt;
&lt;td&gt;Cloudflare Pages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backend&lt;/td&gt;
&lt;td&gt;Cloudflare Workers Free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;Cloudflare D1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Storage&lt;/td&gt;
&lt;td&gt;Cloudflare R2, if needed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Email&lt;/td&gt;
&lt;td&gt;Resend Free&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Estimated base cost: $0/month&lt;/strong&gt;, provided usage stays within all free allowances.&lt;/p&gt;

&lt;p&gt;This would be my first choice for a simple application without demanding backend requirements.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stack 2: $5/month
&lt;/h3&gt;

&lt;p&gt;Use the same Cloudflare based setup, but upgrade to &lt;strong&gt;Workers Paid&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For $5/month, you receive larger included request and CPU allowances.&lt;/p&gt;

&lt;p&gt;This makes sense when the application needs more backend capacity, although database and storage limits remain separate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Estimated base cost: $5/month&lt;/strong&gt;, excluding overages.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stack 3: $20/month
&lt;/h3&gt;

&lt;p&gt;For a commercial Next.js application:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Frontend / Backend&lt;/td&gt;
&lt;td&gt;Next.js&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hosting&lt;/td&gt;
&lt;td&gt;Vercel Pro&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;Neon Free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Authentication&lt;/td&gt;
&lt;td&gt;Clerk Free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Email&lt;/td&gt;
&lt;td&gt;Resend Free&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Estimated base cost: $20/month.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Vercel Pro starts at $20/month and includes usage credits. However, extra usage, paid addons, team seats, and applicable taxes can push the total higher.&lt;/p&gt;

&lt;p&gt;This setup prioritizes Next.js deployment convenience. If $20 is a strict spending ceiling, I'd lean toward the Cloudflare stack.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hidden Costs of Free Services
&lt;/h2&gt;

&lt;p&gt;Free tiers are useful, but their limitations are really important to understand before real customers depend on your application.&lt;/p&gt;

&lt;p&gt;Here's what I'd check:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Potential issue&lt;/th&gt;
&lt;th&gt;Why it matters&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Usage limits&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Extra requests, storage, or compute can trigger charges or service restrictions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Inactive projects&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Some free databases pause when unused&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Backups&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Free plans may lack automatic backups or recovery features&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Commercial restrictions&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Some free hosting plans prohibit commercial use&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Bandwidth&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;File downloads and traffic can become expensive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Domains&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Custom domains typically require an annual registration fee&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Another thing people overlook is the cost of maintaining multiple services. Sometimes even if every provider is free, you're still responsible for configuration, credentials, updates, and troubleshooting.&lt;/p&gt;

&lt;p&gt;So sometimes paying a little more for one integrated platform is worth it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Would I Actually Choose?
&lt;/h2&gt;

&lt;p&gt;For a small project, I'd start with &lt;strong&gt;Cloudflare Workers + D1&lt;/strong&gt; or &lt;strong&gt;Supabase&lt;/strong&gt;, depending on whether I need a lightweight API or a more complete backend.&lt;/p&gt;

&lt;p&gt;If I'm building with Next.js, I'd consider &lt;strong&gt;Vercel + Neon&lt;/strong&gt;, keeping hosting costs and commercial use restrictions in mind.&lt;/p&gt;

&lt;p&gt;I wouldn't introduce a separate service unless it solves an actual requirement or bottleneck.&lt;/p&gt;

&lt;p&gt;And I certainly wouldn't pay for additional infrastructure just because a project someday might have thousands of users.&lt;/p&gt;

&lt;p&gt;Start with a stack that fits your current needs, understand the free tier limitations, and upgrade when there's a clear reason.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>cloud</category>
      <category>webdev</category>
    </item>
    <item>
      <title>From Localhost to 1,000 Concurrent Users: What Actually Changes?</title>
      <dc:creator>Noah</dc:creator>
      <pubDate>Tue, 03 Nov 2026 05:27:38 +0000</pubDate>
      <link>https://dev.to/ph0sm0/from-localhost-to-1000-concurrent-users-what-actually-changes-2h74</link>
      <guid>https://dev.to/ph0sm0/from-localhost-to-1000-concurrent-users-what-actually-changes-2h74</guid>
      <description>&lt;p&gt;You finally finish your project and everything works perfectly on 'localhost:3000' and everything feels smooth and fast. Then you move on to production and want to deploy it. &lt;/p&gt;

&lt;p&gt;Before deploying you have to ask yourself if the website is really ready to handle all the real traffic at once. What happens when 1000 people use it concurrently?&lt;/p&gt;

&lt;p&gt;Of course it's not as simple as needing a bigger server as different people using different part of your websites create vastly different workloads on the website.&lt;/p&gt;

&lt;p&gt;In this blog I'm going to use a fictional e-commerce app built with next.js and PostgreSQL to see which part changes when scaling. &lt;/p&gt;

&lt;h2&gt;
  
  
  Localhost Hides Problems You Haven't Created Yet
&lt;/h2&gt;

&lt;p&gt;When you are testing alone, there is a low chance that operations rarely overlap each other. For example you would test browsing a product on the homepage, adding it to your cart and place an order separately. So here nothing really competes for database connections or trying to change the inventory record.&lt;/p&gt;

&lt;p&gt;Contrasting that, in production requests arrive independently, sometimes in burst. Services have certain capacity limits and users might retry checkout because their connection dropped even though the first request they made actually went through.&lt;/p&gt;

&lt;p&gt;So these three questions become important:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Capacity:&lt;/strong&gt; Can the system process the incoming workload?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Latency:&lt;/strong&gt; How long do customers wait?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Correctness:&lt;/strong&gt; Do simultaneous actions leave the data in a valid state?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also, a quick tip is don't benchmark your app using 'npm run dev' as next.js dev mode performs extra work and behaves differently from the production build. Test the deployed config or a realistic production build.&lt;/p&gt;

&lt;h2&gt;
  
  
  1,000 Concurrent Users ≠ 1,000 Simultaneous Requests
&lt;/h2&gt;

&lt;p&gt;1000 people having the storefront open doesn't mean all of them are sending requests every millisecond, maybe they are just browsing or reading descriptions.&lt;/p&gt;

&lt;p&gt;If each person makes one server request every 30 seconds, evenly distributed, that's roughly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1,000 / 30 ≈ 33 requests per second (RPS)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now if the average request takes 200 milliseconds. Under normal conditions, roughly seven requests are in progress at any moment (33 × 0.2). If response time rises to two seconds, that becomes about 66 requests in progress, even though traffic hasn't increased.&lt;/p&gt;

&lt;p&gt;From that we can understand that requests in flight ≈ arrival rate × average response time. It describes how many requests are underway, and not necessarily how many CPU cores you need.&lt;/p&gt;

&lt;p&gt;And also one thing to note is that averages hide bursts. A flash sale might send 500 checkout requests within seconds. Serving 33 cached pages per second is also nothing like processing 33 payments per second.&lt;/p&gt;

&lt;h2&gt;
  
  
  Follow One Product-Page Request
&lt;/h2&gt;

&lt;p&gt;A simplified architecture might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Browser
   |
CDN / Edge Cache
   | (Cache miss or dynamic request)
Next.js Application
   |
Connection Pool
   |
PostgreSQL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Not every request reaches the database. A CDN can serve cacheable images and assets directly. A cached product page or data response might avoid repeated server work, depending on how you've configured Next.js.&lt;/p&gt;

&lt;p&gt;For example, take a $50 keyboard. Its image and description may remain unchanged for weeks, while its stock count changes during a sale.&lt;/p&gt;

&lt;p&gt;Caching both for the same duration would be a mistake. A stale description is usually harmless but a stale availability indicator can mislead customers. Checkout must verify inventory against authoritative server-side data regardless of what's displayed on the page.&lt;/p&gt;

&lt;p&gt;So when working with caching, you must think about which information can be reused and when must it be fresh. This is also why personalized carts and account data must never be exposed through a shared public cache.&lt;/p&gt;

&lt;p&gt;For framework-specific strategies, see the &lt;a href="https://nextjs.org/docs/app/guides/production-checklist" rel="noopener noreferrer"&gt;Next.js production checklist&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Does the System Actually Slow Down?
&lt;/h2&gt;

&lt;p&gt;Before scaling anything, try your best to locate the bottleneck. Here are three common ones.&lt;/p&gt;

&lt;h3&gt;
  
  
  Database Connections
&lt;/h3&gt;

&lt;p&gt;Every application instance needs connections to PostgreSQL. If you're deploying ten instances, each configured with a pool of 20 connections. That's potentially 200 application-side connections competing for database capacity.&lt;/p&gt;

&lt;p&gt;A connection pool reuses connections and limits how many operations can hold one at once. In serverless deployments, an external pooler can help manage connections across short-lived instances.&lt;/p&gt;

&lt;p&gt;But pooling isn't extra database horsepower. Once the pool is busy, new operations wait. If queries are slow, the queue still grows. &lt;a href="https://www.prisma.io/docs/postgres/database/connection-pooling" rel="noopener noreferrer"&gt;Prisma's pooling guide&lt;/a&gt; explains the trade-offs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Slow or Repeated Queries
&lt;/h3&gt;

&lt;p&gt;If your search endpoint scans the full products table for every keystroke. With ten users, you might not notice but with hundreds or even more, that repeated work can dominate response time.&lt;/p&gt;

&lt;p&gt;Look at real queries using PostgreSQL's &lt;code&gt;EXPLAIN ANALYZE&lt;/code&gt;. An appropriate index, pagination, or fetching fewer columns may help. Still, An index isn't free: it uses storage and adds overhead to writes.&lt;/p&gt;

&lt;p&gt;Measure the query before optimizing it, don't add indexes simply because a table looks large.&lt;/p&gt;

&lt;h3&gt;
  
  
  Too Much Work Inside a Request
&lt;/h3&gt;

&lt;p&gt;Does checkout generate an invoice PDF, call an external email service, and wait for analytics before responding?&lt;/p&gt;

&lt;p&gt;The customer probably needs to know whether the order was accepted, and not wait for every follow-up task. Move nonessential work into a background job, with retries and failure handling. Keep essential operations, such as confirming inventory and creating the order, in the critical path.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does Adding Servers Solve?
&lt;/h2&gt;

&lt;p&gt;You have two broad options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Vertical scaling:&lt;/strong&gt; Give one machine more CPU or memory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Horizontal scaling:&lt;/strong&gt; Run more application instances behind a load balancer.&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%2Fnecn1bckyftms9twxsww.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%2Fnecn1bckyftms9twxsww.png" alt=" " width="799" height="729"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Managed platforms may handle much of the application scaling automatically. For example, &lt;a href="https://vercel.com/docs/functions/concurrency-scaling" rel="noopener noreferrer"&gt;Vercel Functions&lt;/a&gt; scale execution capacity within platform limits.&lt;/p&gt;

&lt;p&gt;But extra app instances have a catch, they can't assume their local memory is shared. If Server 1 stores a session in a variable, Server 3 won't automatically see it. Shared sessions and persistent data need an appropriate external store or other coordinated mechanism.&lt;/p&gt;

&lt;p&gt;Even worse if all three instances may still depend on the same overloaded database. Adding servers can increase pressure on it.&lt;/p&gt;

&lt;p&gt;So, only scale the parts that's limiting you. And don't add Kubernetes or Redis just because "production architecture" diagrams tend to have them.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Last Stock: A Concurrency Problem
&lt;/h2&gt;

&lt;p&gt;Here's a common failure that won't be fixed by faster or more servers.&lt;/p&gt;

&lt;p&gt;Our store has one keyboard left and two people press buy almost simultaneously:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A reads stock: 1
B reads stock: 1
A creates an order
B creates an order
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If our code checks inventory and later updates it without protection, we could oversell.&lt;/p&gt;

&lt;p&gt;One safer building block is an atomic, conditional update in PostgreSQL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="n"&gt;products&lt;/span&gt;
&lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;stock&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;stock&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;42&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;stock&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="n"&gt;RETURNING&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only a request that successfully updates the row reserves that unit. If no row is returned, no stock was changed. PostgreSQL manages conflicting updates to the same row.&lt;/p&gt;

&lt;p&gt;Still, that's not a complete checkout system. We'd also manage inventory changes and order creation in a database transaction, then handle payment outcomes, timeouts, and retries. An idempotency key can prevent a repeated checkout request from unintentionally creating a second purchase.&lt;/p&gt;

&lt;p&gt;I encountered a similar kind of problem in a sport booking project, that displaying available slots was straightforward but preventing overlapping successful reservations required more thinking.&lt;/p&gt;

&lt;p&gt;The lesson here is that your app can respond quickly and still return the wrong result. So scaling has to protect data correctness as well as maintain speed.&lt;/p&gt;

&lt;p&gt;See &lt;a href="https://www.postgresql.org/docs/current/transaction-iso.html" rel="noopener noreferrer"&gt;PostgreSQL's transaction isolation documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Always test it rather than guessing
&lt;/h2&gt;

&lt;p&gt;So can our app support 1,000 concurrent users? &lt;/p&gt;

&lt;p&gt;You can use tools such as &lt;a href="https://grafana.com/docs/k6/latest/testing-guides/api-load-testing/" rel="noopener noreferrer"&gt;Grafana k6&lt;/a&gt; to generate controlled traffic in an environment you own or are authorized to test.&lt;/p&gt;

&lt;p&gt;Create a scenario resembling your real store. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;80% product browsing&lt;/li&gt;
&lt;li&gt;15% search requests&lt;/li&gt;
&lt;li&gt;5% checkout attempts using test orders&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those proportions are illustrative. Use real traffic patterns when available. Increase the load gradually and watch:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;What it reveals&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;RPS&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Traffic the app actually handles&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;p95 latency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Time within which 95% of measured requests complete&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Error rate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;How often requests fail&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;CPU, memory, DB connections&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Which resources are under pressure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Order and inventory checks&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Whether concurrent operations remain correct&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;So dont stop when the homepage looks fast or smooth. Test checkout bursts, failed dependencies, and the last-item-in-stock case. A successful HTTP response doesn't prove that an order was recorded correctly.&lt;/p&gt;

&lt;p&gt;Then you can try to make one targeted improvement and run the same test again. Using data from each change, try to create the most suitable tradeoffs between each metrics and craft the best user experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  So What Actually Changes?
&lt;/h2&gt;

&lt;p&gt;Going from your own machine to 1000 concurrent users doesn't necessarily mean a changing to a new tech stack.&lt;/p&gt;

&lt;p&gt;What changes is that requests overlap, limits become visible, and mistakes have real consequence on real customers. A CDN may remove unnecessary requests. Better queries can relieve the database. More application instances can add capacity. Transactions protect shared data. Load tests reveal whether any of it is enough.&lt;/p&gt;

&lt;p&gt;Start with a simple architecture you understand, and measure it with a realistic workload. Then fix what actually breaks.&lt;/p&gt;

&lt;p&gt;Keep building and happy building!&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>backend</category>
      <category>nextjs</category>
      <category>performance</category>
    </item>
    <item>
      <title>5 Coding Problems. No AI. No Google. Are You Still Sharp?</title>
      <dc:creator>Noah</dc:creator>
      <pubDate>Sat, 31 Oct 2026 12:13:19 +0000</pubDate>
      <link>https://dev.to/ph0sm0/5-coding-problems-no-ai-no-google-are-you-still-sharp-5ccp</link>
      <guid>https://dev.to/ph0sm0/5-coding-problems-no-ai-no-google-are-you-still-sharp-5ccp</guid>
      <description>&lt;p&gt;You've probably written code similar to the examples below a good number of times. Maybe you've even asked AI to do some of these things for you recently.&lt;/p&gt;

&lt;p&gt;But could you still do them yourself, without AI or even a quick Google search?&lt;/p&gt;

&lt;h2&gt;
  
  
  Rules :
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;No AI assistants, Google, Stack Overflow, or documentation.&lt;/li&gt;
&lt;li&gt;Use JavaScript (no frameworks or third-party libraries).&lt;/li&gt;
&lt;li&gt;You can run your code as many times as you need.&lt;/li&gt;
&lt;li&gt;Aim to complete all five challenges in 60 minutes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lets see how comfortable you are working without assistance. Have fun!&lt;/p&gt;




&lt;h2&gt;
  
  
  Challenge 1: Find the Bug in This Shopping Cart
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Difficulty:&lt;/strong&gt; Easy&lt;/p&gt;

&lt;p&gt;A customer reports that their shopping cart sometimes displays the wrong total. You've been given the following function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cart&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Keyboard&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;quantity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Mouse&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;quantity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Monitor&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;quantity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;calculateTotal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;total&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;quantity&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;total&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;quantity&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;calculateTotal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Your Task
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Identify what's causing the incorrect total.&lt;/li&gt;
&lt;li&gt;Fix the function without removing the &lt;code&gt;reduce()&lt;/code&gt; method.&lt;/li&gt;
&lt;li&gt;Make sure the function works even when some products have a quantity of zero.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Expected output:&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;300
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Bonus:&lt;/strong&gt; Explain why the bug might not be noticed with certain cart arrangements.&lt;/p&gt;




&lt;h2&gt;
  
  
  Challenge 2: Process a Messy API Response
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Difficulty:&lt;/strong&gt; Easy–Medium&lt;/p&gt;

&lt;p&gt;You're building a sales dashboard, and your backend returns the following data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;orders&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;paid&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;total&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pending&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;total&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;75&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;paid&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;total&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;refunded&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;total&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;paid&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;total&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;paid&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Your Task
&lt;/h3&gt;

&lt;p&gt;Write a function named &lt;code&gt;getSalesSummary(response)&lt;/code&gt; that returns an object containing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;paidOrders&lt;/code&gt;: The number of orders with a status of &lt;code&gt;"paid"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;revenue&lt;/code&gt;: The sum of valid numeric totals from paid orders.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;averageOrderValue&lt;/code&gt;: Revenue divided by the number of paid orders that have valid numeric totals.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Requirements:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ignore pending and refunded orders when calculating revenue.&lt;/li&gt;
&lt;li&gt;Missing or &lt;code&gt;null&lt;/code&gt; totals should not contribute to revenue or the average.&lt;/li&gt;
&lt;li&gt;They should still count toward &lt;code&gt;paidOrders&lt;/code&gt; if their status is &lt;code&gt;"paid"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Return an average of &lt;code&gt;0&lt;/code&gt; if there are no paid orders with valid numeric totals.&lt;/li&gt;
&lt;li&gt;Don't modify the original response.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Expected output:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;paidOrders&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;revenue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;170&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;averageOrderValue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;85&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Bonus:&lt;/strong&gt; What happens if &lt;code&gt;response.orders&lt;/code&gt; is an empty array?&lt;/p&gt;




&lt;h2&gt;
  
  
  Challenge 3: Build a Search Bar Without a Framework
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Difficulty:&lt;/strong&gt; Medium&lt;/p&gt;

&lt;p&gt;You've been given a simple product page. Your task is to make its search bar functional using nothing but vanilla JavaScript.&lt;/p&gt;

&lt;h3&gt;
  
  
  Starter HTML
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt;
  &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"search"&lt;/span&gt;
  &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt;
  &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Search products..."&lt;/span&gt;
&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;ul&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"products"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Wireless Mouse&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Mechanical Keyboard&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;USB-C Cable&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Mouse Pad&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Gaming Monitor&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"empty"&lt;/span&gt; &lt;span class="na"&gt;hidden&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;No products found.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="c1"&gt;// Write your JavaScript here&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Your Task
&lt;/h3&gt;

&lt;p&gt;Implement a search feature that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Filters products as the user types.&lt;/li&gt;
&lt;li&gt;Ignores uppercase and lowercase differences.&lt;/li&gt;
&lt;li&gt;Supports partial matches.&lt;/li&gt;
&lt;li&gt;Shows all products when the search field is empty.&lt;/li&gt;
&lt;li&gt;Displays "No products found." when nothing matches.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Expected behavior:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Search input&lt;/th&gt;
&lt;th&gt;Visible products&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;mouse&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Wireless Mouse, Mouse Pad&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;KEYBOARD&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Mechanical Keyboard&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;usb&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;USB-C Cable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;xyz&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No products found&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Empty input&lt;/td&gt;
&lt;td&gt;All five products&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Bonus:&lt;/strong&gt; Make the search ignore leading and trailing spaces.&lt;/p&gt;

&lt;p&gt;No React, Vue, jQuery, or other frameworks. Just JavaScript and the DOM.&lt;/p&gt;




&lt;h2&gt;
  
  
  Challenge 4: Handle a Failing API
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Difficulty:&lt;/strong&gt; Medium&lt;/p&gt;

&lt;p&gt;You're building a profile page that retrieves user information from an API.&lt;/p&gt;

&lt;p&gt;Unfortunately, the API isn't always reliable.&lt;/p&gt;

&lt;p&gt;Here's a mock API function you can use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;attempts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fetchUser&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;attempts&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;attempts&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Network error&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
          &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Alex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Developer&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first request will fail. The second will succeed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Starter HTML
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"load"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Load User&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"retry"&lt;/span&gt; &lt;span class="na"&gt;hidden&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Retry&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"status"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"profile"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="c1"&gt;// Place fetchUser() and your code here&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Your Task
&lt;/h3&gt;

&lt;p&gt;Implement the following behavior:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clicking "Load User" calls &lt;code&gt;fetchUser()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;While waiting, display &lt;code&gt;"Loading..."&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If the request fails, display the error message.&lt;/li&gt;
&lt;li&gt;Show the "Retry" button when an error occurs.&lt;/li&gt;
&lt;li&gt;Clicking "Retry" attempts the request again.&lt;/li&gt;
&lt;li&gt;On success, display the user's name and role.&lt;/li&gt;
&lt;li&gt;Prevent users from triggering multiple requests while one is still loading.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Expected flow:&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 clicks "Load User"
        |
        v
     Loading...
        |
        v
  Error: Network error
        |
        v
   User clicks "Retry"
        |
        v
     Loading...
        |
        v
   Alex - Developer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can use any approach, but the final solution should handle both success and failure correctly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bonus:&lt;/strong&gt; Clear the previous error message when retrying.&lt;/p&gt;




&lt;h2&gt;
  
  
  Challenge 5: Prevent Double Bookings
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Difficulty:&lt;/strong&gt; Medium&lt;/p&gt;

&lt;p&gt;Imagine you're working on a booking application for a small sports venue.&lt;/p&gt;

&lt;p&gt;Customers can reserve a court for a specific period, but two reservations must never overlap.&lt;/p&gt;

&lt;p&gt;You're given the following existing bookings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bookings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;09:00&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;end&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;10:00&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;11:00&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;end&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;12:00&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;14:00&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;end&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;15:30&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Your Task
&lt;/h3&gt;

&lt;p&gt;Write a function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;canBook&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bookings&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;newBooking&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Your code here&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The function should return:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;true&lt;/code&gt; if the requested time slot is available.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;false&lt;/code&gt; if the requested time slot overlaps an existing booking or is invalid.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Requirements:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A new booking must not overlap any existing booking.&lt;/li&gt;
&lt;li&gt;The booking's end time must be later than its start time.&lt;/li&gt;
&lt;li&gt;A booking can start exactly when another booking ends.&lt;/li&gt;
&lt;li&gt;A booking can end exactly when another booking starts.&lt;/li&gt;
&lt;li&gt;Existing bookings might not be sorted.&lt;/li&gt;
&lt;li&gt;The function must not modify the original bookings.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Assumptions:&lt;/strong&gt; All bookings are for the same day, use valid zero-padded 24-hour &lt;code&gt;HH:MM&lt;/code&gt; times, and do not cross midnight. A booking occupies its start time but not its end time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Test Cases
&lt;/h3&gt;

&lt;p&gt;Your function should produce these results:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;canBook&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bookings&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;09:30&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;end&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;10:30&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;canBook&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bookings&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;10:00&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;end&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;11:00&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;canBook&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bookings&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;13:00&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;end&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;14:30&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;canBook&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bookings&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;15:30&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;end&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;16:00&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;canBook&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bookings&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;13:00&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;end&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;12:00&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Bonus:&lt;/strong&gt; How would you prevent two users from successfully booking the same slot if they submit their requests at almost exactly the same time?&lt;/p&gt;

&lt;p&gt;You don't need to implement the bonus. Just think about what would have to change beyond this function.&lt;/p&gt;




&lt;h2&gt;
  
  
  So, How Did You Do?
&lt;/h2&gt;

&lt;p&gt;How many did you manage to complete?&lt;/p&gt;

&lt;p&gt;Did you struggle with remembering syntax, understanding the logic, or handling unexpected edge cases?&lt;/p&gt;

&lt;p&gt;Personally, I think there's a difference between understanding code when you read it and actually being able to write it yourself. And as AI becoming such a normal part of development, I thought it would be interesting to test that difference. And of course dont take this challenge too seriously and keep improving. :)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Share your score out of 5 in the comments, and let me know which challenge gave you the most trouble.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>challenge</category>
      <category>coding</category>
      <category>discuss</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Why Creativity Is the New Currency of Innovation</title>
      <dc:creator>Noah</dc:creator>
      <pubDate>Fri, 30 Oct 2026 07:58:30 +0000</pubDate>
      <link>https://dev.to/ph0sm0/why-creativity-is-the-new-currency-of-innovation-44bl</link>
      <guid>https://dev.to/ph0sm0/why-creativity-is-the-new-currency-of-innovation-44bl</guid>
      <description>&lt;p&gt;&lt;strong&gt;Why Creativity Is the New Currency of Innovation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Over the past few years, its undeniable that the methods and techniques used to create in the tech field have changed quite substantially.&lt;/p&gt;

&lt;p&gt;Someone with a creative, innovative idea back then needed not only the idea itself, but also an extensive set of technical skills covering many different fields in order to execute it well enough. Contrast this with the modern age, where the same person with a bright idea, but maybe little technical knowledge, can still pursue it with the help of AI assistance.&lt;/p&gt;

&lt;p&gt;The arrival of AI has lowered the technical barriers when it comes to creating tech, allowing novice programmers and people with less experience to innovate and create.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;So this creates a question:&lt;/strong&gt; If technical barriers continue to fall, what exactly will differentiate genuinely innovative people?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I actually thought of creating this post because of what I saw when competing in hackathons. Everyone is given the ability, or at least the permission, to extensively use AI to develop their own products.&lt;/p&gt;

&lt;p&gt;And so I started noticing that what truly differentiates a project that wins from one that loses is often more about creativity and the ability to solve a real problem, rather than just being cracked at programming.&lt;/p&gt;

&lt;p&gt;Of course, technical execution still matters. But when everyone has access to increasingly powerful development tools, being able to build something is no longer the only thing that makes you stand out.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Technical Barrier Is Getting Lower
&lt;/h2&gt;

&lt;p&gt;In the past, there were a few prominent traditional barriers to software creation. To name a few: programming knowledge, infrastructure, development costs, and of course, time.&lt;/p&gt;

&lt;p&gt;Over time the addition of more open-source software, cloud platforms, and frameworks has made development more accessible. Now, with the addition of AI, this process has been amplified even further.&lt;/p&gt;

&lt;p&gt;This is especially noticeable when writing tedious code or working on something that you already know how to do but that simply takes a lot of time.&lt;/p&gt;

&lt;p&gt;Things like setting up an interface, writing repetitive functions, debugging, and creating basic application structures can now be done much faster with AI assistance.&lt;/p&gt;

&lt;p&gt;And this isn't coming from just a few developers.&lt;/p&gt;

&lt;p&gt;According to the &lt;strong&gt;2026 Stack Overflow Developer Survey&lt;/strong&gt;, around &lt;strong&gt;66%&lt;/strong&gt; of respondents reported using AI coding assistants or coding agents at work.&lt;/p&gt;

&lt;p&gt;Another interesting finding comes from &lt;strong&gt;Stanford's 2025 AI Index&lt;/strong&gt;, which reported that the cost of using an AI model at roughly GPT-3.5-level performance fell more than &lt;strong&gt;280 times&lt;/strong&gt; between November 2022 and October 2024.&lt;/p&gt;

&lt;p&gt;For me, this shows that AI is not only becoming more capable, but also increasingly accessible to more and more people. While we are still far from a world where anyone can build absolutely anything without technical knowledge, compared to a few years ago, the difference is already quite noticeable.&lt;/p&gt;




&lt;h2&gt;
  
  
  If Everyone Can Build, What Makes you Different?
&lt;/h2&gt;

&lt;p&gt;As more and more people gain access to AI coding tools, technical implementation becomes less of an exclusive advantage and more of a common capability. Especially when people have access to the same tools and resources to solve similar problems, we're likely to see increasingly similar applications with similar themes. This shows that technical execution alone is no longer enough to create something genuinely innovative.&lt;/p&gt;

&lt;p&gt;But with this shift also comes an advantage for creative thinkers and imaginators, who use the exact same tools yet produce completely different results.&lt;/p&gt;

&lt;p&gt;I noticed this during one of the hackathons I participated in. I was honestly surprised when I opened the project gallery, where everyone could browse other participants' submissions, and saw just how many projects had the most AI generated looking thumbnails and the same core generic ideas.&lt;/p&gt;

&lt;p&gt;While AI generated thumbnails and generic ideas don't automatically mean that a project is low effort, try putting yourself in the judges' position. When you have to assess thousands of submissions, or even more, you're likely to spend less time on projects that look generic compared to those with more authentic presentations and original ideas. You might even have a less favorable first impression of them. &lt;/p&gt;

&lt;p&gt;And from what I observed, the projects that truly stood out, including those that ended up winning, weren't necessarily the most technically complicated. They were the ones created by people who dared to imagine something different and approached real problems in creative ways.&lt;/p&gt;




&lt;h2&gt;
  
  
  Can AI be Creative Too?
&lt;/h2&gt;

&lt;p&gt;There's actually one interesting thing with my argument that I think is worth discussing.&lt;/p&gt;

&lt;p&gt;So if AI can help us write code, design interfaces, and develop applications, what's stopping it from also coming up with creative ideas?&lt;/p&gt;

&lt;p&gt;After all, literally anyone can open an AI chatbot and ask it to generate 100 innovative startup ideas.&lt;/p&gt;

&lt;p&gt;So if AI can also generate ideas, wouldn't creativity eventually become less valuable?&lt;/p&gt;

&lt;p&gt;I think the answer depends on what we actually mean by creativity.&lt;/p&gt;

&lt;p&gt;There's an interesting 2024 study published in &lt;em&gt;Science Advances&lt;/em&gt; that explored how AI generated ideas affected people's creative writing.&lt;/p&gt;

&lt;p&gt;The researchers found that AI assistance helped people produce stories that were rated as more creative and enjoyable. However, they also found that stories written with AI assistance are usually more similar to each other.&lt;/p&gt;

&lt;p&gt;Of course, this study was about writing, not software dev, so we shouldn't assume the same thing will happen with every AI generated product.&lt;/p&gt;

&lt;p&gt;But this raises an interesting question.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If everyone uses similar tools to brainstorm ideas, could we end up with more ideas overall, but fewer ideas that truly stand out?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is why I think creativity goes far beyond simply generating ideas.&lt;/p&gt;

&lt;p&gt;It's also about recognizing problems, understanding people, questioning assumptions, and knowing which ideas are actually worth pursuing.&lt;/p&gt;

&lt;p&gt;AI might suggest building an app to help students become more productive. But is another productivity app really what students need? What specific problem are they struggling with that existing solutions haven't addressed?&lt;/p&gt;

&lt;p&gt;Without understanding those questions, even a seemingly creative idea could end up being just another unnecessary application.&lt;/p&gt;




&lt;h2&gt;
  
  
  Technical Skills Are Still Extremely Important
&lt;/h2&gt;

&lt;p&gt;Now after everything I've said, some of y'all might think that I'm giving the impression that technical skills are becoming useless, but that's not true at all.&lt;/p&gt;

&lt;p&gt;There's a very big difference between generating a working prototype and actually building software that people can depend on.&lt;/p&gt;

&lt;p&gt;An AI coding agent might be able to generate an entire application in a relatively short amount of time. But what happens when there are security vulnerabilities? What if the application needs to handle thousands of users? What if something breaks in production?&lt;/p&gt;

&lt;p&gt;These are problems that still require a decent understanding of software engineering.&lt;/p&gt;

&lt;p&gt;Even when using AI tools, you need enough technical knowledge to recognize when something is wrong and how to respond.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;2026 Stack Overflow Developer Survey&lt;/strong&gt; found that &lt;strong&gt;48%&lt;/strong&gt; of respondents trusted AI output when they could easily verify it, while only &lt;strong&gt;6.6%&lt;/strong&gt; trusted it for many tasks, including important work decisions.&lt;/p&gt;

&lt;p&gt;This shows that despite how useful these tools have become, developers still recognize the need to verify their results.&lt;/p&gt;

&lt;p&gt;So rather than saying that creativity will replace technical knowledge, I think the more interesting possibility is that technical expertise will continue to play an important role, but it will no longer be the only thing that makes someone stand out.&lt;/p&gt;

&lt;p&gt;As more people gain access to the tools needed to turn their ideas into reality, I believe what will increasingly differentiate us is not just how well we can build something, but what we actually choose to build.&lt;/p&gt;

&lt;p&gt;And that's ultimately why I think creativity is becoming the new currency of innovation!&lt;/p&gt;

&lt;p&gt;Sources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://survey.stackoverflow.co/2026/ai/data/ai-select" rel="noopener noreferrer"&gt;Stack Overflow 2026 Developer Survey - AI Data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://hai.stanford.edu/ai-index/2025-ai-index-report/research-and-development" rel="noopener noreferrer"&gt;Stanford 2025 AI Index Report&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.science.org/doi/10.1126/sciadv.adn5290" rel="noopener noreferrer"&gt;Science Advances Study on AI &amp;amp; Creativity&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://survey.stackoverflow.co/2026/ai/data/ai-trust" rel="noopener noreferrer"&gt;Stack Overflow 2026 Developer Survey - AI Trust Data&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>beginners</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
