<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[learnNext js with Amer]]></title><description><![CDATA[learnNext js with Amer]]></description><link>https://learnnext-js-with-amer.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 20 Sep 2026 08:56:10 GMT</lastBuildDate><atom:link href="https://learnnext-js-with-amer.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[🚀 Beginner’s Guide to Next.js: Build Your First App in Minutes]]></title><description><![CDATA[Introduction
Next.js has become one of the most powerful React frameworks, making it easier than ever to build high-performance web applications. Whether you’re a beginner or an experienced developer, this guide will walk you through building your fi...]]></description><link>https://learnnext-js-with-amer.hashnode.dev/beginners-guide-to-nextjs-build-your-first-app-in-minutes</link><guid isPermaLink="true">https://learnnext-js-with-amer.hashnode.dev/beginners-guide-to-nextjs-build-your-first-app-in-minutes</guid><category><![CDATA[Next.js]]></category><category><![CDATA[React]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Frontend Development]]></category><category><![CDATA[webdev]]></category><category><![CDATA[learning]]></category><category><![CDATA[tips]]></category><category><![CDATA[Vercel]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[Arab Amer]]></dc:creator><pubDate>Sun, 16 Mar 2025 02:51:56 GMT</pubDate><content:encoded><![CDATA[<h3 id="heading-introduction"><strong>Introduction</strong></h3>
<p>Next.js has become one of the most powerful React frameworks, making it easier than ever to build high-performance web applications. Whether you’re a beginner or an experienced developer, this guide will walk you through <strong>building your first Next.js app step by step</strong>.</p>
<p>By the end of this tutorial, you’ll have a working Next.js project ready for deployment!</p>
<hr />
<h2 id="heading-why-choose-nextjs"><strong>🔹 Why Choose Next.js?</strong></h2>
<p>Before we dive into the code, let’s see why Next.js is so popular:</p>
<p>✅ <strong>Server-side Rendering (SSR)</strong> – Improves SEO &amp; performance<br />✅ <strong>Static Site Generation (SSG)</strong> – Faster page loads<br />✅ <strong>API Routes</strong> – Backend functionality without extra setup<br />✅ <strong>Automatic Code Splitting</strong> – Optimized bundle size<br />✅ <strong>Built-in Image Optimization</strong> – Faster loading images</p>
<p>With these benefits, Next.js is a game-changer for web development!</p>
<hr />
<h2 id="heading-step-1-install-nextjs"><strong>📌 Step 1: Install Next.js</strong></h2>
<p>To start a new Next.js project, open your terminal and run:</p>
<pre><code class="lang-plaintext">npx create-next-app@latest
</code></pre>
<p>On installation, you'll see the following prompts:</p>
<p>What is your project named? my-app</p>
<p>Would you like to use TypeScript? No / Yes</p>
<p>Would you like to use ESLint? No / Yes</p>
<p>Would you like to use Tailwind CSS? No / Yes</p>
<p>Would you like your code inside a <code>src/</code> directory? No / Yes</p>
<p>Would you like to use App Router? (recommended) No / Yes</p>
<p>Would you like to use Turbopack for <code>next dev</code>? No / Yes</p>
<p>Would you like to customize the import alias (<code>@/*</code> by default)? No / Yes What import alias would you like configured? @/*</p>
<p>After the prompts, <a target="_blank" href="https://nextjs.org/docs/app/api-reference/cli/create-next-app"><code>create-next-app</code></a> <a target="_blank" href="https://nextjs.org/docs/app/api-reference/cli/create-next-app">will create a f</a>older with your project name and install the required dependencies.</p>
<h2 id="heading-run-the-development-serverhttpsnextjsorgdocsappgetting-startedinstallationrun-the-development-server"><a target="_blank" href="https://nextjs.org/docs/app/getting-started/installation#run-the-development-server"><strong>Run the development server</strong></a></h2>
<ol>
<li><p><a target="_blank" href="https://nextjs.org/docs/app/getting-started/installation#run-the-development-server">Run <code>npm run dev</code> to star</a>t th<a target="_blank" href="https://nextjs.org/docs/app/getting-started/installation#run-the-development-server">e development server.</a></p>
</li>
<li><p><a target="_blank" href="https://nextjs.org/docs/app/getting-started/installation#run-the-development-server">V</a>isit <a target="_blank" href="http://localhost:3000"><code>http://localhost:3000</code></a> <a target="_blank" href="https://nextjs.org/docs/app/getting-started/installation#run-the-development-server">to view your application.</a></p>
</li>
<li><p>Edit the<code>app/page.tsx</code> file a<a target="_blank" href="https://nextjs.org/docs/app/getting-started/installation#run-the-development-server">nd save it to see the upda</a>ted result in your browser.</p>
</li>
</ol>
<hr />
<h2 id="heading-step-2project-structure-and-organization"><strong>📌 Step 2:Project structure and organization</strong></h2>
<p>This page provides an overview of the folder and file conventions in Next.js, as well as tips for organizing your project.</p>
<h2 id="heading-folder-and-file-conventionshttpsnextjsorgdocsappgetting-startedproject-structurefolder-and-file-conventions"><a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#folder-and-file-conventions"><strong>Folder and file conventions</strong></a></h2>
<h3 id="heading-top-level-foldhttpsnextjsorgdocsappgetting-startedproject-structurefolder-and-file-conventionsershttpsnextjsorgdocsappgetting-startedproject-structuretop-level-folders"><a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#folder-and-file-conventions"><strong>Top-level fold</strong></a><a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#top-level-folders"><strong>ers</strong></a></h3>
<p>O<a target="_blank" href="https://nextjs.org/docs/app/building-your-application/optimizing/static-assets">n</a><a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#folder-and-file-conventions">ce installed, your project will have the following files:</a></p>
<p><a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#top-level-folders">Top-level fo</a>lders are used to organize you<a target="_blank" href="https://nextjs.org/docs/app/building-your-application/routing">r a</a>pplication's code and static assets.</p>
<p><img src="https://nextjs.org/_next/image?url=https%3A%2F%2Fh8DxKfmAPhn8O0p3.public.blob.vercel-storage.com%2Fdocs%2Flight%2Ftop-level-folders.png&amp;w=3840&amp;q=75" alt="Route segments to path segments" /></p>
<div class="hn-table">
<table>
<thead>
<tr>
<td></td><td></td></tr>
</thead>
<tbody>
<tr>
<td><a target="_blank" href="https://nextjs.org/docs/pages/building-your-application/routing"><code>ap</code></a><a target="_blank" href="https://nextjs.org/docs/app/building-your-application/routing"><code>p</code></a></td><td><a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#folder-and-file-conventions">App Router</a></td></tr>
<tr>
<td><a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#top-level-folders"><code>pages</code></a></td><td><a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#top-level-folders">Pa</a><a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#folder-and-file-conventions">ges Router</a></td></tr>
<tr>
<td><a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#folder-and-file-conventions"><code>p</code></a><a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#top-level-folders"><code>ub</code></a><a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#folder-and-file-conventions"><code>lic</code></a></td><td><a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#folder-and-file-conventions">Static ass</a><a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#top-level-folders">ets to be served</a></td></tr>
<tr>
<td><a target="_blank" href="https://nextjs.org/docs/app/building-your-application/configuring/src-directory"><code>src</code></a></td><td><a target="_blank" href="https://nextjs.org/docs/app/building-your-application/routing">Op</a>tional applicati<a target="_blank" href="https://nextjs.org/docs/app/building-your-application/routing">on</a> s<a target="_blank" href="https://nextjs.org/docs/pages/building-your-application/routing">ource</a> folder</td></tr>
</tbody>
</table>
</div><p><a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#top-level-folders">�</a><a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#folder-and-file-conventions">� <strong>pages/</strong> → Contains all you</a><a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#top-level-folders">r pages (e.g.,</a> <a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#folder-and-file-conventions"><code>index.js</code>, <code>about.js</code>)<br />📂 <strong>p</strong></a><a target="_blank" href="https://nextjs.org/docs/app/getting-started/project-structure#top-level-folders"><strong>ublic/</strong> → Stores s</a><a target="_blank" href="https://nextjs.org/docs/app/building-your-application/optimizing/static-assets">tatic</a> <a target="_blank" href="https://nextjs.org/docs/pages/building-your-application/routing">asset</a><a target="_blank" href="https://nextjs.org/docs/app/building-your-application/optimizing/static-assets">s l</a>i<a target="_blank" href="https://nextjs.org/docs/pages/building-your-application/routing">ke im</a><a target="_blank" href="https://nextjs.org/docs/app/building-your-application/configuring/src-directory">age</a><a target="_blank" href="https://nextjs.org/docs/app/building-your-application/routing">s<br />�</a><a target="_blank" href="https://nextjs.org/docs/app/building-your-application/optimizing/static-assets">� <strong>st</strong></a><a target="_blank" href="https://nextjs.org/docs/app/building-your-application/routing"><strong>yle</strong></a><a target="_blank" href="https://nextjs.org/docs/pages/building-your-application/routing"><strong>s/</strong> →</a> <a target="_blank" href="https://nextjs.org/docs/app/building-your-application/optimizing/static-assets">C</a><a target="_blank" href="https://nextjs.org/docs/app/building-your-application/configuring/src-directory">o</a>nta<a target="_blank" href="https://nextjs.org/docs/pages/building-your-application/routing">ins g</a>lob<a target="_blank" href="https://nextjs.org/docs/app/building-your-application/optimizing/static-assets">al &amp; c</a>ompo<a target="_blank" href="https://nextjs.org/docs/app/building-your-application/optimizing/static-assets">nent-s</a>pecific <a target="_blank" href="https://nextjs.org/docs/pages/building-your-application/routing">CSS b</a><a target="_blank" href="https://nextjs.org/docs/app/building-your-application/configuring/src-directory">y</a> <a target="_blank" href="https://nextjs.org/docs/pages/building-your-application/routing">defau</a>lt <a target="_blank" href="https://nextjs.org/docs/app/building-your-application/configuring/src-directory">tai</a><a target="_blank" href="https://nextjs.org/docs/app/building-your-application/optimizing/static-assets">lwind</a> i<a target="_blank" href="https://nextjs.org/docs/app/building-your-application/optimizing/static-assets">s inst</a>alled.you don’t <a target="_blank" href="https://nextjs.org/docs/app/building-your-application/configuring/src-directory">nee</a>d to <a target="_blank" href="https://nextjs.org/docs/app/building-your-application/configuring/src-directory"></a>install externally.<br />📜 <strong>next.config.js</strong> → Configuration settings.</p>
<hr />
<p>Note: You must have to save your pages with page.tsx or jsx. if you are creating about page you must have to create a about file in that You have to create page.tsx or jsx file.</p>
<h2 id="heading-step-3-create-your-first-page"><strong>📌 Step 3: Create Your First Page</strong></h2>
<p>Edit the <code>pages/index.js</code> file to customize your homepage:</p>
<pre><code class="lang-plaintext">export default function Home() {
  return (
    &lt;div&gt;
      &lt;h1&gt;Welcome to My First Next.js App 🚀&lt;/h1&gt;
      &lt;p&gt;This is a beginner-friendly tutorial.&lt;/p&gt;
    &lt;/div&gt;
  );
}
</code></pre>
<p>Save the file and check your browser. You just created your first Next.js page!</p>
<hr />
<h2 id="heading-step-4-add-navigation"><strong>📌 Step 4: Add Navigation</strong></h2>
<p>To create multiple pages, add an <strong>About</strong> page (<code>pages/about.js</code>):</p>
<pre><code class="lang-plaintext">export default function About() {
  return (
    &lt;div&gt;
      &lt;h1&gt;About This App&lt;/h1&gt;
      &lt;p&gt;Built with Next.js for fast performance!&lt;/p&gt;
    &lt;/div&gt;
  );
}
</code></pre>
<p>Now, update your <code>index.js</code> file to include navigation:</p>
<pre><code class="lang-plaintext">import Link from "next/link";

export default function Home() {
  return (
    &lt;div&gt;
      &lt;h1&gt;Welcome to My Next.js App 🚀&lt;/h1&gt;
      &lt;nav&gt;
        &lt;Link href="/"&gt;Home&lt;/Link&gt; | &lt;Link href="/about"&gt;About&lt;/Link&gt;
      &lt;/nav&gt;
    &lt;/div&gt;
  );
}
</code></pre>
<p>Now, you can navigate between pages seamlessly! 🔄</p>
<hr />
<h2 id="heading-step-5-deploy-your-app-for-free"><strong>📌 Step 5: Deploy Your App for Free</strong></h2>
<p>You can deploy your app on <strong>Vercel</strong> (the creators of Next.js) in <strong>one click</strong>:</p>
<p>1️⃣ Push your code to <strong>GitHub</strong><br />2️⃣ Go to <a target="_blank" href="https://vercel.com/">vercel.com</a><br />3️⃣ Click <strong>"New Project"</strong> → Select your repository<br />4️⃣ Click <strong>"Deploy"</strong> 🚀</p>
<p>Your app will be live on a free <strong>.vercel.app</strong> domain in seconds!</p>
<hr />
<h2 id="heading-congratulations"><strong>Congratulations:</strong></h2>
<p>Congratulations! 🎉 You’ve built and deployed your first <strong>Next.js app</strong> in just a few minutes.</p>
<p>Next.js makes modern web development faster, easier, and more powerful. Keep experimenting and explore features like <strong>API Routes, Image Optimization, and Middleware</strong>.</p>
<p>Do you have any questions about Next.js? Drop them in the comments! 💬🚀</p>
<hr />
<h2 id="heading-further-reading-amp-resources">🔹 <strong>Further Reading &amp; Resources</strong></h2>
<p>📖 <a target="_blank" href="https://nextjs.org/docs/app/getting-started/installation">https://nextjs.org/docs/app/getting-started/installation</a><br />🎥 <a target="_blank" href="https://youtu.be/MVrOsei2Xqg">Next.js Crash Course (YouTube)</a><br />💡 Vercel Deployment Guide</p>
]]></content:encoded></item></channel></rss>