<?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>Forem: Pruthvi Kumar</title>
    <description>The latest articles on Forem by Pruthvi Kumar (@pruthvikumarbk).</description>
    <link>https://forem.com/pruthvikumarbk</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%2F107750%2Fa8f2726d-b72e-4b8e-8c25-7a6f44afd3b2.jpeg</url>
      <title>Forem: Pruthvi Kumar</title>
      <link>https://forem.com/pruthvikumarbk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/pruthvikumarbk"/>
    <language>en</language>
    <item>
      <title>Semantic Similarity for Personal Knowledge Management</title>
      <dc:creator>Pruthvi Kumar</dc:creator>
      <pubDate>Sun, 02 Feb 2025 01:23:58 +0000</pubDate>
      <link>https://forem.com/pruthvikumarbk/semantic-similarity-for-personal-knowledge-management-3j9p</link>
      <guid>https://forem.com/pruthvikumarbk/semantic-similarity-for-personal-knowledge-management-3j9p</guid>
      <description>&lt;p&gt;In today's digital world, we are all knowledge workers 🧑‍💻, constantly swimming in a sea of information 🌊. Whether it's code snippets 💻, research papers 📚, meeting notes 📝, blog posts 📰, or just our daily reflections 🤔 – we are bombarded with digital content. We rely heavily on search 🔍, often keyword-based, to navigate this information. But what if there was a way to go deeper 🤿, to find connections based on &lt;em&gt;meaning&lt;/em&gt;, not just matching words?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What if your note-taking system could understand the &lt;em&gt;meaning&lt;/em&gt; of your notes, not just the specific words you happened to use?&lt;/strong&gt; 🤯&lt;/p&gt;

&lt;p&gt;This question has been a driving force for me. Keyword search is undeniably useful 👍, but it has inherent limitations for effective Personal Knowledge Management (PKM) 🧠.  Consider this 👇:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  You might have notes on "improving focus and concentration" spread across different documents, using varied phrasing each time. Keyword search might miss these connections if you don't use consistent terminology. 😔&lt;/li&gt;
&lt;li&gt;  Related ideas might be expressed using synonyms or different language entirely, making it challenging to link them using simple keyword queries.  This hinders our ability to build a truly interconnected understanding of our knowledge. 🔗&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Idea: Semantic Similarity for PKM ✨&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is where the concept of &lt;strong&gt;semantic similarity&lt;/strong&gt; becomes incredibly valuable for Personal Knowledge Management.  Instead of solely relying on matching keywords, semantic similarity aims to understand the &lt;em&gt;underlying meaning&lt;/em&gt; of your notes and documents.&lt;/p&gt;

&lt;p&gt;Think of it this way 👇:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Keyword search for PKM:&lt;/strong&gt;  It's like organizing your physical notes by only looking at a few keywords you wrote on the top of each page. You might miss the deeper connections and broader themes across your notes. 🙈&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Semantic similarity for PKM:&lt;/strong&gt;  Imagine having a system that &lt;em&gt;understands&lt;/em&gt; the concepts within your notes and can intelligently group together related information, even if you used different words to express those concepts over time.  💡&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Semantic similarity for PKM means moving beyond surface-level word matching to capture the &lt;em&gt;essence&lt;/em&gt; of your ideas 💫, allowing you to discover connections based on meaning and build a richer, more interconnected personal knowledge base. 🕸️&lt;/p&gt;

&lt;p&gt;For example, consider these notes someone might have in their PKM system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  "Need to find strategies to minimize distractions during deep work sessions."&lt;/li&gt;
&lt;li&gt;  "Experimenting with time-blocking techniques to improve concentration."&lt;/li&gt;
&lt;li&gt;  "My focus is scattered; looking for ways to enhance attention span."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A semantic similarity approach can recognize that these are all related to the core concept of "improving focus and concentration" within a PKM system, even with varied phrasing. 🎯&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exploring Semantic PKM with Cipher 🛠️&lt;/strong&gt;&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%2Fmiro.medium.com%2Fv2%2Fresize%3Afit%3A2000%2Fformat%3Awebp%2F1%2Az4EJD0rwjYCm-2yxIyc-JQ.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%2Fmiro.medium.com%2Fv2%2Fresize%3Afit%3A2000%2Fformat%3Awebp%2F1%2Az4EJD0rwjYCm-2yxIyc-JQ.png" alt="Visual representation of connected thoughts and ideas, similar to Cipher's Contexts" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This exploration of semantic similarity for PKM led me to build a tool called &lt;strong&gt;Cipher&lt;/strong&gt;.  It's a personal project, driven by my own need to better manage and understand the connections within my digital notes and reflections, with the goal of enhancing my personal knowledge management practices.&lt;/p&gt;

