<?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: Eeshaan Sawant</title>
    <description>The latest articles on DEV Community by Eeshaan Sawant (@sawanteeshaan).</description>
    <link>https://dev.to/sawanteeshaan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1143865%2Fe35833fa-354f-4cfa-9605-3f56a777eb45.webp</url>
      <title>DEV Community: Eeshaan Sawant</title>
      <link>https://dev.to/sawanteeshaan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sawanteeshaan"/>
    <language>en</language>
    <item>
      <title>Prisma isn’t just an ORM anymore.</title>
      <dc:creator>Eeshaan Sawant</dc:creator>
      <pubDate>Sat, 10 Oct 2026 15:03:41 +0000</pubDate>
      <link>https://dev.to/sawanteeshaan/prisma-isnt-just-an-orm-anymore-2i45</link>
      <guid>https://dev.to/sawanteeshaan/prisma-isnt-just-an-orm-anymore-2i45</guid>
      <description>&lt;h2&gt;
  
  
  The Evolution of Prisma
&lt;/h2&gt;

&lt;p&gt;If you are a developer, especially a front-end or a full-stack developer since before the AI era, you most definitely have heard of Object Relational Mappers (ORMs). Prisma is a company that made one of the popular ORMs, the Prisma ORM, a lightweight contract layer between your application code and your database, that allowed you to talk to your database without the need to write SQL queries.&lt;/p&gt;

&lt;p&gt;Today, Prisma has a whole product suite that makes it easier for you to build, deploy and scale your application. It consists of Prisma Postgres, a managed PostgreSQL database on the cloud, Prisma Compute, the deploy infrastructure and Prisma Composer - a tool that sets up all the parts of your app from one file. But this wasn’t always the case.&lt;/p&gt;

&lt;p&gt;Prisma started as a “backend as a service” company back in 2016, and it was named &lt;em&gt;Graphcool&lt;/em&gt;, inspired (I assume) by the technology behind it — GraphQL, a then new query language to query your backend. With Graphcool, you described your data, and Graphcool created a database plus a GraphQL API for it, ran both on its own servers, and handled things like user login and file uploads. You as a developer only had to build the front of your app, which is why it was called "backend as a service”.&lt;/p&gt;

&lt;p&gt;A couple years later, the company decided to open source the engine that powered Graphcool and release it on its own, which was called Prisma 1. This first version, Prisma 1, moved away completely from hosting your backend. You wrote your own server with your own logic, and Prisma 1 ran as another server between the code and your database, still powered by GraphQL, effectively turning the database into a GraphQL API your code could query. In 2020 the team rewrote the product from scratch as Prisma 2. There was no proxy server and no GraphQL layer anymore, just an open-source library that ran inside your application. The data was described in a schema file, and Prisma generated code to read and write it, checking your queries for mistakes before they ever run. Graphcool and Prisma 1 both were soon archived, and Prisma 2 became the Prisma ORM most developers know today. With Prisma 8 just released, the ORM has evolved quite a lot over the years, and has undergone some prominent changes, like moving away from the Rust-based client in exchange for TypeScript. Read more about the launch of &lt;a href="https://www.prisma.io/blog/announcing-prisma-orm-7-0-0" rel="noopener noreferrer"&gt;Prisma 7&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;As someone working in Developer Relations, I naturally have to present a lot of talks on different stages, and I often end up sharing a number of QRs and links, without ever knowing who scanned them, how and when. I have tried &lt;a href="https://qrfy.com" rel="noopener noreferrer"&gt;QRFY&lt;/a&gt; before, so I know exactly the features I wanted. To solve this problem, I built a similar tool called &lt;strong&gt;Snip&lt;/strong&gt;, a link shortener that makes QR codes and tells me the number of scans.&lt;/p&gt;

&lt;p&gt;The working of the app is relatively simple. You paste a link (for example, a link to your social profile), you get a QR code asset that you can download, and a standalone link you can share/forward. I had an unused domain with me that I bought off &lt;a href="https://www.hostinger.com/in" rel="noopener noreferrer"&gt;Hostinger&lt;/a&gt; a while ago, which I am also planning to use.&lt;/p&gt;

