<?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[Code With Ajnas]]></title><description><![CDATA[Welcome to my corner of the internet. I document my journey as a developer, sharing what I learn, the projects I build, bugs I encounter, and lessons along the ]]></description><link>https://codewithajnas.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6aaa66b10445166345cf1f44/09377673-a7db-4c05-bd5b-44c8bc6759a7.png</url><title>Code With Ajnas</title><link>https://codewithajnas.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 22:09:53 GMT</lastBuildDate><atom:link href="https://codewithajnas.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[The Essential Technologies Behind Modern Websites]]></title><description><![CDATA[A modern website is much more than a collection of HTML pages.
Today, websites need to be fast, responsive, secure, accessible, search-engine friendly, and capable of delivering a smooth experience ac]]></description><link>https://codewithajnas.hashnode.dev/the-essential-technologies-behind-modern-websites</link><guid isPermaLink="true">https://codewithajnas.hashnode.dev/the-essential-technologies-behind-modern-websites</guid><category><![CDATA[Web Development]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[Frontend Development]]></category><category><![CDATA[Backend Development]]></category><category><![CDATA[SEO]]></category><dc:creator><![CDATA[Ajnas Ahammed]]></dc:creator><pubDate>Mon, 21 Sep 2026 09:42:25 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6aaa66b10445166345cf1f44/ce1ad2e8-59cf-4edc-886f-438ffa4258c7.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A modern website is much more than a collection of HTML pages.</p>
<p>Today, websites need to be fast, responsive, secure, accessible, search-engine friendly, and capable of delivering a smooth experience across different devices. Behind that experience is a combination of technologies working together.</p>
<p>Whether you're learning web development or building websites for businesses, understanding these technologies gives you a much clearer picture of how the web actually works.</p>
<h2>1. HTML: The Structure of the Web</h2>
<p>HTML, or HyperText Markup Language, provides the basic structure of a webpage.</p>
<p>It defines elements such as:</p>
<ul>
<li><p>Headings</p>
</li>
<li><p>Paragraphs</p>
</li>
<li><p>Images</p>
</li>
<li><p>Links</p>
</li>
<li><p>Forms</p>
</li>
<li><p>Tables</p>
</li>
<li><p>Navigation</p>
</li>
</ul>
<p>For example:</p>
<pre><code class="language-html">&lt;h1&gt;Welcome to My Website&lt;/h1&gt;
&lt;p&gt;This is a simple webpage.&lt;/p&gt;
&lt;a href="/about"&gt;About Me&lt;/a&gt;
</code></pre>
<p>HTML isn't responsible for making a website visually attractive. Its main job is to describe the content and structure.</p>
<p>Using semantic HTML is also important for accessibility and SEO.</p>
<h2>2. CSS: Making Websites Look Good</h2>
<p>CSS, or Cascading Style Sheets, controls the appearance of a website.</p>
<p>With CSS, developers can control:</p>
<ul>
<li><p>Colors</p>
</li>
<li><p>Typography</p>
</li>
<li><p>Spacing</p>
</li>
<li><p>Layout</p>
</li>
<li><p>Animations</p>
</li>
<li><p>Responsive design</p>
</li>
<li><p>Dark and light themes</p>
</li>
</ul>
<p>Modern CSS includes powerful features such as Flexbox, Grid, custom properties, media queries, and container queries.</p>
<p>For example:</p>
<pre><code class="language-css">.card {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-radius: 12px;
}
</code></pre>
<p>CSS allows the same website to adapt to phones, tablets, laptops, and large displays.</p>
<h2>3. JavaScript: Adding Interaction</h2>
<p>HTML creates the structure and CSS controls the appearance. JavaScript adds behavior.</p>
<p>JavaScript can be used to create:</p>
<ul>
<li><p>Interactive menus</p>
</li>
<li><p>Form validation</p>
</li>
<li><p>Dynamic content</p>
</li>
<li><p>Search functionality</p>
</li>
<li><p>Animations</p>
</li>
<li><p>Real-time applications</p>
</li>
<li><p>API integrations</p>
</li>
</ul>
<p>A simple example:</p>
<pre><code class="language-javascript">const button = document.querySelector("button");