&lt;p&gt;Cipher, at its core, is an experiment in applying semantic similarity to organize and analyze my journal entries and notes.  It's not about replacing traditional search, but rather augmenting my PKM workflow by offering a new, meaning-based perspective on my information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(Watch a quick demo of Cipher in action!)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/16Y26vjlPJw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How It Might Work ⚙️&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cipher uses what I call Contexts — groupings of thoughts that seem to naturally appear as I write. These contexts might emerge on their own as I’m writing, suggesting connections I might not have consciously made. It’s a bit like having a conversation where things you’ve thought about before might naturally come to mind. 🔄&lt;/p&gt;

&lt;p&gt;These Contexts aren’t strict categories or folders, but more like flexible connections that seem to shift as my thinking evolves. As I write, Cipher looks for links between my entries, perhaps building a kind of map 🗺️ of my connected thoughts. The system seems to learn from what I write, noticing if certain ideas or themes come up repeatedly.&lt;/p&gt;

&lt;p&gt;Sometimes, seeing these connected thoughts might offer a slightly different perspective on things I’ve experienced. Some of these observations might resonate immediately, while others might take longer to consider. There’s no pressure to do anything with these observations — they’re simply there as potential starting points for further thought, if I choose to explore them. 🤔&lt;/p&gt;

&lt;p&gt;The goal isn’t to force a strict structure. Instead, Cipher offers a flexible way to see if there are natural rhythms and patterns in my own life, based on the idea that understanding might sometimes come from careful observation, rather than actively searching for it. It’s about creating a space where understanding could potentially arrive in its own time. 🧘&lt;/p&gt;

&lt;p&gt;This idea of connected Contexts is vaguely similar to how our own brains work, right? We might create webs of connections between different thoughts and experiences. Our minds seem to constantly link things together, building a rich understanding of the world that perhaps changes as we learn. Cipher, in a small way, is inspired by this, hoping to help me (and maybe others) connect the dots in my own reflections. 🧩&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My Own Experience 📝&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cipher started as something I built for myself, a digital way to keep a journal. I wanted to try and track not just my thoughts, but potentially how they might shift over time. Regular journals and note apps often felt either too structured or not structured enough for what I was looking for. I was hoping for something that could adapt as my understanding grew, maybe helping me see broader patterns in my daily thoughts.&lt;/p&gt;

&lt;p&gt;What began as a simple journaling tool gradually became something that seemed more interesting. The patterns that appeared in my writing sometimes hinted at connections and insights I hadn’t consciously noticed. This somewhat natural process of discovery is what Cipher is about today. ✨&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If This Resonates 🤝&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This isn’t about widespread adoption or any commercial goals. It’s about sharing something that came from a personal need and has been quietly helpful in my own experience. If the idea of a subtle aid for noticing patterns in your own thoughts sounds potentially interesting, you’re welcome to explore Cipher through a small beta program - &lt;a href="https://cipher.sysapp.dev" rel="noopener noreferrer"&gt;https://cipher.sysapp.dev&lt;/a&gt;. I’m keeping the group small to allow for thoughtful development and refinement based on genuine feedback. My hope is simply that it might be valuable to others who are curious about exploring their own thoughts in this way. 🙏&lt;/p&gt;