&lt;p&gt;Because every scan passes through Snip first, I can see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;how many people scanned the QR code and how many clicked the plain link&lt;/li&gt;
&lt;li&gt;which device and browser was used&lt;/li&gt;
&lt;li&gt;visits per day&lt;/li&gt;
&lt;li&gt;the last 20 visits, refreshing every 10 seconds, so I can watch scans come at the end of any conference/event&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The tool also ignores bots. When you paste a link into LinkedIn, Slack, or WhatsApp, their servers open it to build a preview. The bots are redirected, but are left out of the counts, so I get a realistic number of scans and clicks.&lt;/p&gt;

&lt;p&gt;I paired all of this with a simple password-protected dashboard, where I can create links, download QRs, delete old links or track the numbers for a given link.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqvnb9t2p3fpatyzu2vhr.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqvnb9t2p3fpatyzu2vhr.png" alt="The app interface" width="800" height="304"&gt;&lt;/a&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%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4v3fhhithsfmvk1ehui6.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4v3fhhithsfmvk1ehui6.png" alt="Link dashboard" width="800" height="872"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How Snip is put together
&lt;/h3&gt;

&lt;p&gt;Snip uses every part of the Prisma stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prisma ORM latest&lt;/strong&gt; describes the data: links, visits, and daily totals.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prisma Postgres&lt;/strong&gt; as the database to store the data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prisma Compute&lt;/strong&gt; runs the web app, the redirect, and the dashboard.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prisma Object Storage&lt;/strong&gt; holds the QR code images.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Composer’s scheduled jobs&lt;/strong&gt; add up each day’s visits every 6 hours.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prisma Composer&lt;/strong&gt; ties it all together in one file that describes every part above.&lt;/li&gt;
&lt;/ul&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fokzzl1fk5gmf8q4rw83w.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fokzzl1fk5gmf8q4rw83w.png" alt="Design flowchart of the app" width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Development Experience
&lt;/h2&gt;

&lt;p&gt;The fairest way to test the Prisma stack’s capabilities in 2026 was the 2026 way — using a coding agent. There is no point hiding such things anymore. LLMs have gotten very good with coding over the last few years, especially with web apps. Top models now &lt;a href="https://benchlm.ai" rel="noopener noreferrer"&gt;solve over 85% of the tasks&lt;/a&gt; on SWE-bench Verified, making them the de facto standard for writing code now and in the future to come. Prisma was quick to realize this, and is actively pushing for an agent-first development experience. The headline on their website says: “Your TypeScript app, from prompt to production”, which is true, because I was indeed able to get the first draft of my app running in under 30 minutes, with minimal human effort involved.&lt;/p&gt;

&lt;p&gt;I used the Claude Sonnet 5.5 model with high effort settings through the Claude Code extension for VS Code.&lt;/p&gt;

&lt;h3&gt;
  
  
  What my agent did
&lt;/h3&gt;

&lt;p&gt;My agent started with Prisma’s full-stack tutorial with a fairly simple idea — a QR tracker that will help me track scans and link-clicks. The project was easy to setup with the Prisma scaffold. The initial build was a Hono application, a PostgreSQL database, a typed ORM client, and the configuration needed to run on Prisma Compute. It built and ran the starter app locally before moving on to the actual application. There were a couple of setup snags along the way, like an &lt;em&gt;npm&lt;/em&gt; version mismatch, but the agent handled it with ease.&lt;/p&gt;

&lt;p&gt;After the basic setup worked, the agent replaced the tutorial’s example data with the application’s core models: links and visits. It implemented short-link redirects, QR and ordinary-link source tracking, device and browser detection, referrer capture, and bot filtering. It also built the dashboard, QR-code generation and downloads, and a scheduled job to aggregate visits by day and source.&lt;/p&gt;

&lt;p&gt;Once the core features were in place, I asked the agent to test how the application would behave with a larger dataset. It seeded the database with 50,000 test visits across 20 links and built a load-testing script to measure response times, including the time spent executing database queries. The results revealed some performance bottlenecks, which the agent addressed by adding a composite index to help PostgreSQL find the relevant visit records more efficiently. After deploying the change and running the tests again, the median server-side query time dropped from 37.6 ms to 16.5 ms, a &lt;strong&gt;56% reduction&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;TIP: It is always efficient to prompt your agent to work on one feature at a time. This leads to clearer logic and fewer hallucinations, since the AI isn’t juggling multiple responsibilities at once.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After all of this, the app finally looked promising, and was ready to be deployed. Before deploying it on Prisma’s servers, I did what every engineer today is doing: &lt;del&gt;write code&lt;/del&gt; review code. Carefully, line by line. Some more minor changes later, built the app and deployed it to Prisma Compute with &lt;code&gt;npx prisma deploy module.ts&lt;/code&gt;. The deployment provisioned the PostgreSQL database, applied the schema migrations, configured the application’s database connection, and deployed the service. I tested the live endpoints, created a link through the dashboard, scanned some QR codes. Everything looked good. I was happy with the results.&lt;/p&gt;