button.addEventListener("click", () =&gt; {
    alert("Hello!");
});
</code></pre>
<p>JavaScript has also evolved far beyond browser scripting. With technologies such as Node.js, it can be used to build backend applications as well.</p>
<h2>4. Frontend Frameworks</h2>
<p>As applications become more complex, writing everything with plain JavaScript can become difficult to maintain.</p>
<p>That's where frameworks and libraries come in.</p>
<p>Popular technologies include:</p>
<ul>
<li><p>React</p>
</li>
<li><p>Vue</p>
</li>
<li><p>Angular</p>
</li>
<li><p>Svelte</p>
</li>
<li><p>Next.js</p>
</li>
</ul>
<p>These tools help developers organize large applications into reusable components.</p>
<p>For example, instead of repeatedly creating the same button, card, or navigation structure, developers can create reusable components.</p>
<p>This makes development more organized and scalable.</p>
<h2>5. Backend Technologies</h2>
<p>The frontend is only one part of a modern website.</p>
<p>Many websites need a backend to handle things such as:</p>
<ul>
<li><p>User authentication</p>
</li>
<li><p>Database operations</p>
</li>
<li><p>Payments</p>
</li>
<li><p>File uploads</p>
</li>
<li><p>APIs</p>
</li>
<li><p>Business logic</p>
</li>
<li><p>Admin dashboards</p>
</li>
</ul>
<p>Popular backend technologies include:</p>
<ul>
<li><p>Node.js</p>
</li>
<li><p>Python</p>
</li>
<li><p>Java</p>
</li>
<li><p>PHP</p>
</li>
<li><p>Go</p>
</li>
<li><p>C#</p>
</li>
</ul>
<p>For example, Node.js allows developers to build server-side applications using JavaScript.</p>
<p>An Express.js application might expose an API like:</p>
<pre><code class="language-javascript">app.get("/api/users", (req, res) =&gt; {
    res.json({
        message: "Users endpoint"
    });
});
</code></pre>
<p>The frontend can then communicate with this API.</p>
<h2>6. Databases</h2>
<p>Web applications often need to store information.</p>
<p>This could include:</p>
<ul>
<li><p>User accounts</p>
</li>
<li><p>Products</p>
</li>
<li><p>Orders</p>
</li>
<li><p>Blog posts</p>
</li>
<li><p>Messages</p>
</li>
<li><p>Analytics data</p>
</li>
</ul>
<p>Databases generally fall into two major categories: relational and non-relational.</p>
<h3>Relational databases</h3>
<p>Examples include:</p>
<ul>
<li><p>PostgreSQL</p>
</li>
<li><p>MySQL</p>
</li>
<li><p>MariaDB</p>
</li>
</ul>
<p>They organize information into tables and relationships.</p>
<h3>NoSQL databases</h3>
<p>Examples include:</p>
<ul>
<li><p>MongoDB</p>
</li>
<li><p>Redis</p>
</li>
<li><p>DynamoDB</p>
</li>
</ul>
<p>They use different data models and can be useful for applications with particular scalability or data-structure requirements.</p>
<p>Choosing a database depends on the application's requirements rather than simply choosing the most popular option.</p>
<h2>7. APIs</h2>
<p>APIs allow different parts of a system to communicate.</p>
<p>For example:</p>
<pre><code class="language-text">Frontend
   ↓
API
   ↓
Backend
   ↓
