<?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: DebmalyaDas-007</title>
    <description>The latest articles on DEV Community by DebmalyaDas-007 (@debmalyadas007).</description>
    <link>https://dev.to/debmalyadas007</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2899467%2Fcfcf33df-b213-41c0-adf9-da9b20048a24.png</url>
      <title>DEV Community: DebmalyaDas-007</title>
      <link>https://dev.to/debmalyadas007</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/debmalyadas007"/>
    <language>en</language>
    <item>
      <title>Guardium- Password Protector (Day-2)</title>
      <dc:creator>DebmalyaDas-007</dc:creator>
      <pubDate>Fri, 19 Dec 2025 16:41:38 +0000</pubDate>
      <link>https://dev.to/debmalyadas007/guardium-password-protector-day-2-46k4</link>
      <guid>https://dev.to/debmalyadas007/guardium-password-protector-day-2-46k4</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Manifest.json (chrome extension)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;&lt;code&gt;manifest.json&lt;/code&gt;&lt;/strong&gt; file is the &lt;strong&gt;backbone of a Chrome extension&lt;/strong&gt;, acting as the primary metadata and configuration file that Chrome reads before loading or running the extension. It defines the extension’s &lt;strong&gt;identity&lt;/strong&gt;—including its name, version, description, author, and icons—and clearly specifies &lt;strong&gt;how the extension behaves inside the browser&lt;/strong&gt;. Through the manifest, developers declare &lt;strong&gt;permissions&lt;/strong&gt; that control what browser APIs and websites the extension can access, ensuring security and user transparency. It also links all major components of the extension such as &lt;strong&gt;background service workers, content scripts, popups, options pages, and web-accessible resources&lt;/strong&gt;, allowing Chrome to know when and where each part should execute. In &lt;strong&gt;Manifest Version 3 (MV3)&lt;/strong&gt;, &lt;code&gt;manifest.json&lt;/code&gt; plays an even more critical role by enforcing modern security practices like &lt;strong&gt;non-persistent background execution, stricter permission handling, and improved performance&lt;/strong&gt;, making it essential for building safe, efficient, and maintainable Chrome extensions.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Manifest.json (chrome extension)&lt;/strong&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "manifest_version": 3,
  "name": "Guardium",
  "short_name": "Guardium",
  "description": "A secure browser-based password manager with autofill support",
  "version": "1.0.0",

  "action": {
    "default_title": "Open Guardium",
    "default_popup": "index.html"
  },

  "icons": {
    "16": "assets/icons/icon16.png",
    "32": "assets/icons/icon32.png",
    "48": "assets/icons/icon48.png",
    "128": "assets/icons/icon128.png"
  },

  "background": {
    "service_worker": "background.js",
    "type": "module"
  },

  "content_scripts": [
    {
      "matches": ["&amp;lt;all_urls&amp;gt;"],
      "js": ["contentScript.js"],
      "run_at": "document_end",
      "all_frames": true
    }
  ],

  "permissions": [
    "activeTab",
    "tabs",
    "storage",
    "scripting",
    "alarms",
    "notifications"
  ],

  "host_permissions": [
    "&amp;lt;all_urls&amp;gt;"
  ],

  "web_accessible_resources": [
    {
      "resources": [
        "assets/icons/*",
        "injected/*.js"
      ],
      "matches": ["&amp;lt;all_urls&amp;gt;"]
    }
  ],

  "options_page": "options.html",

  "commands": {
    "open-guardium": {
      "suggested_key": {
        "default": "Ctrl+Shift+G",
        "mac": "Command+Shift+G"
      },
      "description": "Open Guardium popup"
    }
  },

  "minimum_chrome_version": "114"
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Explanation of every line(manifest.json):-&lt;/strong&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; "manifest_version": 3,
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 &lt;strong&gt;Manifest Version&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Specifies Manifest V3, the latest Chrome extension standard.&lt;/p&gt;

&lt;p&gt;Enforces:&lt;/p&gt;

&lt;p&gt;Better security&lt;/p&gt;

&lt;p&gt;Service workers instead of background pages&lt;/p&gt;