&lt;h3&gt;
  
  
  How does Prisma help the agent do better?
&lt;/h3&gt;

&lt;p&gt;Giving an AI agent access to a terminal and asking it to build an application also means giving it the right tools, up-to-date documentation, and instructions for working with your stack. After building Snip, I am confident that Prisma is taking a step in the right direction.&lt;/p&gt;

&lt;h4&gt;
  
  
  Protocolizing the Portfolio with Model Context Protocol (MCP)
&lt;/h4&gt;

&lt;p&gt;Prisma has exposed its entire product lifecycle—from local development to cloud databases—as standard tools using Anthropic's &lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt;. They do this through two key servers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Local Prisma MCP Server: AI agents the ability to introspect database schemas, write error-free migrations, check migration status, and launch Prisma Studio right from within code editors like Cursor or Claude Code.&lt;/li&gt;
&lt;li&gt;Remote Prisma MCP Server: Exposes infrastructure management capabilities. AI agents can natively provision new &lt;strong&gt;Prisma Postgres&lt;/strong&gt; instances, fetch secure connection strings, manage database instances, and configure automated backups using safe, tool-calling APIs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Read more about &lt;a href="https://www.prisma.io/mcp" rel="noopener noreferrer"&gt;Prisma MCP Server&lt;/a&gt; here.&lt;/p&gt;

&lt;h4&gt;
  
  
  Handling AI Hallucinations with Prisma skills
&lt;/h4&gt;

&lt;p&gt;One of the biggest challenges with AI-generated code is that models can rely on outdated APIs and patterns. Prisma addresses this with Agent Skills: structured instructions that give coding agents version-specific knowledge about its products. The skills cover everything from CLI commands and database migrations to ORM APIs and deployment workflows. Once installed, an agent can reference them automatically when working on a relevant task. Prisma Skills follow the open &lt;a href="https://agentskills.io/" rel="noopener noreferrer"&gt;Agent Skills&lt;/a&gt; format.&lt;/p&gt;

&lt;p&gt;You can easily add all the skills to your project by running the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add prisma/skills
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;with an option to install only the ones you need.&lt;/p&gt;

&lt;h4&gt;
  
  
  Documentation for agents
&lt;/h4&gt;

&lt;p&gt;Having worked in technical writing, I care deeply about documentation and like to associate it with measurable outcomes, both for developer experience and, increasingly, agent experience. Documentation has always been an important part of the equation, even more so now that humans aren’t the only ones reading it. What I particularly liked about Prisma’s documentation was the availability of an &lt;code&gt;llms.txt&lt;/code&gt; file, Markdown versions of documentation pages, and consistent semantics across most of the documentation.&lt;/p&gt;

&lt;p&gt;During development, my agent could consult the documentation to understand how Prisma’s products worked together, investigate errors, and navigate unfamiliar parts of the stack.&lt;/p&gt;

&lt;p&gt;Beyond these three, Prisma is also thinking about what it takes to use AI agents safely in production. Features like agent enrollment and safeguards against destructive commands help developers control what agents can access and which operations they can perform, and with native &lt;code&gt;pgvector&lt;/code&gt; support, Prisma Postgres can also serve as the foundation for applications that use vector embeddings.&lt;/p&gt;

&lt;p&gt;Ultimately, these pieces complement each other. They make it easier for an agent to move beyond generating code and work through the broader development lifecycle.&lt;/p&gt;

&lt;h3&gt;
  
  
  So, is Prisma’s Stack a perfect option for you?
&lt;/h3&gt;

&lt;p&gt;Choosing Prisma for your next application comes down to a few key points. I wouldn’t call any stack a perfect fit for every project, and Prisma’s is no exception. But if you’re experimenting with AI-assisted development, or are increasingly leaning towards vibe-coded web apps, it’s worth looking at how its ORM, Postgres, and Compute fit together well. I was able to go from a simple idea to a working application, deploy it, and investigate performance bottlenecks without having to manage every piece of infrastructure myself. If you want to take a look at Snip, just let me know, and I will share the link to the GitHub repository down below. 😉&lt;/p&gt;