Database
</code></pre>
<p>A website might request:</p>
<pre><code class="language-http">GET /api/products
</code></pre>
<p>The server processes the request and returns data, often in JSON format:</p>
<pre><code class="language-json">{
    "name": "Laptop",
    "price": 75000
}
</code></pre>
<p>APIs are fundamental to modern web applications because they allow different services and applications to communicate with each other.</p>
<h2>8. Git and Version Control</h2>
<p>Writing code is only part of development. Managing changes is equally important.</p>
<p>Git allows developers to track changes in their projects.</p>
<p>Common commands include:</p>
<pre><code class="language-bash">git init
git add .
git commit -m "Initial commit"
git push
</code></pre>
<p>Platforms such as GitHub and GitLab make it easier to collaborate, review code, manage issues, and deploy projects.</p>
<p>Version control becomes especially important when multiple developers are working on the same project.</p>
<h2>9. Web Hosting and Deployment</h2>
<p>Once a website is built, it needs to be accessible on the internet.</p>
<p>Depending on the project, developers can use platforms such as:</p>
<ul>
<li><p>Vercel</p>
</li>
<li><p>Netlify</p>
</li>
<li><p>Cloudflare</p>
</li>
<li><p>Render</p>
</li>
<li><p>Traditional web hosting</p>
</li>
</ul>
<p>The deployment process can involve:</p>
<pre><code class="language-text">Code
 ↓
Git Repository
 ↓
Build
 ↓
Deployment
 ↓
Production Website
</code></pre>
<p>Modern deployment platforms can also automate this process whenever new code is pushed to a repository.</p>
<h2>10. Performance Matters</h2>
<p>A website can look great and still provide a poor experience if it loads slowly.</p>
<p>Performance optimization can involve:</p>
<ul>
<li><p>Compressing images</p>
</li>
<li><p>Using modern image formats</p>
</li>
<li><p>Minimizing unnecessary JavaScript</p>
</li>
<li><p>Caching resources</p>
</li>
<li><p>Optimizing database queries</p>
</li>
<li><p>Using a CDN</p>
</li>
<li><p>Reducing unnecessary network requests</p>
</li>
</ul>
<p>Performance isn't just a technical concern. It directly affects how users experience a website.</p>
<h2>11. Security</h2>
<p>Security should be considered from the beginning of development.</p>
<p>Common practices include:</p>
<ul>
<li><p>Using HTTPS</p>
</li>
<li><p>Hashing passwords</p>
</li>
<li><p>Validating user input</p>
</li>
<li><p>Protecting authentication sessions</p>
</li>
<li><p>Preventing SQL injection</p>
</li>
<li><p>Using secure cookies</p>
</li>
<li><p>Managing secrets with environment variables</p>
</li>
<li><p>Keeping dependencies updated</p>
</li>
</ul>
<p>For example, database credentials should never be hard-coded into publicly accessible source code.</p>
<p>Instead, developers commonly use environment variables:</p>
<pre><code class="language-env">DATABASE_URL=your_database_connection
</code></pre>
<h2>12. SEO Is Still Important</h2>
<p>Building a website isn't enough if nobody can discover it.</p>
<p>Search engine optimization helps search engines understand your website and its content.</p>
<p>Important technical SEO elements include:</p>
<ul>
<li><p>Semantic HTML</p>
</li>
<li><p>Page titles</p>
</li>
<li><p>Meta descriptions</p>
</li>
<li><p>Canonical URLs</p>
</li>
<li><p>XML sitemaps</p>
</li>
<li><p>Robots.txt</p>
</li>
<li><p>Mobile responsiveness</p>
</li>
<li><p>Page performance</p>
</li>
<li><p>Structured data</p>
</li>
</ul>
<p>SEO should not be treated as something added after development. It can be considered during the architecture and content planning stages.</p>
<h2>Bringing Everything Together</h2>
<p>A modern web application can look something like this:</p>
<pre><code class="language-text">                 User
                  │
                  ▼
            Web Browser
                  │
                  ▼
         Frontend Application
                  │
                  ▼
                 API
                  │
                  ▼
          Backend Application
                  │
          ┌───────┴───────┐
          ▼               ▼
       Database        External APIs