</description>
      <category>pkm</category>
      <category>journaling</category>
      <category>semanticsimilarity</category>
      <category>rag</category>
    </item>
    <item>
      <title>I Built a CLI Tool That Tells Me When I'm Over-Engineering (Again) 🤖</title>
      <dc:creator>Pruthvi Kumar</dc:creator>
      <pubDate>Fri, 01 Nov 2024 07:43:05 +0000</pubDate>
      <link>https://forem.com/pruthvikumarbk/i-built-a-cli-tool-that-tells-me-when-im-over-engineering-again-4lj9</link>
      <guid>https://forem.com/pruthvikumarbk/i-built-a-cli-tool-that-tells-me-when-im-over-engineering-again-4lj9</guid>
      <description>&lt;p&gt;Built this to catch myself when I'm 47 commits deep into "optimizing" a simple function. It's a pragmatic approach to detecting when you're over-engineering - using ML to analyze work patterns and suggest when to just ship it.&lt;/p&gt;

&lt;p&gt;Some actual results from 3 months of usage:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;31% reduction in context-switching&lt;/li&gt;
&lt;li&gt;47% better task completion rate&lt;/li&gt;
&lt;li&gt;Significantly fewer 3AM "this needs a complete rewrite" episodes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(And yes, it tells me when I'm over-engineering the over-engineering detector😁)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/1x-eng/tomatick" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;br&gt;
&lt;a href="https://1x-eng.github.io/blog/posts/tomatick/" rel="noopener noreferrer"&gt;Blog&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/posts/iampruthvi_tomatick-yet-another-attempt-to-rethink-activity-7257252499600900097-_PtF?utm_source=share&amp;amp;utm_medium=member_desktop" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>productivity</category>
      <category>cli</category>
      <category>pomodoro</category>
    </item>
    <item>
      <title>Serverless backend service that uses Typescript &amp; Golang - Automated. Well, mostly</title>
      <dc:creator>Pruthvi Kumar</dc:creator>
      <pubDate>Thu, 07 Apr 2022 07:12:00 +0000</pubDate>
      <link>https://forem.com/pruthvikumarbk/serverless-backend-service-that-uses-typescript-golang-automated-well-mostly-2jch</link>
      <guid>https://forem.com/pruthvikumarbk/serverless-backend-service-that-uses-typescript-golang-automated-well-mostly-2jch</guid>
      <description>&lt;p&gt;&lt;a href="https://gitlab.com/1x-eng/g-zippy"&gt;https://gitlab.com/1x-eng/g-zippy&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>backend</category>
      <category>typescript</category>
      <category>go</category>
    </item>
    <item>
      <title>Sparkle - Master computer programming by spaced &amp; repetitive learning.</title>
      <dc:creator>Pruthvi Kumar</dc:creator>
      <pubDate>Sun, 22 Sep 2019 05:05:33 +0000</pubDate>
      <link>https://forem.com/pruthvikumarbk/sparkle-master-computer-programming-by-spaced-repetitive-learning-2n5o</link>
      <guid>https://forem.com/pruthvikumarbk/sparkle-master-computer-programming-by-spaced-repetitive-learning-2n5o</guid>
      <description>&lt;p&gt;Perpetual Learning is the greatest constant in a Software Development career (at least if you do care about your career). The technology landscape changes too fast and we need to keep up. That’s just the way it is.&lt;/p&gt;

&lt;p&gt;Software programming can be mastered by spaced repetition. And, flashcards are just meant to help you get there.&lt;/p&gt;

&lt;p&gt;SPARKLE is free software that lets you create flashcards in respective sections and offers a whole lot more. Thanks for checking it out - &lt;a href="https://sparkle.apricity.co.in"&gt;https://sparkle.apricity.co.in&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SPARKLE - Where you start as a novice; and, leave as a master!&lt;/p&gt;

</description>
      <category>mastery</category>
      <category>programming</category>
      <category>interview</category>
      <category>flashcards</category>
    </item>
    <item>
      <title>Art of mastering computer programming - Sparkle</title>
      <dc:creator>Pruthvi Kumar</dc:creator>
      <pubDate>Fri, 20 Sep 2019 07:17:04 +0000</pubDate>
      <link>https://forem.com/pruthvikumarbk/art-of-mastering-computer-programming-sparkle-b5f</link>
      <guid>https://forem.com/pruthvikumarbk/art-of-mastering-computer-programming-sparkle-b5f</guid>
      <description>&lt;p&gt;Have you ever used flashcards? Sure you did! We’ve all been there and it seems like they are making a comeback. Programmers can remember programming knowledge they don’t use on a day to day basis using spaced repetition.&lt;/p&gt;

&lt;p&gt;Sparkle, is a free to use software (web &amp;amp; mobile friendly) that lets you create your flashcards in neatly separated sections. Plus, there are a lot more goodies. Check it out - &lt;a href="https://sparkle.apricity.co.in"&gt;https://sparkle.apricity.co.in&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sparkle - where you start as a novice and end as a master!&lt;/p&gt;

</description>
      <category>mastery</category>
      <category>jankimethod</category>
      <category>flashcards</category>
      <category>learnprogramming</category>
    </item>
    <item>
      <title>ETHEReact: Build a Full Stack Decentralized E-Commerce App, Deploy to Ethereum Virtual Machine &amp; Interact using ReactJS</title>
      <dc:creator>Pruthvi Kumar</dc:creator>
      <pubDate>Fri, 26 Jul 2019 05:02:36 +0000</pubDate>
      <link>https://forem.com/pruthvikumarbk/ethereact-build-a-full-stack-decentralized-e-commerce-app-deploy-to-ethereum-virtual-machine-interact-using-reactjs-54l7</link>
      <guid>https://forem.com/pruthvikumarbk/ethereact-build-a-full-stack-decentralized-e-commerce-app-deploy-to-ethereum-virtual-machine-interact-using-reactjs-54l7</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AEzRAe89i9ucaUn-bpjO_qQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AEzRAe89i9ucaUn-bpjO_qQ.png" alt="A picture is worth a thousand words!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;This is not an article explaining Blockchain or marketing Crypto.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This article focuses on facilitating any developer &amp;amp;/ blockchain enthusiasts build a prototype on blockchain; end-to-end. You’ll build a basic decentralized e-commerce platform by the end of this article.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In this article, you will write two contracts in Solidity &lt;em&gt;(one for supplier &amp;amp; another for the customer)&lt;/em&gt;, compile and migrate your contract to EVM, create a simple ReactJS frontend, connect your frontend to EVM via web3.js.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Alright, now that you are interested, let’s start coding! No fluff right!&lt;/p&gt;

&lt;h3&gt;
  
  
  Pre-requisites:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;This article assumes you understand how to install &lt;em&gt;NodeJS&lt;/em&gt; on development machines, how to download newer packages from &lt;em&gt;npm&lt;/em&gt; and a basic understanding of &lt;em&gt;ReactJS.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;That you have the latest version of &lt;a href="https://nodejs.org/en/" rel="noopener noreferrer"&gt;NodeJS &lt;/a&gt;installed on your development machine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install &lt;a href="https://truffleframework.com/" rel="noopener noreferrer"&gt;Truffle&lt;/a&gt; npm install -g truffle Truffle is a development and testing framework for Ethereum. With Truffle, you can compile, test and deploy smart contracts on Ethereum network.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install &lt;a href="https://www.npmjs.com/package/ethereumjs-testrpc" rel="noopener noreferrer"&gt;TestRPC&lt;/a&gt; npm install -g ethereumjs-testrpc TestRPC is Node.js based Ethereum client for testing and make developing Ethereum applications much faster.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install &lt;a href="https://github.com/facebook/create-react-app" rel="noopener noreferrer"&gt;Create-React-App&lt;/a&gt; in some other folder. Probably in your root. npm install -g create-react-app&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a folder for your app. May be call it MyDApp mkdir MyDApp &amp;amp; change to newly created folder cd MyDApp&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;npx create-react-app FrontEnd This will create the front-end. Production grade React built by issuing just one command! Can’t get any better! Right? For the sake of this demo, we will not build bundles; but, just run the app. npm start in the same folder; you should have ReactJS smooth and running on port 3000 (Unless it was directed to run on any other port)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AUV1QhlwqwLkOY7nWxayFXA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AUV1QhlwqwLkOY7nWxayFXA.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Back-end:
&lt;/h3&gt;

&lt;p&gt;With all the pre-requisites satisfied, lets concentrate on having a functional Blockchain back-end for our DApp.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Change to app’s root folder cd MyDApp&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a dedicated structure for Back-end. mkdir BackEnd &amp;amp; cd BackEnd&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Initialize Truffle by truffle init (In Windows 10, if this results in *Microsoft JScript runtime error, *change your command to truffle.cmd init) This will initialize the folder structure to create and deploy smart contracts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigate to file named truffle.js and make sure it has this contents:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;Inside contracts folder, create a new file named Supplier.sol Now, lets code some &lt;a href="https://solidity.readthedocs.io/en/v0.4.25/" rel="noopener noreferrer"&gt;Solidity&lt;/a&gt; to define our Suppliers back-end logic.&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;The above solidity contract is comprised of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;State variables: Think of these as global variables available across the contract.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Transactions: These are functions that add &amp;amp;/ update &amp;amp;/ delete data in the Blockchain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Getters: These are functions too; but, only read data from the Blockchain.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s important to understand that Transaction functions cost ‘GAS’ when dealing with Blockchain. That means, operations like storing new data, updating &amp;amp;/ deleting existing data from Blockchain is not free! Explaining GAS is not in the scope of this article. This &lt;a href="https://ethereum.stackexchange.com/questions/3/what-is-meant-by-the-term-gas" rel="noopener noreferrer"&gt;stackexchange answer&lt;/a&gt; does a pretty good job in explaining this unit.&lt;/p&gt;

&lt;p&gt;However, reading data from blockchain can be free! Getter functions help us achieve that.&lt;/p&gt;

&lt;p&gt;The above contract empowers our backend to support ‘Suppliers’ in an e-commerce platform.&lt;/p&gt;

&lt;p&gt;We need code for Customers. Inside contracts folder, create a file named Customer.sol and lets code some solidity again. It’s fun isn’t it?&lt;/p&gt;



&lt;p&gt;Now, lets write some logic for migrating these contracts to Blockchain network.&lt;/p&gt;

&lt;p&gt;Inside ./MyDApp/BackEnd/migrations folder, create a new file named 2_deploy_contract.js which should contain the following code&lt;/p&gt;



&lt;p&gt;Congratulations! You just completed coding a Blockchain back-end for your cool decentralized e-commerce.&lt;/p&gt;

&lt;p&gt;Now, lets get it working.&lt;/p&gt;

&lt;p&gt;Solidity is a compiled language. Lets compile our code using truffle compile (on Windows10, you might want to do truffle.cmd compile )&lt;/p&gt;

&lt;p&gt;No compile time errors? Congratulations. Now, we have to migrate our contracts to Ethereum network. Open a new command prompt / terminal and navigate to ./MyDApp/BackEnd/ . It’s time to get Ethereum running locally on your machine. Do that using testrpc -l 9000000000 -p 8484&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;-l 9000000000 indicate the gas limit of the network. On production systems, this is real money! (Crypto of-course). On your machine, you have the control! (Feels rich right?)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;-p 8484 indicate the port on which your RPC server must listen.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2844%2F1%2AknIdXNKXemmNh9Mn-OErXQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2844%2F1%2AknIdXNKXemmNh9Mn-OErXQ.png" alt="Congratulations! You’re running private Ethereum on your machine!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Leave that cmd/terminal running. Open another one and change to ./MyDApp/BackEnd . We gotta migrate our contracts into the network that we just started. We do that using truffle migrate (Again, on Windows10, you might want to use truffle.cmd migrate )&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2382%2F1%2AD77simLqAM9-K1PqXSVgDg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2382%2F1%2AD77simLqAM9-K1PqXSVgDg.png" alt="On successful migration, you should have a screen that looks like above."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Whilst your contracts get migrated to the network, notice activity on another terminal where you have your rpc server running. Blockchain has recorded your contracts into its system! Phew, we are flying!!!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Contract Address’ &amp;amp; other config&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For your front end to communicate with Blockchain back-end, it needs a few config information. Lets grab that info and save it for future reference.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Grab address of each contracts deployed to network.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open another cmd/terminal and navigate to ./MyDApp/BackEnd Get truffle console using truffle console (on Win10, truffle.cmd console )&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get Supplier contract address using Supplier.address Store this address. We will need this shortly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get Customer contract address using Customer.address Store this address. We will need this shortly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For &lt;a href="https://github.com/ethereum/web3.js/" rel="noopener noreferrer"&gt;web3 &lt;/a&gt;to marry Ethereum to React, it needs contract ABI. Again, explaining ABI is out of scope for this article; but, this &lt;a href="https://ethereum.stackexchange.com/questions/234/what-is-an-abi-and-why-is-it-needed-to-interact-with-contracts" rel="noopener noreferrer"&gt;stackexchange answer&lt;/a&gt; does a good job.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get ABI for Supplier contract using JSON.stringify(Supplier.abi) . Terminal spits a huge string which is essentially JSON once you remove start and end quotes. Use &lt;a href="https://jsonlint.com/" rel="noopener noreferrer"&gt;JSONlint &lt;/a&gt;to help you format the JSON. Store this JSON. We will need this shortly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Similarly, get ABI for Customer contract using JSON.stringify(Customer.abi) Again, remove the first and last quote, format and save this for future reference.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s it. You have coded, compiled, migrated and obtained config for Blockchain back-end of your cool decentralized e-commerce app!&lt;/p&gt;

&lt;p&gt;There is only front end remaining. Let’s get to it!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Front-end:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As a part of pre-requisites, we installed create-react-app globally &amp;amp; created a react app for ourselves. Lets change to that directory. cd ./MyDApp/FrontEnd&lt;/p&gt;

&lt;p&gt;We need to provide config information for React to connect to Blockchain backend. Let’s do that using the following code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a config file named EthereumSetup.js in /src directory. This is the time for you to grab hold of Supplier and Customer ABI’s obtained from previous steps.&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;Create front-end components for Suppliers to add products to marketplace &amp;amp; process purchase-orders. Within /src folder, create a file named Suppliers.js&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Notice how transaction functions (line 115, 127, 140) require gas to complete a transaction. If you are wondering how I’ve pre-determined gas limit to be 20000; The answer is, It’s random! In test networks, you will not have to worry about gas limits. It is a serious consideration when you go to public networks because, we are talking real money then. Higher the gas available for a transaction, it will be ranker higher in priority for the network to complete the transaction.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now, similar to Suppliers.js we need front end logic and components for Customers to view items available in the marketplace and place order(s). Under /src directory, create a file named Customers.js&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Also, note the event listeners. It’s important to trigger these event listeners after the component has been loaded to DOM. You can choose to watch events from a particular block or choose to go from 0 to latest . Using latter, you will catch all events recorded in the Blockchain from the very first block!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;With Supplier and Customer components now ready to go, we are one step away from completing our front-end code. Let’s nail it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Find App.js and make sure it reflects this code:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;That’s it. You’ve completed front-end code for your decentralized app! Pretty amazing! You’ve come a long way from having nothing to a full stack DApp! Congratulations!!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To bring the site alive, open a cmd/terminal and change to ./MyDApp/FrontEnd and issue this command — npm start&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Whoa!!! Can you see activity on the blockchain backend? That is all your event watchers from front-end subscribing to event emitters from the back-end. For those who know pub-sub; this is sort of similar! You now have a functional Blockchain powered decentralized e-commerce app!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you are confused about what next, check line 22 to 27 in App.js for instructions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This article helps you create a full stack DApp from scratch. You will understand how to write smart contracts in Solidity, start your Blockchain back-end and expose it to HTTP via RPC server. You will then use Web3 on the front-end to marry Ethereum back-end to React front-end. Hence ETHEReact!&lt;/p&gt;

&lt;p&gt;I will be excited to learn about newer products you build from your newly acquired skills. I’ll be more than happy to support you in this exciting journey. You can find the codebase for &lt;a href="https://github.com/PruthviKumarBK/Decentralized_eCom" rel="noopener noreferrer"&gt;ETHEReact here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For further questions/ feedback / comments, you could reach me @ &lt;a href="mailto:pruthvikumar.123@gmail.com"&gt;pruthvikumar.123@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy coding,&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.apricity.co.in" rel="noopener noreferrer"&gt;Pruthvi &lt;/a&gt;| &lt;a href="http://www.apricity.co.in" rel="noopener noreferrer"&gt;http://www.apricity.co.in&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ethereum</category>
      <category>blockchain</category>
      <category>dapps</category>
      <category>ecommerce</category>
    </item>
    <item>
      <title>PROTON - Pragmatic automagic python3 framework</title>
      <dc:creator>Pruthvi Kumar</dc:creator>
      <pubDate>Thu, 25 Oct 2018 22:05:52 +0000</pubDate>
      <link>https://forem.com/pruthvikumarbk/proton---pragmatic-automagic-python3-framework-389e</link>
      <guid>https://forem.com/pruthvikumarbk/proton---pragmatic-automagic-python3-framework-389e</guid>
      <description>&lt;p&gt;PROTON aims at easing server-side development for all Python enthusiasts. Essentially, by running a shell command, developer will auto generate necessary Model, Controller and APIs! All of this with connectivity to Transactional Databases (PROTON supports Postgresql, MySQL &amp;amp; SQL Server),caching (Redis middleware), Auto generated OpenAPI specs &amp;amp; descriptive logging! One command, to get a production ready server-side stack!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/PruthviKumarBK/PROTON"&gt;https://github.com/PruthviKumarBK/PROTON&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy coding,&lt;br&gt;
Pruthvi | &lt;a href="http://www.apricity.co.in"&gt;http://www.apricity.co.in&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python3</category>
      <category>framework</category>
      <category>api</category>
    </item>
    <item>
      <title>PROTON - Automagic python3 framework | Python MVC containerised</title>
      <dc:creator>Pruthvi Kumar</dc:creator>
      <pubDate>Wed, 17 Oct 2018 21:04:15 +0000</pubDate>
      <link>https://forem.com/pruthvikumarbk/proton---automagic-python3-framework-httpsgithubcompruthvikumarbkproton-nf9</link>
      <guid>https://forem.com/pruthvikumarbk/proton---automagic-python3-framework-httpsgithubcompruthvikumarbkproton-nf9</guid>
      <description>&lt;p&gt;PROTON is a high-level Python framework that facilitates rapid server-side development with clean &amp;amp; pragmatic design. Thanks for checking it out!&lt;/p&gt;

&lt;p&gt;PROTON aims at easing server-side development for all Python enthusiasts. Essentially, by running a shell command, developer will auto generate necessary Model, Controller and APIs! All of this with connectivity to Transactional Databases (PROTON supports Postgresql, MySQL &amp;amp; SQL Server),caching (Redis middleware), Auto generated OpenAPI specs &amp;amp; descriptive logging! One command, to get a production ready server-side stack!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/PruthviKumarBK/PROTON"&gt;https://github.com/PruthviKumarBK/PROTON&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PS: If you are experienced &amp;amp;/ interested in opentracing, connect with me if you are interested to extend PROTON's core to support method level profiling.&lt;/p&gt;

</description>
      <category>python</category>
      <category>containers</category>
      <category>api</category>
      <category>opensource</category>
    </item>
    <item>
      <title>ETHEReact - Decentralized E-Commerce using Ethereum &amp; ReactJS</title>
      <dc:creator>Pruthvi Kumar</dc:creator>
      <pubDate>Sun, 14 Oct 2018 07:48:17 +0000</pubDate>
      <link>https://forem.com/pruthvikumarbk/ethereact---decentralized-e-commerce-using-ethereum--reactjs-blc</link>
      <guid>https://forem.com/pruthvikumarbk/ethereact---decentralized-e-commerce-using-ethereum--reactjs-blc</guid>
      <description>

</description>
      <category>blockchain</category>
      <category>ethereum</category>
      <category>react</category>
      <category>fullstack</category>
    </item>
  </channel>
</rss>