&lt;p&gt;If you’re a developer who enjoys experimenting with new tools, or someone curious about what building software with AI agents looks like in practice, I’d encourage you to give it a try. Your experience will depend on the complexity of your project and how much control you want over the underlying infrastructure, but building a small project is always a good way to find out whether the stack works for you.&lt;/p&gt;

&lt;p&gt;The easiest way to get started is with Prisma’s &lt;a href="https://www.prisma.io/docs/full-stack-tutorial" rel="noopener noreferrer"&gt;full-stack tutorial&lt;/a&gt;. It walks you through setting up an application with Prisma’s stack and gives you a starting point you can build on. &lt;a href="https://www.prisma.io/postgres" rel="noopener noreferrer"&gt;Prisma Postgres&lt;/a&gt; and &lt;a href="https://www.prisma.io/compute" rel="noopener noreferrer"&gt;Prisma Compute&lt;/a&gt; both offer free plans (no credit card required), so you can experiment with building and deploying an application before committing to a paid plan.&lt;/p&gt;

&lt;p&gt;The Prisma Postgres free plan includes &lt;strong&gt;1.01 GB of storage, 200,000 database operations per month, and up to 50 databases&lt;/strong&gt;. Compute adds a separate allowance for hosting your application: &lt;strong&gt;1 million requests, 360 GB-hours of memory, 4 vCPU-hours of active CPU time, and 10 GB of outbound bandwidth per month&lt;/strong&gt;. Your application also scales to zero when idle, so it doesn’t consume compute resources while it’s not running. These allowances are shared across your workspace. In case you outgrow the free tier, Prisma's paid plans start from &lt;strong&gt;$10 per month.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are two ways to create a Prisma Postgres database from your terminal. Create a database without an account:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-db@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or, if you already have a Prisma account, you can use the Prisma CLI to create a database directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx prisma postgres create
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once your database is ready, you can connect it to your application, explore Prisma ORM, and deploy your app to Compute. If you’re using an AI coding agent, I’d also recommend setting up the relevant &lt;a href="https://www.prisma.io/docs/ai/tools/skills" rel="noopener noreferrer"&gt;Prisma Agent Skills&lt;/a&gt; as mentioned in the section above.&lt;/p&gt;

&lt;p&gt;My advice? &lt;strong&gt;Start small, get something running, and then see how far you can take it.&lt;/strong&gt; You don't need an ambitious idea to explore the stack. I started with a simple QR tracker, and it turned into a useful experiment I will probably continue to use.&lt;/p&gt;




&lt;p&gt;That concludes my thoughts on Prisma’s latest developments. These are interesting times for software development, and it is good to see a company adapt early.&lt;/p&gt;

&lt;p&gt;Thank you for reading if you made it till here. Please check out other articles I have written, and if this one helped you in any way, consider subscribing. It’s free. If this blog even remotely motivated you to try (or retry) Prisma, I would love to hear your thoughts on how it went. The comments are open. :)&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Build an ONLYOFFICE macro that adds comments to every instance of a word in the Text Editor</title>
      <dc:creator>Eeshaan Sawant</dc:creator>
      <pubDate>Wed, 06 Dec 2023 19:07:10 +0000</pubDate>
      <link>https://dev.to/sawanteeshaan/build-an-onlyoffice-macro-that-adds-comments-to-every-instance-of-a-word-in-the-text-editor-4ccj</link>
      <guid>https://dev.to/sawanteeshaan/build-an-onlyoffice-macro-that-adds-comments-to-every-instance-of-a-word-in-the-text-editor-4ccj</guid>
      <description>&lt;p&gt;When working on documents, there are times when it’s essential to include a comment for a specific word that appears repeatedly throughout the text.  In this blog-post, we will show you how you can efficiently add comments to every instance of a specific word, streamlining your editing process and enhancing document clarity.&lt;/p&gt;




