<?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: Chirag Jain</title>
    <description>The latest articles on DEV Community by Chirag Jain (@chirgjin).</description>
    <link>https://dev.to/chirgjin</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%2F911188%2Faa867f21-da48-4fec-b11f-b0eb68f78238.png</url>
      <title>DEV Community: Chirag Jain</title>
      <link>https://dev.to/chirgjin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chirgjin"/>
    <language>en</language>
    <item>
      <title>TrackMyEvents - An event tracking platform</title>
      <dc:creator>Chirag Jain</dc:creator>
      <pubDate>Mon, 20 Feb 2023 14:51:39 +0000</pubDate>
      <link>https://dev.to/chirgjin/trackmyevents-an-event-tracking-platform-359</link>
      <guid>https://dev.to/chirgjin/trackmyevents-an-event-tracking-platform-359</guid>
      <description>&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;I built an event tracking system which enables users to track the activity on their applications (web or mobile) using a simple API call. It provides the user with various analytics like daily active users over the last month, page-wise event data &amp;amp; many more.&lt;/p&gt;

&lt;h3&gt;
  
  
  Category Submission:
&lt;/h3&gt;

&lt;p&gt;Smooth Shifters&lt;br&gt;
Integration Innovators&lt;/p&gt;

&lt;h3&gt;
  
  
  App Link
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://track-my-events.vercel.app/"&gt;https://track-my-events.vercel.app/&lt;/a&gt;&lt;br&gt;
Login Credentials:&lt;br&gt;
Email: &lt;a href="mailto:test@example.com"&gt;test@example.com&lt;/a&gt;&lt;br&gt;
Password: testpassword&lt;/p&gt;

&lt;h3&gt;
  
  
  Screenshots
&lt;/h3&gt;

&lt;p&gt;Dashboard&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vjHMNhok--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c192rm0wngmzwf52c4jf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vjHMNhok--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c192rm0wngmzwf52c4jf.png" alt="Dashboard" width="880" height="516"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Profile&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--k3JE2ETL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o1chdy64pc5rjjsun9kw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k3JE2ETL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o1chdy64pc5rjjsun9kw.png" alt="Profile" width="880" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDK Setup&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pwvOijbj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rt3ebai7w7lqhflpcmh3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pwvOijbj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rt3ebai7w7lqhflpcmh3.png" alt="SDK Setup" width="880" height="439"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Login&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ptMm6wLR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/18wh3fhtmvyb7anw483k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ptMm6wLR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/18wh3fhtmvyb7anw483k.png" alt="Login" width="880" height="442"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Register&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--X5BrSqJi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x3qu9fqropum1esk50ne.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--X5BrSqJi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x3qu9fqropum1esk50ne.png" alt="Register" width="880" height="442"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Description
&lt;/h3&gt;

&lt;p&gt;TrackMyEvents is a platform based on a microservices architecture which enables users to track the activity on their applications (web or mobile) using a simple API call. It provides the user with various analytics like daily active users over the last month, page-wise event data &amp;amp; many more.&lt;/p&gt;

&lt;p&gt;The tracking system uses PostgreSQL as its primary database &amp;amp; Redis Pub/Sub for queuing events to store events in the database asynchronously. React is used for the frontend.&lt;/p&gt;

&lt;h3&gt;
  
  
  Link to Source Code
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/chirgjin/track-my-events"&gt;https://github.com/chirgjin/track-my-events&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Permissive License
&lt;/h3&gt;

&lt;p&gt;MIT&lt;/p&gt;

&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;Last year, I was looking for an event tracking solution which could provide me with high-level analytics for all the events along with the actual raw data which I can query at my convenience. However, I only found Google Analytics to be affordable and all other solutions were either not suited to my use case or very expensive. Due to this, I thought of making my own tracking solution as a test which proved to be very helpful to my learning.&lt;/p&gt;

&lt;h3&gt;
  
  
  How I built it
&lt;/h3&gt;

&lt;p&gt;Originally, the TrackMyEvents was using RedisStack as its primary database for everything but seeing that there was no managed Redis offering on Linode, I decided to switch Redis to PostgreSQL and used Prisma ORM for interacting with it. This was a new learning experience for me as I had never used Prisma earlier in any of my projects. While using Prisma I found out that while it has many good features (like awesome type safety &amp;amp; auto-completion), Prisma doesn't support DISTINCT in aggregations. In the tracking service, I had to compute various analytics for the users &amp;amp; most of them required COUNT DISTINCT functionality which led me to write raw queries for the analytic APIs which was also very fun &amp;amp; a new experience for me.&lt;/p&gt;

&lt;p&gt;When building this project, I utilized Linode for various purposes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Managed PostgreSQL: I used a separate managed PostgreSQL database provided by Linode for tracking &amp;amp; user service&lt;/li&gt;
&lt;li&gt;Linode: I used a 1GB Nanode to host my Redis server for pub/sub &amp;amp; a 2 GB Linode to host all the 3 microservices.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;During all of my earlier projects I used to follow Digital Ocean's guide for the VM's initial server setup but this time I followed Linode's &lt;a href="https://www.linode.com/docs/products/compute/compute-instances/guides/set-up-and-secure/"&gt;guide&lt;/a&gt; which was quite a nice surprise for me. I found out for the first time about the &lt;code&gt;dpkg-reconfigure&lt;/code&gt; &amp;amp; &lt;code&gt;hostnamectl&lt;/code&gt; commands as well as hardening the SSH Access.&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Resources/Info
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Tech Stack
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Typescript + ExpressJs + Prisma ORM for backend&lt;/li&gt;
&lt;li&gt;Typescript + React.Js for frontend&lt;/li&gt;
&lt;li&gt;PostgreSQL for database&lt;/li&gt;
&lt;li&gt;Redis for Pub/Sub&lt;/li&gt;
&lt;li&gt;Vercel for frontend deployment&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Overall, this was a very fun &amp;amp; challenging hackathon for me. I got to learn many new things from both Linode's documentation as well as Prisma's. The one thing I would definitely take care of is to avoid Prisma when I have to do analytical work next time 😝 and instead look for other alternatives. Another thing I'd like to mention to the Linode team is that while there's a category for EdgeWorkers in this hackathon, I couldn't find any information on EdgeWorkers on their website &amp;amp; even when I filled the form on Akamai's website, I didn't get any response from them.&lt;/p&gt;

&lt;p&gt;Thanks to the Linode &amp;amp; Dev team for this opportunity. I am looking forward to hosting more of my projects on Linode 😁&lt;/p&gt;

</description>
      <category>linodehackathon</category>
      <category>typescript</category>
      <category>postgres</category>
      <category>react</category>
    </item>
  </channel>
</rss>
