<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Debjit Biswas on Medium]]></title>
        <description><![CDATA[Stories by Debjit Biswas on Medium]]></description>
        <link>https://medium.com/@debjit012?source=rss-58ff32ac1768------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*IZEL3WD8rfqt0Sq7aLBb4g.png</url>
            <title>Stories by Debjit Biswas on Medium</title>
            <link>https://medium.com/@debjit012?source=rss-58ff32ac1768------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 15:37:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@debjit012/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Make your own reusable Next.js / React basic seo component for your article.]]></title>
            <link>https://debjit012.medium.com/make-your-own-reusable-next-js-react-basic-seo-component-for-your-article-2c10d51d8fe6?source=rss-58ff32ac1768------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c10d51d8fe6</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[hosting]]></category>
            <category><![CDATA[seo]]></category>
            <dc:creator><![CDATA[Debjit Biswas]]></dc:creator>
            <pubDate>Mon, 26 Dec 2022 10:20:44 GMT</pubDate>
            <atom:updated>2022-12-26T10:20:44.456Z</atom:updated>
            <content:encoded><![CDATA[<p>The creation of a reusable Next.js component for SEO, specifically for blog posts and articles, is covered in this tutorial. It explains how to set up a Next.js project, develop the component, and provides advice for boosting SEO in Next.js projects.</p><p><strong>I suggest you look at this easy SEO implementation for straightforward, search engine-friendly headers </strong><a href="https://debjit012.medium.com/add-seo-friendly-headers-to-your-nextjs-project-835c1fecbd2"><strong>here</strong></a><strong>.</strong></p><p>When developing a Next.js website or application, it is essential to optimise your pages for search engines (SEO). Your pages could rank better in search results with proper SEO, which could bring in more visitors and possibly more business. One way to make managing SEO easier is by creating reusable components that can be used on multiple pages.</p><p>In this tutorial, we’ll go through how to build a reusable Next.js component for SEO that’s tailored to blog posts and articles. We will go over how to build a Next.js project, how to construct a component, and how to optimise SEO in Next.js projects. Let’s get going!</p><p>I<strong>nstall Next.js</strong></p><p>Open a terminal and go to the directory where you want to build the project in order to start a new Next.js project. Run the command after that:</p><pre>npx create-next-app@latest<br># or<br>yarn create next-app<br># or<br>pnpm create next-app</pre><p>This will build a new Next.js project with the most recent version of Next.js. Give your project a name and make any other necessary selections by following the prompts.</p><p>Now we will set the default language for the project. We will use the “<em>pages/_document.js” </em>file to add our &lt;Html lang=&quot;en&quot;&gt; on every page. This will add the lang attribute with the value of &quot;en&quot; to the html element on the page’s HTML. If needed, you can choose another language code. You can read more <a href="https://nextjs.org/docs/advanced-features/custom-document">here</a>.</p><pre>import { Html, Head, Main, NextScript } from &#39;next/document&#39;<br><br>export default function Document() {<br>  return (<br>    &lt;Html lang=&quot;en&quot;&gt;<br>      &lt;Head /&gt;<br>      &lt;body&gt;<br>        &lt;Main /&gt;<br>        &lt;NextScript /&gt;<br>      &lt;/body&gt;<br>    &lt;/Html&gt;<br>  )<br>}</pre><h3>Let’s create the reusable component</h3><p>Now that we have our Next.js project set up, we can create our reusable component. Make a new file called Seo.js in the components directory of your project’s directory. components/Seo.js will be the complete path.</p><p>In the Seo.js file, we need to import the Head component from next/head:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OHr1naDN9gzyUxUDM9KFug.png" /></figure><p>The Head component is built-in to Next.js and is used to add metadata to the page. We will use it to add various SEO tags to our pages. Let’s create a function that returns the metatags property and content.</p><p>The Seo Components function accepts an object as input, which consists of properties and corresponding content. It returns all the meta tags that are placed within the head tag, using the properties and content from the input object to populate the meta tags.</p><pre>import Head from &#39;next/head&#39;<br>import React from &#39;react&#39;<br><br>export default function Seo({fields}) {<br>  return (<br>    &lt;Head&gt;<br>      {Object.entries(fields).map(([property, value]) =&gt; {        <br>        return &lt;meta key={property} property={property} name={property} content={value} /&gt;;<br>      })}<br>    &lt;/Head&gt;<br>  )<br>}</pre><p>In this code, we are using the Object.entries() function to convert the fields of the object into an array. We are then iterating through the array, destructure each element into its property and value, and creating a meta tag using this. The resulting meta tags are returned as the output. Please know key is very important, it prevent any duplicate meta entry for same key.</p><figure><img alt="code for Seo.js component" src="https://cdn-images-1.medium.com/max/1024/1*R3pLR0Y_U2WYegF6yLgTfA.png" /></figure><p>To use the Seo function on our home page, we need to import it and provide the object it requires into our index.js file. We will create a constant called “seoFields” that contains some demo tags for testing purposes.</p><p>Now, our index page should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*bR_J839vcWxgSZwVRjUMRg.png" /></figure><p>Now we need to save and run to check if it is working. Our work is not done yet. Run the following into your command prompt and go to the url.</p><pre>yarn dev</pre><p>As a result of integrating the Seo function and seoFields object into our home page, all meta tags are populated with the data from seoFields. Our site is now SEO aware. However, we may need to add additional meta tags with the same property but different values, such as tags, authors, and canonical links, to further optimize our site for search engines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*piAWPDeFdBKnVN1p617Jjw.png" /></figure><p>In order to improve the search engine&#39;s understanding of our site, we can add canonical links to our meta tags. These links point to the main platform where an article is posted, and can help search engines understand if a piece of content has been duplicated across multiple platforms. This can be especially useful if you post your blogs on multiple platforms.</p><p>We simply check whether the property is canonical and return this link if it is. Really easy. Now our Seo.js looks like this.</p><pre>import Head from &#39;next/head&#39;<br>import React from &#39;react&#39;<br><br>export default function Seo({fields}) {<br>  return (<br>    &lt;Head&gt;<br>      {Object.entries(fields).map(([property, value]) =&gt; {        <br>        if(property === &quot;canonical&quot;){return &lt;link key=&quot;canonical&quot; rel=&quot;canonical&quot; href={value} /&gt;}<br>        return &lt;meta key={property} property={property} name={property} content={value} /&gt;;<br>      })}<br>    &lt;/Head&gt;<br>  )<br>}</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*yDkHj1J_He07plgGE-NwaA.png" /></figure><p>Some tags and auther, have the same property but different content or values. This functionality must be added as well.</p><pre>import Head from &#39;next/head&#39;<br>import React from &#39;react&#39;<br><br>export default function Seo({fields}) {<br>  return (<br>    &lt;Head&gt;<br>      {Object.entries(fields).map(([property, value]) =&gt; {        <br>        if(property === &quot;canonical&quot;){return &lt;link key=&quot;canonical&quot; rel=&quot;canonical&quot; href={value} /&gt;}<br>        if (Array.isArray(value)) {<br>          return value.map((val, index) =&gt; (<br>            &lt;meta<br>              key={`${property}-${index}`}<br>              property={property}<br>              name={property}<br>              content={val}<br>            /&gt;<br>          ));<br>        }<br>        return &lt;meta key={property} property={property} name={property} content={value} /&gt;;<br>      })}<br>    &lt;/Head&gt;<br>  )<br>}</pre><p>In this code, we are checking if the value associated with a property is an array. If it is, we iterate through the array and create multiple meta tags with the same property and one value for each element in the array. This allows us to include multiple values for a single property in our meta tags. For input, we provide the content as an array. So here is what our input object looks like:</p><pre>const seoFields = {<br>  canonical:&quot;/example.com/demo&quot;,<br>  keywords: &quot;HTML, CSS, JavaScript&quot;,<br>  &quot;article:published_time&quot;: &quot;25 Dec 2022&quot;,<br>  &quot;article:modified_time&quot;: &quot;25 Dec 2022&quot;,<br>  &quot;og:image&quot;: &quot;./varcel.svg&quot;,<br>  &quot;og:title&quot;: &quot;Next.js Seo Components&quot;,<br>  &quot;og:description&quot;: &quot;Next.js Seo Components&quot;,<br>  &quot;og:image:width&quot;: &quot;850&quot;,<br>  &quot;og:image:height&quot;: &quot;650&quot;,<br>  &quot;twitter:creator&quot;: &quot;@handle&quot;,<br>  &quot;twitter:card&quot;: &quot;summary_large_image&quot;,<br>  &quot;twitter:site&quot;: &quot;summary_large_image&quot;,<br>  tags: [&quot;tag1&quot;, &quot;tag2&quot;, &quot;tag3&quot;],<br>  author: [&quot;Debjit Biswas&quot;, &quot;D Biswas&quot;],<br>};</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*WxFeydiVU_7iAg2QQ3ZSIA.png" /></figure><p>For an article, I use these SEO tags. Please configure to your needs and conduct additional research before deploying this on a production site.</p><pre>const post ={<br>//post contains all the details and coming from api server,<br>// replace with yoru own<br>}<br>const seoFields = {<br>  title: post.title,<br>  description: post.description,<br>  keywords: &quot;HTML, CSS, JavaScript&quot;,<br>  canonical: post.canonical,<br>  &quot;article:tag&quot;: post.tags,<br>  &quot;article:published_time&quot;: post.published_time,<br>  &quot;article:modified_time&quot;: post.modified_time,<br>  &quot;article:expiration_time&quot;: post.expiration_time,<br>  &quot;article:author&quot;: post.author,<br>  &quot;og:url&quot;: post.url,<br>  &quot;og:type&quot;: post.type,<br>  &quot;og:image&quot;: post.ogImage,<br>  &quot;og:title&quot;: post.title,<br>  &quot;og:description&quot;: post.description,<br>  &quot;og:image:width&quot;: &quot;850&quot;,<br>  &quot;og:image:height&quot;: &quot;650&quot;,<br>  &quot;twitter:creator&quot;: &quot;@handle&quot;,<br>  &quot;twitter:card&quot;: &quot;summary_large_image&quot;,<br>  &quot;twitter:site&quot;: &quot;summary_large_image&quot;,<br>};</pre><p>For more articles, please follow me. Thank you.</p><p>Here is the <a href="https://github.com/debjit/nextjs-seo-component-medium-blogpost">Github Repo Code</a>.</p><p><a href="https://codesandbox.io/p/sandbox/recursing-sanderson-1ywupp?selection=%5B%7B%22endColumn%22%3A26%2C%22endLineNumber%22%3A1%2C%22startColumn%22%3A26%2C%22startLineNumber%22%3A1%7D%5D">Here is a CodeSandBox Demo</a></p><p><a href="https://codesandbox.io/p/sandbox/recursing-sanderson-1ywupp?selection=%5B%7B%22endColumn%22%3A26%2C%22endLineNumber%22%3A1%2C%22startColumn%22%3A26%2C%22startLineNumber%22%3A1%7D%5D">nextjs-seo-component-medium-blogpost</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c10d51d8fe6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[URL Shortener in 2 min using CloudFlare’s worker and KV.]]></title>
            <link>https://debjit012.medium.com/url-shortener-in-2-min-using-cloudflares-worker-and-kv-327405633d6?source=rss-58ff32ac1768------2</link>
            <guid isPermaLink="false">https://medium.com/p/327405633d6</guid>
            <category><![CDATA[url-shorteners]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[cloudflare]]></category>
            <dc:creator><![CDATA[Debjit Biswas]]></dc:creator>
            <pubDate>Fri, 20 May 2022 15:36:06 GMT</pubDate>
            <atom:updated>2022-05-20T15:36:06.605Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TkqNMheJqEL0CmJ9Zqi8OA.png" /><figcaption>URL Image</figcaption></figure><p>Time Required: 2 Min.</p><p>Ability: Able to copy past or a Full Stack developer :)- .</p><p>So this is my 2nd attempt to use CloudFlare&#39;s worker and Key-Value pair database.</p><p><strong>Step 1</strong></p><p>Create a KV database and a CloudFlare worker. You do not need any domain name for this, you can use the CloudFlare worker subdomain.</p><p>Now attach KV to your worker. Follow these steps on how to attach KV to your worker.</p><p>Open Worker &gt; Settings &gt; Variables &gt; KV Namespace Bindings</p><p>Here you can give a custom name which will be available only from inside your worker and select your KV from the Dropdown List.</p><p><strong>Step 2</strong></p><p>In my case, I have named my KV “shortUrlList”. And how we are ready to use the code. So here is the code I am using inside worker to redirect.</p><pre>addEventListener(&quot;fetch&quot;, (event) =&gt; {</pre><pre>event.respondWith(handleRequest(event.request));</pre><pre>});</pre><pre>let fallBackUrl = &quot;https://debjit.in&quot;;</pre><pre>let url ;<br></pre><pre>async function handleRequest(request) {</pre><pre>let getUrlSegment = request.url.split(&#39;/&#39;);<br></pre><pre>let codeForUrl = (getUrlSegment[getUrlSegment.length - 1] ?? &#39;base&#39;);</pre><pre>if (codeForUrl.length !== 0 &amp; codeForUrl !== null &amp; codeForUrl !== undefined )<br>{<br>url = await shortUrlList.get(codeForUrl);<br>}</pre><pre>if( url === undefined|| url === null || url.length === 0  )<br>{<br>return Response.redirect(fallBackUrl, 301);<br>}</pre><pre>return Response.redirect(url, 301);<br>}</pre><p>Here is a brief explanation of the code and how this work.</p><p>we get URL from the request and process inside, “codeForUrl” variable.</p><p>We search inside our KV using the key “shortUrlList.get(‘key”) and it returns the value or null/false.</p><p>Now simply return the URL with 301 or you can change it to 302.</p><p>This is very simple but if you wanted to add more URL redirection you have to log in to your CloudFlare account and then</p><p>Worker &gt; KV &gt; View &gt;Add new Key Value Pair there.</p><p>Hope this works well for you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=327405633d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create a URL Shortener for personal use using CloudFlare worker in 5 min.]]></title>
            <link>https://debjit012.medium.com/create-a-url-shortener-for-personal-use-in-5-min-7ce3a29b5919?source=rss-58ff32ac1768------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ce3a29b5919</guid>
            <category><![CDATA[url]]></category>
            <category><![CDATA[cloudflare-workers]]></category>
            <category><![CDATA[cloudflare]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[url-shorteners]]></category>
            <dc:creator><![CDATA[Debjit Biswas]]></dc:creator>
            <pubDate>Sun, 15 May 2022 05:06:26 GMT</pubDate>
            <atom:updated>2022-05-17T16:18:06.112Z</atom:updated>
            <content:encoded><![CDATA[<p>I was forwarding a bit-ly to my colleague and this stupid idea hit me. We both are full -f*king stack developers and solve some really good problems. But why we are using 3rd party software for shortening the links?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*7B675KL5LA6-HG2xnvIfmw.png" /></figure><p>I started googling and found a somewhat usable script with no documentation and very bad usage of naming scheme, (like me 2 years ago).</p><p>I tested and updated some more to it and called it mine. :).</p><p>So, my domain DNS is hosted on Cloudflare, so I tried Cloudflare worker first and the js code works.</p><p>Here is the Idea, I will add a key-value pair with the key as a short name and the value is URL when the key is matched forward to the URL with 301. So simple.</p><p>Now it’s time to make changes. so here is the full code. The code is self explanatory.</p><pre>const shortLinks = [</pre><pre>{ key: &#39;github&#39;, value: &#39;https://github.com/debjit&#39; },</pre><pre>{ key: &#39;gh&#39;, value: &#39;https://github.com/debjit&#39; },</pre><pre>{ key: &#39;linkedin&#39;, value: &#39;https://www.linkedin.com/in/debjitwb/&#39; },</pre><pre>{ key: &#39;ld&#39;, value: &#39;https://www.linkedin.com/in/debjitwb/&#39; },</pre><pre>{ key: &#39;twitter&#39;, value: &#39;https://twitter.com/debjit012&#39; },</pre><pre>{ key: &#39;tw&#39;, value: &#39;https://twitter.com/debjit012&#39; },</pre><pre>]</pre><pre>// This is default fallback URL</pre><pre>const fallbackUrl = &quot;https://debjit.in&quot;;</pre><pre>addEventListener(&#39;fetch&#39;, event =&gt; {</pre><pre>event.respondWith(handleRequest(event.request));</pre><pre>})</pre><pre>/**</pre><pre>* Respond with a hello worker text</pre><pre>* @param {Request} request</pre><pre>*/</pre><pre>async function handleRequest(request) {</pre><pre>let getUrlSegment = request.url.split(&#39;/&#39;);</pre><pre>let res = matchReq(getUrlSegment[getUrlSegment.length - 1],shortLinks);</pre><pre>if (res === null) {</pre><pre>return Response.redirect(fallbackUrl, 301);</pre><pre>}</pre><pre>return Response.redirect(res, 301);</pre><pre>}</pre><pre>function matchReq(part,shortLinks) {</pre><pre>const result = shortLinks.find( ({ key }) =&gt; key === part );</pre><pre>if (result) {</pre><pre>return result.value;</pre><pre>}</pre><pre>return null;</pre><pre>}</pre><p>Now you can add many URLs as key-value pairs.</p><p>Now it is time to set up the Cloudflare worker to redirect when a link is found but go to the fallback URL when no error is found.</p><p>Cloudflare Dashboard &gt; Workers &gt; Overview &gt; Create a Service &gt; Give service a name &gt;Create Service &gt;Quick Edit &gt; Paste the code and save.</p><p>It is time to add a custom domain to the worker.</p><p>Worker name &gt; Custom Domains &gt; Add domain name.</p><p>That&#39;s it. My DNS is hosted in CloudFlare so it will update internally, you do not have to do anything. We have a static fast link shortener subdomain that is ready.</p><p>Now share the link, if there is no link it will go to fall back URL, no registration no 3rd party site consuming your data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ce3a29b5919" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy Laravel (w/ Laravel Mix) Web App in 5 Min on Heroku.]]></title>
            <link>https://debjit012.medium.com/deploy-laravel-w-laravel-mix-web-app-in-5-min-on-heroku-a1598cf70b6b?source=rss-58ff32ac1768------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1598cf70b6b</guid>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[heroku]]></category>
            <category><![CDATA[mysql]]></category>
            <dc:creator><![CDATA[Debjit Biswas]]></dc:creator>
            <pubDate>Mon, 18 Apr 2022 14:55:18 GMT</pubDate>
            <atom:updated>2022-04-18T14:55:18.030Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*io0Jn_wirOhYsRuYsjae8g.png" /></figure><p><strong>I am using this </strong><a href="https://github.com/debjit/LinkAce"><strong>LinkAce fork</strong></a><strong> in this tutorial. All other Laravel Default should run as-is. For more installation please follow my </strong><a href="https://debjit012.medium.com/how-did-i-host-my-blood-donation-diary-app-on-heroku-for-free-be03f8f4e1c9"><strong>Other Guide</strong></a></p><p>I was installing an open-source project on Heroku and found Laravel Mix is not working.</p><p>So I have time in hand and make it work. It is pretty simple and no prior knowledge is needed. Follow the steps.</p><p>I am using free hobby dyno and pgsql for the database.</p><h3><strong>Step 1</strong></h3><p>Update builder pack from Settings &gt; Builderpacks with these two</p><ol><li>heroku/nodejs</li><li>heroku/php</li></ol><p><strong>Note order is necessary for a successful build, drag your Nodejs to the top if PHP already exists.</strong></p><h3>Step 2</h3><p>Update package.json file. Add these lines inside your script section.</p><pre> “postinstall”: “npm run production”,</pre><p>Here is my whole script looks like</p><pre>&quot;scripts&quot;: {<br>&quot;postinstall&quot;: &quot;npm run production&quot;,<br>&quot;dev&quot;: &quot;npm run development&quot;,<br>&quot;development&quot;: &quot;mix&quot;,<br>&quot;watch&quot;: &quot;mix watch&quot;,<br>&quot;watch-poll&quot;: &quot;mix watch -- --watch-options-poll=1000&quot;,<br>&quot;hot&quot;: &quot;mix watch --hot&quot;,<br>&quot;prod&quot;: &quot;npm run production&quot;,<br>&quot;production&quot;: &quot;mix --production&quot;,<br>&quot;test&quot;: &quot;npm run production&quot;<br>}</pre><h3>Step 3</h3><p>Add Procfile to your app</p><pre>web: vendor/bin/heroku-php-apache2 public/</pre><p>Step 4. Update your “Config Vars” for deployments</p><pre>YARN_PRODUCTION : False</pre><p>Now deploy your app and your laravel mix will run, have fun.</p><p>The software I have tested is working with this method is:</p><p><a href="https://www.linkace.org/">LinkAce</a></p><p>For LinkAce you must run these two command from the Heroku terminal to start and use my repo it will bypass the installation file.</p><pre>php artisan migrate<br>php artisan registeruser</pre><p>Reference</p><p><a href="https://www.dwightwatson.com/posts/using-laravel-mix-on-heroku">Using Laravel Mix on Heroku</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1598cf70b6b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Add SEO Friendly headers to your NextJs project.]]></title>
            <link>https://debjit012.medium.com/add-seo-friendly-headers-to-your-nextjs-project-835c1fecbd2?source=rss-58ff32ac1768------2</link>
            <guid isPermaLink="false">https://medium.com/p/835c1fecbd2</guid>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[seo]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Debjit Biswas]]></dc:creator>
            <pubDate>Thu, 07 Apr 2022 16:39:33 GMT</pubDate>
            <atom:updated>2022-04-28T10:52:38.772Z</atom:updated>
            <content:encoded><![CDATA[<p>Adding SEO is pretty easy with the next js head tag. The key-value pair let you define default values and page-specific values.</p><p>Let&#39;s start with creating a new NextJS project</p><pre>npx create-next-app@latest</pre><p>Now we needed to add the language of our website inside the next.config.js file. This will add &lt;html lang=”en”&gt; lang tags for SEO.</p><pre>i18n: {<br>     locales: [&quot;en&quot;],<br>     defaultLocale: &quot;en&quot;,<br>},</pre><p>Now we prepare the “_app.js” file to use NextJS head built-in component. Here is the code I used for adding some SEO, you can use better keywords.</p><p><a href="https://gist.github.com/debjit/eabdd49f9846e3f33697101d05f3bcd0">https://gist.github.com/debjit/eabdd49f9846e3f33697101d05f3bcd0</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nIfI_kF4eOcxNEgdRZjOfg.png" /></figure><p>The key is very important if you wanted to use different content for a separate page. Key avoids duplication of your content and ranks SEO better.</p><p>Now it is time to add SEO to our index page. Add “next/head” as Head and define your meta tags inside the component and that&#39;s it, lets&#39;s add some meta tags.</p><p>Here is the code for the index file.</p><p><a href="https://gist.github.com/debjit/e22308916da3a0c1388df123fecdaf7b">https://gist.github.com/debjit/e22308916da3a0c1388df123fecdaf7b</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VN40bze29iuk6LktC6Q3Sw.png" /></figure><p>So now any page you add just add your desired meta tags with a key to replace and all your pages will have default meta tags to work with.</p><p>You don&#39;t need any keys for unique keys if you are not replacing them. The Key is to stop rendering duplicate tags.</p><p>Update: 28–04–2022: Language tag inside HTML.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=835c1fecbd2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How did I host my Blood Donation Diary app on Heroku for free?]]></title>
            <link>https://debjit012.medium.com/how-did-i-host-my-blood-donation-diary-app-on-heroku-for-free-be03f8f4e1c9?source=rss-58ff32ac1768------2</link>
            <guid isPermaLink="false">https://medium.com/p/be03f8f4e1c9</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[heroku]]></category>
            <category><![CDATA[blood-donation]]></category>
            <category><![CDATA[ngo]]></category>
            <dc:creator><![CDATA[Debjit Biswas]]></dc:creator>
            <pubDate>Sat, 24 Apr 2021 12:30:18 GMT</pubDate>
            <atom:updated>2022-12-25T13:19:02.360Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xU4xCgt2eQT43wD0LBX8ag.png" /></figure><pre>// kindly Note Heroku no longer provides free hosting or pgSQL hosting.</pre><h3>A brief description.</h3><p>Blood Bank does not have enough stock. So my friends started a chat group and helped people who needed blood. But we can only help a very limited number of people, as they are all our friends and relatives. So I made this app to use as a website and also manage blood donations for my group. I have created and shared this, so any group or NGO can use it and act promptly. Here is my app link.</p><p><a href="https://github.com/Alpana-Web-Solution/bddv1/">Alpana Blood Donation Drive</a></p><p>I am using free services available. So you need to register for a couple of services. I use google login for every app, you can register using email too.</p><ol><li><a href="https://heroku.com/">heroku.com</a></li><li><a href="https://cloudinary.com/invites/lpov9zyyucivvxsnalc5/yenl6xfhe4i6srzoa3ga">Cloudinary.com</a></li><li><a href="https://sendinblue.com">sendinblue.com</a></li><li>github.com</li></ol><p>We are deploying on Heroku. Heroku provide hosting, bandwidth and database. But it does not have any storage, which is needed to store requisition images. So I have chosen another free image hosting service Cloudinary. To send emails I am using the Sendinblue transactional email SMTP service. That&#39;s all we need for my application to run smoothly.</p><h3>Let’s set up Heroku.</h3><p>I am assuming you are registered with Heroku and in <a href="https://dashboard.heroku.com/">https://dashboard.heroku.com/</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3MT98ltsstJiR8gLifu9pw.png" /></figure><p>Now click the new and fill-up the form, name and region and that&#39;s it. Your app is ready to deploy. Please note your app name will be your app URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RSglk5DhVxpGwACJPhNQDw.png" /></figure><p>Register to Github.</p><p>You can either fork it or just clone it in your local environment, I will be showing the fork method here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sm42ucKHrt4RPCb3zxQS6Q.png" /></figure><p>For this example, I am using my <a href="https://github.com/Alpana-Web-Solution/bddv1">Blood Donation Diary web app</a>. Here is the GitHub <a href="https://github.com/Alpana-Web-Solution/bddv1">link</a>. Click fork and that&#39;s it now you have an own copy.</p><p>Now go to Deploy and connect to GitHub. Authorise Heroku, and search with the repo name you just forked, in this case, it is bddv1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QzGQYwJ9pm7N208O1BcajQ.png" /></figure><h3>Add Configuration Files :</h3><p>Now create a file “Procfile” without any extension.</p><pre>web: vendor/bin/heroku-php-nginx -C nginx.conf public/</pre><p>And commit a new file. Select “Commit directly to the main branch”</p><p>Add another file now name it “nginx.conf”</p><pre>add_header X-Frame-Options &quot;SAMEORIGIN&quot;;<br>add_header X-XSS-Protection &quot;1; mode=block&quot;;<br>add_header X-Content-Type-Options &quot;nosniff&quot;;</pre><pre>index  index.php index.html index.htm;</pre><pre>charset utf-8;</pre><pre>gzip on;<br>gzip_comp_level 5;<br>gzip_min_length 256;<br>gzip_proxied any;<br>gzip_vary on;<br>gzip_types<br>  application/atom+xml<br>  application/javascript<br>  application/json<br>  application/ld+json<br>  application/manifest+json<br>  application/rss+xml<br>  application/vnd.geo+json<br>  application/vnd.ms-fontobject<br>  application/x-font-ttf<br>  application/x-web-app-manifest+json<br>  application/xhtml+xml<br>  application/xml<br>  font/opentype<br>  image/bmp<br>  image/svg+xml<br>  image/x-icon<br>  text/cache-manifest<br>  text/css<br>  text/plain<br>  text/vcard<br>  text/vnd.rim.location.xloc<br>  text/vtt<br>  text/x-component<br>  text/x-cross-domain-policy;</pre><pre>location / {<br>    try_files $uri $uri/ /index.php?$query_string;<br>}</pre><pre>location = /favicon.ico { access_log off; log_not_found off; }<br>location = /robots.txt  { access_log off; log_not_found off; }</pre><pre>error_page 404 /index.php;</pre><pre>location ~ /\.(?!well-known).* {<br>    deny all;<br>}</pre><p>Please copy-paste it. And save it.</p><pre>Note: You can also go to the <br><a href="https://github.com/debjit/pass-config-files">https://github.com/debjit/pass-config-files</a><br>And download the files as zip.<br>Unzip the files and go to &quot;heroku&quot; directory and upload two files to the repo.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GIJ3WYmHEAY-01hmyELo6g.png" /></figure><p>Now you need to upload 2 config files to your cloned repo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wB2XEYVM1Gq2jVAYC41wIg.png" /></figure><h3>Add App Key:</h3><p>Goto heroku dashboard and select “More”&gt; “Run Console”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Juudbm0dAqwtbFtsVv5zPA.png" /></figure><p>Now you need to run code bellow to see the unique key for your app. Please keep it secret.</p><pre>php artisan key:generate --show</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EcEgq4xqVzGHI1MT3acweQ.png" /></figure><p>Copy the key and keep it to the safe place. Please copy it with out any space. You need it when adding “Config Vars”.</p><h3>Let’s add a database:</h3><p>Go to “Resources” and find “Heroku Postgres”, select plan name “Hobby Dev — Free” click “Submit Order Form”. That&#39;s it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R6K9Td6Gm-LvjWerYWN7DA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lu34FoingOcivwnTVyb2yQ.png" /></figure><p>Your database is attached to this app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GxY_fWOuKwbCkl0IaCzkIA.png" /></figure><p>Now click “Heroku Postgres” and go to settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I_uBRTb9VDcFFurL7e_ULA.png" /></figure><p>You need database credentials to set up your app. Click “View Credentials” and copy the values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tR507ntpb4aNtKHODrZ0Xw.png" /></figure><p>Now you need to insert to the app “Config Vars”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CboccJVnGXOzDX9SGZPGAw.png" /></figure><p>Goto settings and insert all database and other information you copied.</p><p>Click “Reveal Config Vars” and insert key-value pair as below.</p><blockquote>Key = “DB_CONNECTION”, value =”pgsql”</blockquote><blockquote>Key = “DB_HOST”, Value = Host(From Heroku postgresql database credentials)</blockquote><blockquote>Key = “DB_DATABASE”, Value = Database (From Heroku postgresql database credentials)</blockquote><blockquote>Key = “DB_USERNAME”, Value = User (From Heroku postgresql database credentials)</blockquote><blockquote>Key = “DB_PASSWORD”, Value = Password(From Heroku postgresql database credentials)</blockquote><blockquote>Key = “DATABASE_URL”, Value = URI (From Heroku postgresql database credentials)</blockquote><p>Please copy-paste all the values and don&#39;t add blank or space anywhere, this may cause an error.</p><blockquote>Please insert “key”=“APP_KEY” and the result of “php artisan key:generate — show” to the “value” fiels. It’s important. Your app won’t run without it.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6_Z2gbYgS-ihWgJOfSR3tA.png" /></figure><h3>Let’s migrate:</h3><p>Now the database is configured and needed to migrate tables. goto “More&gt;Run Console” and enter</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ehk91G1optTuNFrbGsPCjQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EcEgq4xqVzGHI1MT3acweQ.png" /></figure><pre>php artisan migreate:fresh --seed --force</pre><p>And that&#39;s your website is almost ready.</p><h3>Upload Image:</h3><p>Heroku does not support image upload, so we have to use the image storage service <a href="https://cloudinary.com/invites/lpov9zyyucivvxsnalc5/yenl6xfhe4i6srzoa3ga">Cloudinary</a>. Now register and get your app secret URL and add it to the app config file.</p><p>Add Config to your site variable in settings. Click “Reveal Config Vars” and insert key-value pair as below.</p><blockquote>‘Key’ =“CLOUDINARY_URL” , “value”=&gt;”API Enviornment Veriable — copy your link from cloudinary dashboard”</blockquote><blockquote>“key”=&gt;”CLOUDINARY_UPLOAD_PRESET” , ”value”=&gt;”Get value from tutorials define bellow”</blockquote><p>get your “CLOUDINARY_UPLOAD_PRESET” <a href="https://cloudinary.com/documentation/upload_presets">https://cloudinary.com/documentation/upload_presets</a> from here.</p><p>The app will not display the requisition form if you did not upload it in the Cloudinary service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b_3fLb84P8_uK0E9mr7DRg.png" /></figure><h3>Email configuration:</h3><p>I am using <a href="https://sendinblue.com">Sendinblue </a>email service, which also offers free email SMTP services. Goto “Transactional” section and copy and paste the settings from their website.</p><p>You need this key-value pair to work with Sendinblue.</p><h3>KEY=VALUE</h3><p>MAIL_MAILER=smtp<br>MAIL_HOST=provided-by-sendinblue<br>MAIL_PORT=587<br>MAIL_USERNAME=your-username<br>MAIL_PASSWORD=your-password<br>MAIL_ENCRYPTION=tls<br>MAIL_FROM_ADDRESS=your-ngo-mail-address@domain.com<br>MAIL_FROM_NAME=”Your App Name”</p><pre><a href="https://account.sendinblue.com/advanced/api/">https://account.sendinblue.com/advanced/api/</a></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ymqoBzTjvWTeEzB8cpVa0Q.png" /></figure><p>And that&#39;s it. Your app is ready for serving. Please note you have to log in using these credentials.</p><pre>Username: admin@admin.com<br>Password: password</pre><h3>Before deploy please see this config as an example and see you are missing any fields.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iLD-EFbnO7p0S0bmN-5C4w.png" /></figure><blockquote>Note: If you are using space in value please add the value inside double quote like “”. For example, see APP_NAME, its value is inside double quote. But see MAIL_MAILER values it’s not inside any “”.</blockquote><h3>Deploy :</h3><p>Now you can deploy your code to Heroku. Goto deploys and in manual deploy select main and deploys the branch. That’s it. Your app is now live. But note your app needs to be configured and a database to store data.</p><p>I hope all the best.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be03f8f4e1c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy Laravel on Vercel with database, image storage, and email.]]></title>
            <link>https://debjit012.medium.com/deploy-laravel-on-vercel-with-database-image-storage-and-email-2d3917cfc914?source=rss-58ff32ac1768------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d3917cfc914</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[free]]></category>
            <category><![CDATA[web-hosting]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Debjit Biswas]]></dc:creator>
            <pubDate>Wed, 07 Apr 2021 19:18:52 GMT</pubDate>
            <atom:updated>2021-04-07T19:18:52.241Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deploy Laravel on Vercel with database, image storage, and email for free.</h3><p>This is how I deploy and test my app in the production environment. I learn that vercel can host the Laravel app and auto-deploy if a git is connected.</p><p>I found this article which is my base you can also read the article to set up the laravel app.</p><p><a href="https://calebporzio.com/easy-free-serverless-laravel-with-vercel">Easy, Free, Serverless Laravel With Vercel</a></p><p>Here I will share -<br>1. How to add PostgreSQL to your app.<br>2. How to send emails from your app using Sendinblue.<br>3. How to store Image and edit on the fly using Cloudinary.<br>4. How to add a custom domain.</p><p>Vercel’s limitation:<br>Vercel provides very generous plans for hobby or free user, which I will use in this tutorial. Keep in mind vercel can execute 10sec serverless functions. Has 1024MB of max Ram. The /tmp folder has 512MB of storage. There is no bandwidth or any other limit for your app.</p><ol><li>Adding PostgreSQL.</li></ol><p>Let’s start with how to add PostgreSQL to your laravel app. Vercel does not provide a database hosting service. So I chose <a href="http://elephantsql.com">elephantsql.com</a>’s “TINY TURTLE” database with a 20MB limit. 20MB for a normal CRUD function is enough for me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*e3Qt6l7F7U44Lv2vQupnHw.png" /></figure><p>You can create your new instance from <a href="http://elephantsql.com">elephantsql </a>dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*HvLppe0N7FfpOwufE-59DQ.png" /></figure><p>Fill the form and select the region and that’s it your database is ready to use. You can find all database related info on the database details page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*AeHh0fq65_tEgdVO4C5ekA.png" /></figure><p>Now goto <a href="https://vercel.com/debj/vercelbdd/settings">https://vercel.com/&lt;user&gt;/&lt;project&gt;/settings</a>/environment-variables <br>or <br>User &gt; Project &gt; Settings &gt; environment-variables <br>and add new plain text with “DATABASE_URL”, ”DB_HOST”, ”DB_PORT”, ”DB_DATABASE”, ”DB_USERNAME”, “DB_PASSWORD”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*xKMOnFZGsAS2WC2RJtpqmw.png" /></figure><p>Now you are all set. Just redeploy your app from the deployment menu and all the database settings will be available to your app. You can also hard code your database information to the config/database.php file.</p><p>That&#39;s it. Your app is now connected with a database, hosted on vercel.</p><p>NOTE: I add all variable to my local environment and migrate from my dev setup. Vercel does not give any cli to work with. You can also add a route for migration call, but I prefer SQL import or migrate from a local dev environment.</p><p>2. Adding Email Support using Sendinblue.</p><p>Vercel does not provide a default email gateway, So I am using Sendinblue for my app. Please create an account and send an email to their support asking for activating transactional email. Add all the settings to your vercel settings and you are done. Try sending password reset mail to test it’s working or not.</p><p>3. Add Images using Cloudinary.</p><p>Cloudinary provides a free image hosting service and you can manipulate images on the fly without any other extensions. Cloudinary has a laravel package which can be found <a href="https://github.com/cloudinary-labs/cloudinary-laravel">here</a>.</p><p>Installation</p><p>Like any other packages, I use composer to install.</p><pre>composer require cloudinary-labs/cloudinary-laravel</pre><p>Then add the following lines to config/app.php providers and aliases.</p><pre>&#39;providers&#39; =&gt; [<br>    ...<br>    CloudinaryLabs\CloudinaryLaravel\CloudinaryServiceProvider::class,<br>    ...<br>]</pre><p>Add config/app.php aliases part.</p><pre>&#39;aliases&#39; =&gt; [<br>    ...<br>    &#39;Cloudinary&#39; =&gt; CloudinaryLabs\CloudinaryLaravel\Facades\Cloudinary::class,<br>    ...<br>]</pre><p>Goto your Cloudinary dashboard and copy these settings and add them to variable config files.</p><pre>CLOUDINARY_URL=xxxxxxxxxxxxx<br>CLOUDINARY_UPLOAD_PRESET=xxxxxxxxxxxxx<br>CLOUDINARY_NOTIFICATION_URL=</pre><p>You can make use of Cloudinary like any other storage driver.</p><pre>You can upload image inline like</pre><pre>$result = $request-&gt;file(&#39;file&#39;)-&gt;storeOnCloudinary();</pre><p>Using Cloudinary is simple and give you generous usage limits.</p><p>4. Add a Custom Domain</p><p>I pinged using cmd and get the IP for my app, then I added an “A” DNS record with IP and that&#39;s it. Vercel also created a letsencrypt licence for it.</p><p>That’s it. Your website is now fully functional and completely free with some limitation. For most use cases, the free alternative is enough.</p><p>I have used 3rd party free software to get all the functions of a website. Next, I will try to add Redis into my app.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d3917cfc914" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>