&lt;h2&gt;
  
  
  Building the macro
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;function addCommentToWord() {&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;addCommentToWord()&lt;/em&gt; function is designed to add comments to every occurrence of a specified word within the document.&lt;/p&gt;

&lt;p&gt;Here’s a breakdown of its key components:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const oDocument = Api.GetDocument();&lt;br&gt;
   const numberOfElements = oDocument.GetElementsCount();&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here, we get the current document in the &lt;em&gt;oDocument&lt;/em&gt; variable. Next, we get all the elements in the document using the &lt;em&gt;GetElementsCount()&lt;/em&gt; method.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;code&gt;&amp;nbsp; for (&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; let elementIndex = 0;&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; elementIndex &amp;lt; numberOfElements;&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; elementIndex++&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ) &lt;br&gt;
&lt;/code&gt;&lt;br&gt;
A &lt;em&gt;for loop&lt;/em&gt; is used here to &lt;em&gt;iterate&lt;/em&gt; through all the elements. Doing this adds a comment to the desired word in every element (paragraph) of the document.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const oElement = oDocument.GetElement(elementIndex);&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const rawText = oElement.GetText();&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Inside the for loop, we get each element of the document by the &lt;em&gt;GetElement&lt;/em&gt; method and passing in the &lt;em&gt;elementIndex&lt;/em&gt; . Then, we extract the plain text in the &lt;em&gt;rawText&lt;/em&gt; variable.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const targetWord = "sample word";&lt;br&gt;
&amp;nbsp; &amp;nbsp; let count = 0;&lt;br&gt;
&amp;nbsp; &amp;nbsp; for (let i = 0; i &amp;lt; targetWord.length; i++) {&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; count++;&lt;br&gt;
&amp;nbsp; &amp;nbsp; }&lt;br&gt;
&amp;nbsp; &amp;nbsp; const wordLength = count - 1;&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Here, we set the word we want our comments to be on. Next, we calculate the length of the word using a &lt;em&gt;for loop&lt;/em&gt;, and store it in &lt;em&gt;wordLength&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;nbsp;const wordRegex = new RegExp("\\b" + targetWord + "\\b", "gi");&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Then, a regular expression (&lt;em&gt;wordRegex&lt;/em&gt;) is created using the target word to find all occurrences in the document.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let match;&lt;br&gt;
&amp;nbsp; &amp;nbsp; while ((match = wordRegex.exec(rawText)) !== null) {&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; let matchPosition = match.index; &lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; let nextMatchPosition = matchPosition + wordLength;&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; const comment = "YOUR COMMENT GOES HERE";&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; const oParagraph = oDocument.GetElement(0);&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; const range = oParagraph.GetRange(matchPosition, nextMatchPosition);&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; range.AddComment(comment, "Comment's Author Name");&lt;br&gt;
       }&lt;br&gt;
&amp;nbsp; &amp;nbsp; } &lt;br&gt;
&amp;nbsp; }&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Here, inside a &lt;em&gt;while loop&lt;/em&gt;, we &lt;em&gt;iterate&lt;/em&gt; through all the instances found and stored in &lt;em&gt;wordRegex&lt;/em&gt;. &lt;br&gt;
For each match, the starting position of the word (&lt;em&gt;matchPosition&lt;/em&gt;) and the position of the next character after the word (&lt;em&gt;nextMatchPosition&lt;/em&gt;) are calculated. &lt;br&gt;
The &lt;em&gt;comment&lt;/em&gt; variable holds the comment you want to insert. The &lt;em&gt;AddComment&lt;/em&gt; method has an optional parameter which can be used to alter the author’s name. If you don’t want to use it, you can exclude the optional parameter, and just pass in the comment variable.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;addCommentToWord();&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Finally, the &lt;em&gt;addCommentToWord&lt;/em&gt; function is called.&lt;/p&gt;
&lt;h2&gt;
  
  
  The full macro code
&lt;/h2&gt;

&lt;p&gt;Here is the enitre code of the macro:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(function () {
  function addCommentToWord() {
    const oDocument = Api.GetDocument();
    const numberOfElements = oDocument.GetElementsCount();

    //looping through all the elements in the document.
    for (
        let elementIndex = 0;
        elementIndex &amp;lt; numberOfElements;
        elementIndex++
      ) {
        const oElement = oDocument.GetElement(elementIndex);
        const rawText = oElement.GetText();

      // Specify the target word and the length of the word
      const targetWord = "sample word";
      let count = 0;
      for (let i = 0; i &amp;lt; targetWord.length; i++) {
        count++;
      }
      const wordLength = count - 1;

      // Find all occurrences of the target word in the document
      const wordRegex = new RegExp("\\b" + targetWord + "\\b", "gi");
      let match;
      while ((match = wordRegex.exec(rawText)) !== null) {

        let matchPosition = match.index; // returns the index where the word starts.
        let nextMatchPosition = matchPosition + wordLength; //the index where the word ends.

        // Add a comment at the position of the match
        const comment = "YOUR COMMENT GOES HERE";
        const range = oElement.GetRange(matchPosition, nextMatchPosition);
        range.AddComment(comment, "Comment's Author Name");
      }
    }
  }

  addCommentToWord();
})();

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