&lt;p&gt;Stricter permission control&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  "name": "Guardium",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 &lt;strong&gt;Extension Name&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The full name displayed:&lt;/p&gt;

&lt;p&gt;In Chrome Extensions page&lt;/p&gt;

&lt;p&gt;In Chrome Web Store&lt;/p&gt;

&lt;p&gt;Under the toolbar icon&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"short_name": "Guardium",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 &lt;strong&gt;Short Name&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Used where space is limited (e.g., toolbar labels).&lt;/p&gt;

&lt;p&gt;Optional but recommended for UI consistency.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  "description": "A secure browser-based password manager with autofill support",

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 &lt;strong&gt;Description&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Brief summary of the extension’s purpose.&lt;/p&gt;

&lt;p&gt;Visible in the Chrome Web Store and Extensions page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
  "version": "1.0.0",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Version Number&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Used by Chrome to manage updates.&lt;/p&gt;

&lt;p&gt;Must follow semantic versioning format (major.minor.patch).&lt;br&gt;
 &lt;strong&gt;Toolbar Action (Popup UI)&lt;/strong&gt;&lt;br&gt;
  "action": {&lt;/p&gt;

&lt;p&gt;🔹 Defines behavior of the extension icon in the toolbar.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"default_title": "Open Guardium",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Tooltip text shown when the user hovers over the extension icon.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
    "default_popup": "index.html"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 HTML file opened when the extension icon is clicked.&lt;br&gt;
👉 This is your password manager UI (often a React build output).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🎨 Icons&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;"icons": {

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Declares extension icons in different sizes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  "16": "assets/icons/icon16.png",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Used in:&lt;/p&gt;

&lt;p&gt;Toolbar&lt;/p&gt;

&lt;p&gt;Context menus&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
    "32": "assets/icons/icon32.png",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Used on high-DPI displays and system UI.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"48": "assets/icons/icon48.png",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Used on the Chrome Extensions page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
    "128": "assets/icons/icon128.png"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Used in the Chrome Web Store listing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;⚙ Background Service Worker&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;"background": {

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Defines background logic of the extension.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
    "service_worker": "background.js",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 JavaScript file that:&lt;/p&gt;

&lt;p&gt;Handles events&lt;/p&gt;

&lt;p&gt;Listens for messages&lt;/p&gt;

&lt;p&gt;Manages alarms, auth, encryption, etc.&lt;/p&gt;

&lt;p&gt;⚠️ Runs only when needed (not persistent).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; "type": "module"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Enables ES modules:&lt;/p&gt;

&lt;p&gt;Allows import / export&lt;/p&gt;

&lt;p&gt;Cleaner and scalable architecture&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🌐 Content Scripts&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; "content_scripts": [
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Declares scripts injected into web pages.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
      "matches": ["&amp;lt;all_urls&amp;gt;"],
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Injects script on all websites.&lt;/p&gt;

&lt;p&gt;Required for password managers (login form detection).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  "js": ["contentScript.js"],
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 JavaScript file injected into matching pages.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; "run_at": "document_end",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Script runs after DOM is loaded.&lt;/p&gt;

&lt;p&gt;Ensures forms and inputs exist.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  "all_frames": true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Script runs inside:&lt;/p&gt;

&lt;p&gt;Main page&lt;/p&gt;

&lt;p&gt;All iframes (important for embedded login forms)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔐 Permissions&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; "permissions": [
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Declares Chrome APIs the extension can use.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  "activeTab",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Temporary access to the currently active tab.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   "tabs",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Allows reading tab metadata (URL, ID, title).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; "storage",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Enables chrome.storage for saving encrypted passwords.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; "scripting",

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Allows dynamic script injection (MV3 requirement).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; "alarms",

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Enables scheduled background tasks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  "notifications"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Allows user notifications (e.g., password saved).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🌍 Host Permissions&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;"host_permissions": [
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Specifies which websites the extension can access.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"&amp;lt;all_urls&amp;gt;"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;🔹 Allows interaction with all websites.&lt;/p&gt;

&lt;p&gt;Required for autofill extensions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📦 Web Accessible Resources&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;"web_accessible_resources": [
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Allows web pages or content scripts to access extension files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  "resources": [
        "assets/icons/*",
        "injected/*.js"
      ],

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Files that can be accessed externally.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    "matches": ["&amp;lt;all_urls&amp;gt;"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Websites allowed to access these resources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;⚙ Options Page&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;
  "options_page": "options.html",

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Settings page for the extension.&lt;/p&gt;

&lt;p&gt;Used for:&lt;/p&gt;

&lt;p&gt;Preferences&lt;/p&gt;

&lt;p&gt;Security settings&lt;/p&gt;

&lt;p&gt;Sync options&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;⌨ Keyboard Commands&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;"commands": {
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Defines keyboard shortcuts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; "open-guardium": {
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Unique command identifier.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"suggested_key": {

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Platform-specific shortcuts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; "default": "Ctrl+Shift+G",
        "mac": "Command+Shift+G"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Shortcut keys for Windows/Linux and macOS.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"description": "Open Guardium popup"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Description shown in Chrome shortcut settings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔎 Chrome Version Requirement&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; "minimum_chrome_version": "114"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Ensures compatibility with required MV3 APIs.&lt;/p&gt;

&lt;p&gt;✅ Final Summary&lt;/p&gt;

&lt;p&gt;This manifest.json:&lt;/p&gt;

&lt;p&gt;Fully complies with Manifest V3&lt;/p&gt;

&lt;p&gt;Supports password management + autofill&lt;/p&gt;

&lt;p&gt;Is Chrome Web Store ready&lt;/p&gt;

&lt;p&gt;Covers UI, background, content scripts, permissions, security&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Chrome Extension working&lt;/strong&gt;
&lt;/h2&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.amazonaws.com%2Fuploads%2Farticles%2Fsm34ww6idfppp90z2wc2.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.amazonaws.com%2Fuploads%2Farticles%2Fsm34ww6idfppp90z2wc2.png" alt=" " width="707" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;Chrome extension works by dividing responsibilities across multiple isolated components&lt;/strong&gt;, all coordinated through the &lt;code&gt;manifest.json&lt;/code&gt; file. When Chrome starts, it reads the manifest to understand the extension’s &lt;strong&gt;permissions, UI, background logic, and content scripts&lt;/strong&gt;. The &lt;strong&gt;popup UI&lt;/strong&gt; runs when the user clicks the extension icon and handles only user interaction and display. The &lt;strong&gt;background service worker&lt;/strong&gt; acts as the brain of the extension, responding to events, managing logic, storage, and secure operations, but it runs only when needed. &lt;strong&gt;Content scripts&lt;/strong&gt; are injected into web pages to interact with the page’s DOM, such as detecting forms or autofilling data, while remaining isolated from the page for security. These components &lt;strong&gt;communicate through message passing&lt;/strong&gt;, ensuring a secure, event-driven flow where the extension can interact with web pages without directly exposing sensitive logic or data.&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fuc180ffnw1n1bca4jrcb.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.amazonaws.com%2Fuploads%2Farticles%2Fuc180ffnw1n1bca4jrcb.png" alt=" " width="800" height="604"&gt;&lt;/a&gt;&lt;br&gt;
This diagram shows &lt;strong&gt;how different parts of a Chrome extension interact inside and outside the browser&lt;/strong&gt;. Inside Chrome, the extension is split into &lt;strong&gt;UI components&lt;/strong&gt; (toolbar popup, options page, notifications), &lt;strong&gt;content scripts&lt;/strong&gt;, and a &lt;strong&gt;background service worker&lt;/strong&gt;. The &lt;strong&gt;popup and options pages&lt;/strong&gt; handle user interaction using HTML, CSS, and JavaScript, but they cannot directly access web pages. &lt;strong&gt;Content scripts&lt;/strong&gt; run inside web pages and interact with the page’s DOM, while remaining isolated for security. The &lt;strong&gt;background service worker&lt;/strong&gt; acts as the central controller: it handles logic, storage, alarms, notifications, and communication. All these parts communicate using &lt;strong&gt;message passing (&lt;code&gt;runtime.message&lt;/code&gt;)&lt;/strong&gt;. The background can also access &lt;strong&gt;Chrome data and APIs&lt;/strong&gt; (storage, cookies, history, bookmarks) and can communicate with &lt;strong&gt;external APIs&lt;/strong&gt; outside Chrome. Overall, the diagram highlights the &lt;strong&gt;separation of concerns, security isolation, and message-based communication&lt;/strong&gt; that make Chrome extensions safe and efficient.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Chrome Developer guide&lt;/strong&gt;
&lt;/h2&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.amazonaws.com%2Fuploads%2Farticles%2F4pmq298zutk4a6ddwkm7.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.amazonaws.com%2Fuploads%2Farticles%2F4pmq298zutk4a6ddwkm7.png" alt=" " width="800" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This screen is the &lt;strong&gt;Chrome Extensions page in Developer Mode&lt;/strong&gt;. It allows developers to &lt;strong&gt;load unpacked extensions directly from a local folder&lt;/strong&gt;, &lt;strong&gt;package extensions for distribution&lt;/strong&gt;, and &lt;strong&gt;manually update or reload extensions&lt;/strong&gt; during development. The &lt;strong&gt;search bar&lt;/strong&gt; helps find installed extensions quickly, while the &lt;strong&gt;Developer mode toggle&lt;/strong&gt; enables debugging and testing features needed when building and experimenting with Chrome extensions.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Windows.Etherium&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;chrome.ethereum&lt;/code&gt; (commonly accessed as &lt;code&gt;window.ethereum&lt;/code&gt;)&lt;/strong&gt; is a &lt;strong&gt;JavaScript object injected into the browser by Ethereum wallet extensions like MetaMask&lt;/strong&gt;. It acts as a &lt;strong&gt;bridge between web applications (DApps) and the Ethereum blockchain&lt;/strong&gt;. Through this object, a website can request access to the user’s wallet, read the connected account, get the current network, and ask the user to &lt;strong&gt;sign messages or approve transactions&lt;/strong&gt;—all without exposing private keys. The actual signing and transaction handling are emphasized to be done &lt;strong&gt;securely inside the wallet extension&lt;/strong&gt;, while &lt;code&gt;window.ethereum&lt;/code&gt; only enables communication. In short, it allows &lt;strong&gt;Chrome-based DApps to safely interact with Ethereum via the user’s wallet&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>tutorial</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Guardium - Password Protector (Day -1)</title>
      <dc:creator>DebmalyaDas-007</dc:creator>
      <pubDate>Thu, 18 Dec 2025 19:39:38 +0000</pubDate>
      <link>https://dev.to/debmalyadas007/guardium-password-protector-day-1-1p4g</link>
      <guid>https://dev.to/debmalyadas007/guardium-password-protector-day-1-1p4g</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Blockchain&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Blockchain is a digital record book, also called a ledger, that is shared across many computers instead of being stored in one central place. Because everyone in the network holds a copy of the same data, no single authority like a bank or company controls it. Once information is written to the blockchain, it cannot be easily changed, which makes the system reliable and transparent. This shared ownership of data is what makes blockchain fundamentally different from traditional databases.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why is it Called a “Block-Chain”?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The name blockchain comes from the way data is structured. Information is stored inside blocks, and these blocks are linked together in a sequential order, forming a chain. Each block contains some data, a unique cryptographic hash that identifies the block, and the hash of the previous block. Because every block depends on the previous one, altering a single block would break the entire chain. This linking mechanism is what makes blockchain tamper-resistant.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Where is Blockchain Used?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Blockchain technology is widely used in cryptocurrencies like Bitcoin and Ethereum, but its applications go far beyond digital money. It is used in digital payments, smart contracts, supply chain tracking, voting systems, and digital identity solutions. Any system that requires trust, transparency, and data integrity can benefit from blockchain.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is a Smart Contract?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A smart contract is a computer program that lives on a blockchain and executes automatically when predefined conditions are met. Unlike traditional contracts that require intermediaries such as lawyers or banks, smart contracts enforce rules directly through code. Once deployed, the contract runs exactly as programmed and cannot be altered. In simple terms, if the conditions written in the code are satisfied, the contract executes itself without human intervention.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How Smart Contracts Work&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The process begins with writing the contract rules in code. This code is then deployed to a blockchain such as Ethereum. When someone interacts with the contract, for example by sending a transaction, the contract checks whether the required conditions are met. If they are, the contract automatically executes the specified actions. Because the contract runs on the blockchain, its execution is transparent, deterministic, and irreversible.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Where Smart Contracts Are Used&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Smart contracts are used in decentralized finance applications, NFT marketplaces, voting systems, insurance claim automation, and supply chain management. In this project, smart contracts are written using the Solidity programming language.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Introduction to Solidity&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Solidity is a statically typed programming language designed specifically for writing smart contracts on Ethereum. It has a syntax similar to JavaScript and C++, making it easier for developers from traditional programming backgrounds to learn.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Basic Solidity Structure&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Every Solidity contract starts with a license identifier and a compiler version declaration. The license provides legal clarity, while the version ensures the contract is compiled using a compatible Solidity compiler. The contract keyword is then used to define the smart contract, which is conceptually similar to a class in object-oriented programming.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;


contract ProfileRegistry {


   struct Profile {
       bytes32 nameHash;
       int32 luckyNumber;
   }


   mapping(address =&amp;gt; Profile) private profiles;


   event ProfileUpdated(
       address indexed user,
       bytes32 nameHash,
       int32 luckyNumber,
       uint256 timestamp
   );


   function updateProfile(
       bytes32 _nameHash,
       int32 _luckyNumber
   ) external {
       require(_nameHash != bytes32(0), "Invalid name hash");


       profiles[msg.sender] = Profile(
           _nameHash,
           _luckyNumber
       );


       emit ProfileUpdated(
           msg.sender,
           _nameHash,
           _luckyNumber,
           block.timestamp
       );
   }


   function getProfile(address user)
       external
       view
       returns (bytes32, int32)
   {
       Profile memory p = profiles[user];
       return (p.nameHash, p.luckyNumber);
   }


   function verifyName(
       address user,
       string calldata name
   ) external view returns (bool) {
       return profiles[user].nameHash == keccak256(abi.encodePacked(name));
   }


   function add(int256 a, int256 b)
       external
       pure
       returns (int256)
   {
       return a + b;
   }
}




&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;ProfileRegistry Smart Contract Walkthrough&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// SPDX-License-Identifier: MIT
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;SPDX License Identifier&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Declares the license of the contract&lt;br&gt;
Required by Solidity compilers to avoid warnings&lt;br&gt;
MIT means open-source and permissive&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Solidity Compiler Version
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pragma solidity ^0.8.20;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Tells the compiler:&lt;br&gt;
Use Solidity version 0.8.20 or higher&lt;br&gt;
But not 0.9.0 or above&lt;br&gt;
Solidity 0.8+ has:&lt;br&gt;
Built-in overflow checks&lt;br&gt;
Safer arithmetic&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Contract Declaration
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
contract ProfileRegistry {

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Starts a smart contract&lt;br&gt;
Think of it as a class in OOP&lt;br&gt;
Everything inside belongs to this contract&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Struct Definition
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;struct Profile {
    bytes32 nameHash;
    int32 luckyNumber;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;What is a struct?&lt;br&gt;
A custom data type&lt;br&gt;
Groups related data together&lt;br&gt;
Fields explained:&lt;br&gt;
bytes32 nameHash&lt;br&gt;
Fixed-size 32-byte value&lt;br&gt;
Stores keccak256(name)&lt;br&gt;
Privacy-friendly: actual name is not stored&lt;br&gt;
int32 luckyNumber&lt;br&gt;
Signed 32-bit integer&lt;br&gt;
Range: -2^31 to 2^31 - 1&lt;br&gt;
👉 One Profile = one user's data&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Mapping Declaration
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mapping(address =&amp;gt; Profile) private profiles;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Meaning:&lt;br&gt;
Maps a wallet address to a Profile struct&lt;br&gt;
Breakdown:&lt;br&gt;
address → user’s wallet address&lt;br&gt;
Profile → their stored profile&lt;br&gt;
private:&lt;br&gt;
Cannot be accessed directly outside the contract&lt;br&gt;
Still visible on blockchain, but not via Solidity getter&lt;br&gt;
Think of it like:&lt;br&gt;
profiles[0xABC...] = { nameHash, luckyNumber }&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Event Declaration
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
event ProfileUpdated(
    address indexed user,
    bytes32 nameHash,
    int32 luckyNumber,
    uint256 timestamp
);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;What is an event?&lt;br&gt;
Used for logging&lt;br&gt;
Stored in transaction logs, not contract storage&lt;br&gt;
Cheap to read from frontend&lt;br&gt;
Parameters:&lt;br&gt;
address indexed user&lt;br&gt;
indexed allows fast filtering (very important for UIs)&lt;br&gt;
bytes32 nameHash&lt;br&gt;
int32 luckyNumber&lt;br&gt;
uint256 timestamp&lt;br&gt;
Block timestamp when update occurred&lt;br&gt;
👉 Frontend apps listen to this event&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;updateProfile Function (State-changing)
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function updateProfile(
    bytes32 _nameHash,
    int32 _luckyNumber
) external {

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Function type:&lt;br&gt;
external&lt;br&gt;
Can be called from outside the contract&lt;br&gt;
Cheaper than public for calldata inputs&lt;br&gt;
Parameters:&lt;br&gt;
_nameHash → keccak256 hash of name&lt;br&gt;
_luckyNumber → user's chosen number&lt;/p&gt;

&lt;p&gt;7.1 Input Validation&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;require(_nameHash != bytes32(0), "Invalid name hash");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Prevents empty hash&lt;br&gt;
bytes32(0) = all zeros&lt;br&gt;
If condition fails:&lt;br&gt;
Transaction reverts&lt;br&gt;
Gas is refunded (except base cost)&lt;br&gt;
Error message shown&lt;/p&gt;

&lt;p&gt;7.2 Storing Profile Data&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;profiles[msg.sender] = Profile(
    _nameHash,
    _luckyNumber
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key concepts:&lt;br&gt;
msg.sender = wallet calling the function&lt;br&gt;
Creates a new Profile struct&lt;br&gt;
Stores it in the mapping&lt;br&gt;
Equivalent to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
profiles[msg.sender].nameHash = _nameHash;
profiles[msg.sender].luckyNumber = _luckyNumber;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;7.3 Emitting Event&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;emit ProfileUpdated(
    msg.sender,
    _nameHash,
    _luckyNumber,
    block.timestamp
);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Emits the event to blockchain logs&lt;br&gt;
block.timestamp&lt;br&gt;
Current block time (in seconds since Unix epoch)&lt;br&gt;
👉 Used by frontends / indexers (like The Graph)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;getProfile Function (Read-only)
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;emit ProfileUpdated(
    msg.sender,
    _nameHash,
    _luckyNumber,
    block.timestamp
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Modifiers:&lt;br&gt;
view&lt;br&gt;
Reads blockchain state&lt;br&gt;
Does not cost gas when called locally&lt;/p&gt;

&lt;p&gt;Function Body&lt;br&gt;
Profile memory p = profiles[user];&lt;br&gt;
Fetches the profile from storage&lt;br&gt;
Copies it into memory (temporary)&lt;br&gt;
return (p.nameHash, p.luckyNumber);&lt;br&gt;
Returns both values as a tuple&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;verifyName Function (Hash Verification)
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function verifyName(
    address user,
    string calldata name
) external view returns (bool) {

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Why calldata?&lt;br&gt;
Read-only input&lt;br&gt;
Cheaper gas&lt;br&gt;
Best for function parameters&lt;/p&gt;

&lt;p&gt;Hash Comparison&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return profiles[user].nameHash == keccak256(abi.encodePacked(name));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step-by-step:&lt;br&gt;
abi.encodePacked(name)&lt;br&gt;
Converts string into bytes&lt;br&gt;
keccak256(...)&lt;br&gt;
Produces a bytes32 hash&lt;br&gt;
Compare with stored hash&lt;br&gt;
✅ Returns true if names match&lt;br&gt;
❌ false otherwise&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;add Function (Pure Function)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Modifiers:&lt;br&gt;
pure&lt;br&gt;
Uses no blockchain data&lt;br&gt;
No state access&lt;br&gt;
No gas when called locally&lt;/p&gt;

&lt;p&gt;Logic&lt;br&gt;
return a + b;&lt;/p&gt;

&lt;p&gt;Simple integer addition&lt;br&gt;
Solidity 0.8+ automatically checks overflow&lt;/p&gt;

&lt;p&gt;🔑 Summary of Concepts Used&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Concept
Where
Struct
Profile
Mapping
address =&amp;gt; Profile
Event
ProfileUpdated
State change
updateProfile
Read-only
getProfile, verifyName
Hashing
keccak256
Privacy
Store hash instead of name
Pure function
add()

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Solidity Function Types Explained&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In Solidity, functions can be categorized based on how they interact with blockchain data. Pure functions do not read or modify any blockchain state and behave like calculators. View functions can read blockchain data but cannot modify it, making them ideal for data retrieval. Normal functions can modify the blockchain state, emit events, and write to storage, which means they always cost gas when executed in a transaction.&lt;br&gt;
A simple way to remember this is: pure functions calculate, view functions read, and normal functions write.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;What is Ganache?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Ganache is a local Ethereum blockchain simulator used for development and testing. It allows developers to deploy contracts, send transactions, test gas usage, and debug applications without spending real Ether. Ganache provides instant block mining, free test Ether, and complete control over the blockchain environment, making it ideal for learning and experimentation.&lt;br&gt;
Ganache Installation:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g ganache
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check Version:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ganache --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ganache
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Default:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;RPC: http://127.0.0.1:8545
Chain ID: 1337
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;What is Truffle?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Truffle is a development framework that simplifies the process of building Ethereum smart contracts. It provides a structured project setup, Solidity compilation, deployment scripts called migrations, testing utilities, and network management. Truffle removes the need to manually handle low-level details like ABI generation and contract deployment.&lt;br&gt;
Installation:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g truffle
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check version:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;truffle --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Initiate Truffle:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;truffle init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This generates your first project Directory.&lt;br&gt;
Deploy Contract:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;truffle migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify Deployment:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;truffle console
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Truffle config.js:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports = {
  networks: {
    development: {
      host: "127.0.0.1",
      port: 7545, // or 8545
      network_id: "*"
    }
  },
  compilers: {
    solc: {
      version: "0.8.20"
    }
  }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Truffle Nomenclature for migration/ folder:-&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F6q0u855zmp6jcut6g2z3.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.amazonaws.com%2Fuploads%2Farticles%2F6q0u855zmp6jcut6g2z3.png" alt=" " width="800" height="282"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is MetaMask?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;MetaMask is a browser-based crypto wallet that acts as a bridge between users and decentralized applications. It allows users to manage private keys, store Ether and tokens, and sign blockchain transactions securely. MetaMask injects a Web3 provider into the browser, enabling frontend applications to communicate directly with the blockchain and identify users.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Prerequisites:-&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;JavaScript Basics&lt;br&gt;
 &lt;a href="https://www.w3schools.com/js/" rel="noopener noreferrer"&gt;https://www.w3schools.com/js/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Chrome Extension Development (Intro)&lt;br&gt;
 &lt;a href="https://developer.chrome.com/docs/extensions/" rel="noopener noreferrer"&gt;https://developer.chrome.com/docs/extensions/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Basic Cryptography Concepts&lt;br&gt;
 &lt;a href="https://www.cloudflare.com/learning/ssl/what-is-encryption/" rel="noopener noreferrer"&gt;https://www.cloudflare.com/learning/ssl/what-is-encryption/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Blockchain Basics&lt;br&gt;
 &lt;a href="https://ethereum.org/en/developers/docs/intro-to-ethereum/" rel="noopener noreferrer"&gt;https://ethereum.org/en/developers/docs/intro-to-ethereum/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub Repo:-&lt;br&gt;
&lt;a href="https://github.com/yuvraj1235/TDOC_Guardium_tutorial" rel="noopener noreferrer"&gt;https://github.com/yuvraj1235/TDOC_Guardium_tutorial&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>blockchain</category>
      <category>web3</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