</code></pre>
<p>Each layer has a different responsibility.</p>
<p>The frontend focuses on the user experience.</p>
<p>The backend handles application logic.</p>
<p>The database stores information.</p>
<p>APIs connect different systems.</p>
<p>Infrastructure makes the application available to users.</p>
<p>SEO and performance help people discover and use the website effectively.</p>
<h2>Final Thoughts</h2>
<p>Modern web development isn't about mastering one technology.</p>
<p>It's about understanding how different technologies work together.</p>
<p>You don't need to learn everything at once. A strong learning path can start with:</p>
<p><strong>HTML → CSS → JavaScript → Git → Backend → Database → APIs → Deployment → Performance → SEO</strong></p>
<p>Once you understand these fundamentals, frameworks and advanced technologies become much easier to learn.</p>
<p>The tools will continue to change, but the underlying concepts of the web remain incredibly valuable.  </p>
<p>If you're interested in web development, SEO, and digital marketing, you can also explore more of my work on my <a href="https://ajnasahammed.com/best-web-developer-in-malappuram/"><strong>website</strong></a>.</p>
]]></content:encoded></item><item><title><![CDATA[Building a Secure REST API with Node.js and Express]]></title><description><![CDATA[Modern web applications often depend on APIs to communicate between the frontend, backend, and databases. Whether you're building a dashboard, mobile application, or SaaS product, understanding how RE]]></description><link>https://codewithajnas.hashnode.dev/building-a-secure-rest-api-with-node-js-and-express</link><guid isPermaLink="true">https://codewithajnas.hashnode.dev/building-a-secure-rest-api-with-node-js-and-express</guid><category><![CDATA[Node.js]]></category><category><![CDATA[Express]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[Ajnas Ahammed]]></dc:creator><pubDate>Thu, 17 Sep 2026 05:54:16 GMT</pubDate><content:encoded><![CDATA[<p>Modern web applications often depend on APIs to communicate between the frontend, backend, and databases. Whether you're building a dashboard, mobile application, or SaaS product, understanding how REST APIs work is an important backend skill.</p>
<p>In this article, we'll build a simple REST API using Node.js and Express.js, while following a structure that can later be extended with authentication and a database.</p>
<p>What We're Building</p>
<p>Our API will have endpoints for managing users:</p>
<pre><code class="language-plaintext">GET     /api/users
GET     /api/users/:id
POST    /api/users
PUT     /api/users/:id
DELETE  /api/users/:id
</code></pre>
<p>The basic architecture looks like this:</p>
<pre><code class="language-plaintext">Client
  │
  ▼
Express Server
  │
  ├── Routes
  │
  ├── Controllers
  │
  ├── Middleware
  │
  ▼
Database
</code></pre>
<ol>
<li>Create the Project</li>
</ol>
<p>Start by creating a new Node.js project:</p>
<p><code>mkdir node-rest-api cd node-rest-api npm init -y</code></p>
<p>Install Express:</p>
<p><code>npm install express</code></p>
<p>For development, you can also install Nodemon:</p>
<p><code>npm install --save-dev nodemon 2. Create the Server</code></p>
<p>Create an app.js file:</p>
<pre><code class="language-javascript">const express = require("express");

const app = express(); const PORT = 3000;

app.use(express.json());

app.get("/", (req, res) =&gt; { res.json({ message: "API is running 🚀" }); });

app.listen(PORT, () =&gt; { console.log(Server running on port ${PORT}); });
</code></pre>
<p>Run it:</p>
<p><code>node app.js</code></p>
<p><code>Visit:</code></p>
<p><code>http://localhost:3000</code></p>
<p>You should get:</p>
<p>{ "message": "API is running 🚀" } 3. Create Some Data</p>
<p>For now, we'll use an array instead of a database.</p>
<p><code>let users = [ { id: 1, name: "Ajnas", email: "ajnas@example.com" }, { id: 2, name: "John", email: "john@example.com" } ]; 4. GET All Users</code></p>
<p>We can create an endpoint that returns all users:</p>
<p><code>app.get("/api/users", (req, res) =&gt; { res.json(users); });</code></p>
<p>Request:</p>
<p><strong><mark class="bg-yellow-200 dark:bg-yellow-500/30">GET /api/users</mark></strong></p>
<p>Response:</p>
<p><code>[ { "id": 1, "name": "Ajnas", "email": "ajnas@example.com" }, { "id": 2, "name": "John", "email": "john@example.com" } ] 5. GET a Single User</code></p>
<p>Route parameters allow us to retrieve a specific user.</p>
<pre><code class="language-javascript">app.get("/api/users/:id", (req, res) =&gt; { const id = Number(req.params.id);

const user = users.find(user =&gt; user.id === id);

if (!user) {
    return res.status(404).json({
        message: "User not found"
    });
}

res.json(user);
});
</code></pre>
<p>Now:</p>
<p>GET /api/users/1</p>
<p>returns:</p>
<p><code>{ "id": 1, "name": "Ajnas", "email": "ajnas@example.com" }</code></p>
<p>6. Creating a User</p>
<p>For creating resources, we use POST.</p>
<pre><code class="language-javascript">app.post("/api/users", (req, res) =&gt; { const { name, email } = req.body;

if (!name || !email) {
    return res.status(400).json({
        message: "Name and email are required"
    });
}

const newUser = {
    id: users.length + 1,
    name,
    email
};

users.push(newUser);

res.status(201).json(newUser);
</code></pre>
<p>});</p>
<p>The request body:</p>
<p>{ "name": "Charlie", "email": "<a href="mailto:charlie@example.com">charlie@example.com</a>" }</p>
<p>The API responds with:</p>
<p><code>{ "id": 3, "name": "Charlie", "email": "charlie@example.com" }</code></p>
<p>7. Updating a User</p>
<p>We can use PUT to update an existing resource:</p>
<pre><code class="language-javascript">app.put("/api/users/:id", (req, res) =&gt; { const id = Number(req.params.id);

const user = users.find(user =&gt; user.id === id);

if (!user) {
    return res.status(404).json({
        message: "User not found"
    });
}

user.name = req.body.name ?? user.name;
user.email = req.body.email ?? user.email;

res.json(user);
</code></pre>
<p>});</p>
<p>This lets us update only the fields we provide.</p>
<ol>
<li>Deleting a User</li>
</ol>
<p>Finally, we can implement DELETE:</p>
<pre><code class="language-javascript">app.delete("/api/users/:id", (req, res) =&gt; { const id = Number(req.params.id);

const exists = users.some(user =&gt; user.id === id);

if (!exists) {
    return res.status(404).json({
        message: "User not found"
    });
}

users = users.filter(user =&gt; user.id !== id);

res.json({
    message: "User deleted successfully"
});
</code></pre>
<p>}); A Better Project Structure</p>
<p>Once an application grows, keeping everything inside app.js becomes difficult.</p>
<p>A more maintainable structure could look like:</p>
<pre><code class="language-plaintext">node-rest-api/
│
├── controllers/
│   └── userController.js
│
├── routes/
│   └── userRoutes.js
│
├── middleware/
│   └── errorHandler.js
│
├── models/
│   └── userModel.js
│
├── app.js
├── package.json
└── .env
</code></pre>
<p>This separation makes the application easier to maintain and extend.</p>
<p>What's Next?</p>
<p>The array we're using isn't suitable for a real production application.</p>
<p>The next step would be connecting the API to a database such as PostgreSQL or MongoDB.</p>
<p>From there, we could add:</p>
<pre><code class="language-plaintext">Database
   ↓
Authentication
   ↓
Authorization
   ↓
Input Validation
   ↓
Error Handling
   ↓
Rate Limiting
   ↓
Logging
   ↓
Production Deployment
</code></pre>
<p>That's where a simple REST API starts becoming a real backend application.</p>
<p>Final Thoughts</p>
<p>Building a REST API is one of those projects that looks simple at first but teaches a lot about backend development.</p>
<p>You learn how HTTP methods work, how requests and responses are structured, how routing works, how to handle errors, and eventually how different parts of a backend application communicate.</p>
<p>I'm still exploring backend development myself, and projects like this are helping me understand what happens behind the interface of the applications we use every day.</p>
<p>More of my projects and experiments:</p>
<p><a href="https://ajnasahammed.com/best-web-developer-in-malappuram/">ajnasahammed.com</a></p>
]]></content:encoded></item></channel></rss>