&lt;/div&gt;



&lt;p&gt;Now, let us see how our macro performs.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/dy-QRGM7Hpo" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;br&gt;
I trust this macro made handling repetitive word comments a breeze, providing a handy tool for users dealing with the document editor in ONLYOFFICE.&lt;br&gt;
Don’t miss the chance to harness the power of the ONLYOFFICE API.  If you have any questions or innovative concepts, I encourage you to &lt;a href="https://www.onlyoffice.com/contacts.aspx?utm_source=blog&amp;amp;utm_medium=article+&amp;amp;utm_id=comment_word_macro" rel="noopener noreferrer"&gt;share them with the ONLYOFFICE Team&lt;/a&gt;. Best of luck in your exploratory endeavors!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Useful links&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://api.onlyoffice.com/plugin/macrosamples/?utm_source=blog&amp;amp;utm_medium=article+&amp;amp;utm_id=comment_word_macro" rel="noopener noreferrer"&gt;Macro samples&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ONLYOFFICE" rel="noopener noreferrer"&gt;ONLYOFFICE on GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://api.onlyoffice.com/docbuilder/textdocumentapi?utm_source=blog&amp;amp;utm_medium=article+&amp;amp;utm_id=comment_word_macro" rel="noopener noreferrer"&gt;ONLYOFFICE Text Document API&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.onlyoffice.com/blog/search?s=macro&amp;amp;utm_source=blog&amp;amp;utm_medium=article+&amp;amp;utm_id=comment_word_macro" rel="noopener noreferrer"&gt;Other macros&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  About Me
&lt;/h2&gt;

&lt;p&gt;I am Eeshaan, a senior studying Computer Science in Pune, India. I am fond of Open-Source, Web Development, and Technical Writing. Feel free to give me a follow on my &lt;a href="https://twitter.com/sawanteeshaan" rel="noopener noreferrer"&gt;Twitter (now X)&lt;/a&gt;, if my blog was of any use to you. Cheers. 🍻&lt;/p&gt;

</description>
    </item>
    <item>
      <title>From Rookie to Remarkable: Navigating my Internship experience at ONLYOFFICE</title>
      <dc:creator>Eeshaan Sawant</dc:creator>
      <pubDate>Sun, 22 Oct 2023 15:41:16 +0000</pubDate>
      <link>https://dev.to/sawanteeshaan/from-rookie-to-remarkable-navigating-my-internship-experience-at-onlyoffice-20ga</link>
      <guid>https://dev.to/sawanteeshaan/from-rookie-to-remarkable-navigating-my-internship-experience-at-onlyoffice-20ga</guid>
      <description>&lt;p&gt;In June, I was chosen to participate in the &lt;a href="https://summer-ospp.ac.cn/" rel="noopener noreferrer"&gt;Open Source Promotion Plan (OSPP)&lt;/a&gt; with &lt;a href="//www.onlyoffice.com"&gt;ONLYOFFICE&lt;/a&gt;. Over the course of my three-month internship, I absorbed tremendous amount of knowledge and skills that have enriched my professional growth, both, as a student, and as a professional. I've already shared insights in a &lt;a href="https://dev.to/sawanteeshaan/how-i-got-into-ospp-2023-with-onlyoffice-experience-and-journey-4756"&gt;previous blog&lt;/a&gt; about getting started, choosing organizations, stipends, and more—it acts as a prequel to this one. If you haven't had a chance to read it yet, I highly recommend doing so before diving into this blog. In this blog, I will guide you through the experience as an OSPP intern at ONLYOFFICE.&lt;/p&gt;

&lt;h1&gt;
  
  
  A guide through the timeline of OSPP
&lt;/h1&gt;

&lt;p&gt;Program preparation typically kicks off in late March or early April. If you find the timeline for this year's program on &lt;a href="https://summer-ospp.ac.cn/" rel="noopener noreferrer"&gt;the official OSPP website&lt;/a&gt; confusing, don't fret. I'll do my best to quickly guide you through it and simplify the process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project Release
&lt;/h3&gt;

&lt;p&gt;This marks the phase when accepted projects from various open-source organizations are announced and showcased on the website following a thorough review by the OSPP committee. For those considering future program applications, it's advisable to keep checking the Project Release dates.&lt;/p&gt;

&lt;h3&gt;
  
  
  Registration and Application
&lt;/h3&gt;

&lt;p&gt;During this period, you'll register for the program and submit your proposal (application) under your desired organization through your dashboard. This phase typically spans around 1.5 to 2 months.&lt;/p&gt;

&lt;h3&gt;
  
  
  Application review and Internship Experience
&lt;/h3&gt;

&lt;p&gt;Following the closure of the program registration and application submission deadline, student applications undergo a thorough review process, usually done by the mentors, spanning approximately one month. If your application is selected, you will receive a notification email on the day the results are announced.&lt;br&gt;
If you are selected, Congratulations on your selection! Brace yourself for an exciting three-month journey ahead!&lt;/p&gt;

&lt;p&gt;After your selection, the process is pretty easy, and your mentor will get in touch with you for further discussions. &lt;/p&gt;

&lt;h1&gt;
  
  
  The experience at ONLYOFFICE
&lt;/h1&gt;

&lt;p&gt;The moment I glimpsed the email declaring my selection, I was surprised. More than just the joy of being chosen, what truly astonished me was the opportunity to work with ONLYOFFICE—an MNC with a global presence spanning multiple countries and regions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Onboarding
&lt;/h3&gt;

&lt;p&gt;The day after the results were announced, one of my mentor Mona Ai reached out, extending congratulations and guiding me through the onboarding process. Shortly after, we had an introductory meeting where both my mentors, Sergei and Mona, introduced themselves, and I did the same.&lt;/p&gt;

&lt;h3&gt;
  
  
  Development Phase
&lt;/h3&gt;

&lt;p&gt;After a series of initial meetings and introductions, we were all set to kick off the development phase. The best part? Everything—from meetings to development—was fully remote, allowing me to participate right from the comfort of my home. Despite my mentors residing in different time zones, they were considerate enough to choose meeting times that aligned with my local time.  We strategically established a weekly meeting cadence, convening every Monday to delve into comprehensive discussions surrounding project updates and progress.&lt;/p&gt;

&lt;p&gt;Over the course of these months, I had the invaluable opportunity to learn extensively from my mentor, Sergei Kosyrev, a seasoned technical writer at ONLYOFFICE. From minor syntax errors to significant flaws in functions, Sergei demonstrated unwavering patience in guiding me through every line of code I found challenging. At the end of the development process, the code repository was finally merged, along with huge success. &lt;/p&gt;

&lt;p&gt;After months of intensive meetings and iterative changes, the project development had, at last, reached its culmination.Sergei ultimately merged the code repository, marking a momentous success. &lt;/p&gt;

&lt;p&gt;As I am writing this blog, the project is being reviewed by my mentors and the OSPP technical Committee. The mentors, Mona and Sergei, regularly check in on my progress and well-being, creating a supportive and encouraging atmosphere throughout the entire experience.&lt;/p&gt;

&lt;p&gt;As I bring this blog to a close, I can't help but emphasize the remarkable internship journey at ONLYOFFICE—an experience that I sincerely hope will linger as a high point, contributing to the ongoing narrative of my professional growth.&lt;/p&gt;

&lt;p&gt;I wish it had never ended. 😢&lt;/p&gt;

&lt;h2&gt;
  
  
  About Me
&lt;/h2&gt;

&lt;p&gt;I am Eeshaan, a sophomore studying Computer Science in Pune, India. I am fond of Open-Source, Web Development, and Technical Writing. Feel free to give me a follow on my &lt;a href="https://twitter.com/sawanteeshaan" rel="noopener noreferrer"&gt;Twitter (now X)&lt;/a&gt;, if my blog was of any use to you. Cheers. 🍻&lt;/p&gt;

</description>
      <category>macro</category>
      <category>spreadsheet</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How I got into OSPP 2023 with ONLYOFFICE</title>
      <dc:creator>Eeshaan Sawant</dc:creator>
      <pubDate>Tue, 22 Aug 2023 21:06:57 +0000</pubDate>
      <link>https://dev.to/sawanteeshaan/how-i-got-into-ospp-2023-with-onlyoffice-experience-and-journey-4756</link>
      <guid>https://dev.to/sawanteeshaan/how-i-got-into-ospp-2023-with-onlyoffice-experience-and-journey-4756</guid>
      <description>&lt;p&gt;In June this year, I submitted my final draft of the proposal on the OSPP site for the ONLYOFFICE Organisation, and made it in. This was my second attempt at OSPP. The first attempt was for the 2022 program last year in May, which, unfortunately, I couldn’t make in. In this Blog Post, I will take you through the Journey as an ONLYOFFICE Intern, OSPP Participant, how to apply, increase your chances, and much more. &lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;What is OSPP?&lt;/h2&gt;

&lt;p&gt;The Open-Source Promotion Plan, abbreviated OSPP, is a China based, Open – Source program, held in the Summers, between the months of May – October. Check the 2023 timeline &lt;a href="https://summer-ospp.ac.cn/help/en/timeline/" rel="noopener noreferrer"&gt;here&lt;/a&gt;. The registration process is fairly easy, and just consists of verifying your student status and the identity on the &lt;a href="https://summer-ospp.ac.cn/help/en/" rel="noopener noreferrer"&gt;OSPP website&lt;/a&gt;.&lt;br&gt;
Although OSPP is a China based program and intended for Chinese students, students from any part of the world can apply, just like me. A great example and a similar program to the OSPP is the well-known &lt;a href="https://summerofcode.withgoogle.com/" rel="noopener noreferrer"&gt;Google Summer of Code (GSOC)&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;After registering, go through all the available projects, listed by different organisations. Some organisations may have a Chinese applicant requirement (one who can communicate in Chinese), so I would recommend a project which has English as their primary or secondary language. &lt;br&gt;
The project can have either a “Basic” difficulty level, or an “Advanced” difficulty level. The amount of work you will need to do is different for both, and so is the Stipend. &lt;br&gt;
After you chose your project, you will need to work on a proposal, and submit it before the deadline.&lt;br&gt;
There can be (and most certainly will be) more than one applicant applying to a particular project, so your proposal and resume need to stand out amongst others. You can start early, get in touch with the project mentors, discuss your methodologies and even solve some “good first issues” in the respective organisation’s GitHub Repository, to increase your chances.&lt;/p&gt;

&lt;h2&gt;Organisation, Project, Mentors and the Experience&lt;/h2&gt;

&lt;p&gt;The project I had applied for was one of the two projects ONLYOFFICE had, &lt;u&gt;Creating an ONLYOFFICE Macro that inserts Baidu Search Results into the Spreadsheet&lt;/u&gt;. I put in my proposal almost an hour before the deadline, and luckily made it through. &lt;/p&gt;

&lt;h4&gt;About ONLYOFFICE&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://www.onlyoffice.com/" rel="noopener noreferrer"&gt;ONLYOFFICE &lt;/a&gt;is a collaborative office suite for creating, editing, and sharing documents, spreadsheets, and presentations. It offers real-time collaboration, integrates with popular platforms, emphasizes security, and can be used in the cloud or self-hosted environments. It's a versatile solution for teams and individuals seeking a comprehensive and customizable office productivity tool. Check out their GitHub &lt;a href="https://github.com/ONLYOFFICE" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As soon as the development phase began, we started researching for the required API References. After a lot of research, error logs, and questions, the first prototype of the macro code file was ready, roughly around 2 weeks into the project. If you want to know more about ONLYOFFICE Macros and how they work, you can check them out &lt;a href="https://www.onlyoffice.com/app-directory/macros" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;br&gt;
A huge thanks and a shoutout to my mentors Mona and Sergei, who believed in me, and kept answering my silly questions until they were cleared. &lt;br&gt;
As I am writing this blog post, we are currently working on final checks, tests, and enhancing the User Experience, and even working on a more advanced version of the Macro with added functionality.&lt;/p&gt;

&lt;p&gt;Once the Project is completed, a Blogpost on the Entire Project, its functionality, documentation, and hands-on tutorial will be published on the ONLYOFFICE website (will link it when it is out). Stay tuned for that if you want to know about the tech and concepts used for development.&lt;/p&gt;

&lt;h2&gt;About Me&lt;/h2&gt;

&lt;p&gt;I am Eeshaan, a sophomore studying Computer Science in Pune, India. I am fond of Open-Source, Web Development, and Technical Writing. Feel free to give me a follow on my &lt;a href="https://twitter.com/sawanteeshaan" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; (now X), if my blog was of any use to you. Cheers. 🍻&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>opensource</category>
      <category>javascript</category>
      <category>node</category>
    </item>
  </channel>
</rss>
