<?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: Soumyadip Maity</title>
    <description>The latest articles on DEV Community by Soumyadip Maity (@soumyadip_maity_2025).</description>
    <link>https://dev.to/soumyadip_maity_2025</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3962611%2F481e500e-9fde-4abc-8e7f-eab9c454ef92.jpg</url>
      <title>DEV Community: Soumyadip Maity</title>
      <link>https://dev.to/soumyadip_maity_2025</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/soumyadip_maity_2025"/>
    <language>en</language>
    <item>
      <title>I built a production analytics SaaS solo as a B.Tech student — here's what 4 months taught me</title>
      <dc:creator>Soumyadip Maity</dc:creator>
      <pubDate>Sat, 27 Jun 2026 09:20:45 +0000</pubDate>
      <link>https://dev.to/soumyadip_maity_2025/i-built-a-production-analytics-saas-solo-as-a-btech-student-heres-what-4-months-taught-me-2njc</link>
      <guid>https://dev.to/soumyadip_maity_2025/i-built-a-production-analytics-saas-solo-as-a-btech-student-heres-what-4-months-taught-me-2njc</guid>
      <description>&lt;p&gt;&lt;strong&gt;Why I built it&lt;/strong&gt;&lt;br&gt;
I wanted privacy-first analytics without Mixpanel's complexity or price. So I built my own.&lt;br&gt;
&lt;strong&gt;What it does&lt;/strong&gt;&lt;br&gt;
UCoder Insights tracks real user behavior — sessions, errors, page events — with a clean dashboard and zero third-party data sharing.&lt;br&gt;
Stack: MongoDB timeseries + Redis + Express + React + Next.js. Deployed on Azure with Cloudflare CDN.&lt;/p&gt;

&lt;p&gt;Published npm package: ucoder-insight&lt;br&gt;
What I learned from real users&lt;br&gt;
5 projects are using it in production today. Their feedback directly shaped the product:&lt;br&gt;
Wanted better error tracking UI → built it&lt;br&gt;
Wanted session breakdowns → built it&lt;br&gt;
Wanted richer graphs → built it&lt;br&gt;
College doesn't teach you this. Real users do.&lt;br&gt;
&lt;strong&gt;What's next&lt;/strong&gt;&lt;br&gt;
More integrations, better Core Web Vitals tracking, and hopefully more users.&lt;br&gt;
If you're building something similar or want to try it out:&lt;br&gt;
🔗 insights.ucoder.in&lt;br&gt;
📦 npm install ucoder-insight&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>buildinpublic</category>
      <category>saas</category>
      <category>node</category>
    </item>
    <item>
      <title>I Launched My Analytics Tool 3 Months Ago. It Got 1 Upvote. Here's What I Rebuilt.</title>
      <dc:creator>Soumyadip Maity</dc:creator>
      <pubDate>Sun, 07 Jun 2026 04:16:39 +0000</pubDate>
      <link>https://dev.to/soumyadip_maity_2025/i-launched-my-analytics-tool-3-months-ago-it-got-1-upvote-heres-what-i-rebuilt-50ol</link>
      <guid>https://dev.to/soumyadip_maity_2025/i-launched-my-analytics-tool-3-months-ago-it-got-1-upvote-heres-what-i-rebuilt-50ol</guid>
      <description>&lt;h2&gt;
  
  
  The Original Problem (Still Valid)
&lt;/h2&gt;

&lt;p&gt;Google Analytics sends every user interaction to Google's servers. Every click, every session, every IP address — all of it leaves your infrastructure.&lt;/p&gt;

&lt;p&gt;For developers who care about user trust, that's a problem.&lt;/p&gt;

&lt;p&gt;The alternatives were either expensive (Mixpanel at $28/month), limited (Plausible gives you pageviews but no custom events or error tracking), or painful to self-host (Matomo).&lt;/p&gt;

&lt;p&gt;So I built my own. The idea was solid. The execution needed work.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Was Wrong With v1
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Problem 1: API response time was 3-4 seconds
&lt;/h3&gt;

&lt;p&gt;Every analytics event was being written to MongoDB synchronously, inside the request handler. Under any real load, this meant:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;/log&lt;/code&gt; endpoint was slow&lt;/li&gt;
&lt;li&gt;Events were being dropped&lt;/li&gt;
&lt;li&gt;The tracked application felt the impact&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This was unacceptable for an analytics tool. Analytics should be invisible.&lt;/p&gt;

&lt;h3&gt;
  
  
  Problem 2: Wrong database schema for time-series data
&lt;/h3&gt;

&lt;p&gt;I was storing analytics events as regular MongoDB documents. That works, but it's not optimized for what analytics actually is: &lt;strong&gt;time-ordered data queried by date range.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Queries like "show me the last 7 days" were doing full collection scans.&lt;/p&gt;

&lt;h3&gt;
  
  
  Problem 3: No separation of concerns
&lt;/h3&gt;

&lt;p&gt;User data, analytics events, settings, API keys — all mixed together in MongoDB. No relational integrity, no proper foreign keys, no ACID transactions where they were needed.&lt;/p&gt;




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

&lt;h3&gt;
  
  
  Fix 1: MongoDB Time-Series Collections
&lt;/h3&gt;

&lt;p&gt;MongoDB has a purpose-built collection type for time-ordered data. I migrated all analytics events to Time-Series collections.&lt;/p&gt;

&lt;p&gt;The result:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Automatic data bucketing by time&lt;/strong&gt; — range queries are now index-native&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Columnar compression&lt;/strong&gt; — storage costs dropped significantly
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built-in TTL&lt;/strong&gt; — data automatically expires after 6 months, no manual cleanup&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;API response: 3-4 seconds → 400ms&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's not a typo. The same query that took 3-4 seconds now runs in under 400ms.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix 2: Async Processing With BullMQ + Redis
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;/log&lt;/code&gt; endpoint no longer writes to MongoDB directly. Every incoming event goes into a BullMQ job queue backed by Redis. A background worker processes the queue and writes to MongoDB asynchronously.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Client SDK
   │
   ▼
Express API  ──→  BullMQ Queue (Redis)
                       │
                       ▼
                  Worker Process
                       │
                       ▼
             MongoDB Time-Series
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The API endpoint now just validates the request and pushes to the queue — it responds in milliseconds. Events are processed in the background. Your application is never affected.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix 3: Polyglot Persistence
&lt;/h3&gt;

&lt;p&gt;Analytics events belong in MongoDB Time-Series. But user accounts, project settings, API keys, and billing records are relational data — they have foreign key relationships and need ACID transactions.&lt;/p&gt;

&lt;p&gt;I added &lt;strong&gt;PostgreSQL via Supabase&lt;/strong&gt; for all relational data. Supabase also handles  Row Level Security.&lt;/p&gt;

&lt;p&gt;Now the data layer is:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Data Type&lt;/th&gt;
&lt;th&gt;Database&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Analytics events&lt;/td&gt;
&lt;td&gt;MongoDB Time-Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Users, projects, settings&lt;/td&gt;
&lt;td&gt;PostgreSQL (Supabase)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Queue, caching, presence&lt;/td&gt;
&lt;td&gt;Redis&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each database does what it's best at. This is called polyglot persistence — and it's the right pattern for this kind of workload.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix 4: Real Infrastructure
&lt;/h3&gt;

&lt;p&gt;v1 was running on a basic setup. v2 runs on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Microsoft Azure VPS&lt;/strong&gt; — backend server&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloudflare CDN&lt;/strong&gt; — global edge delivery, DDoS protection&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PM2&lt;/strong&gt; — process management, zero-downtime restarts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nginx&lt;/strong&gt; — reverse proxy&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  New Features in v2
&lt;/h2&gt;

&lt;p&gt;Beyond performance, I added features that were missing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scroll depth tracking&lt;/strong&gt; — how far users actually scroll (Pro)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Core Web Vitals&lt;/strong&gt; — LCP, FID, CLS from real users (Pro)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Domain ownership verification&lt;/strong&gt; — DNS TXT record or meta tag, so you can only track sites you own&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-demand data deletion&lt;/strong&gt; — delete individual events, date ranges, or everything from the dashboard&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free forever plan&lt;/strong&gt; — no credit card, no expiry&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Current Stack
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SDK&lt;/td&gt;
&lt;td&gt;TypeScript, Beacon API, ~7.4KB gzipped&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Frontend Dashboard&lt;/td&gt;
&lt;td&gt;Next.js, React, TypeScript, Tailwind CSS, Shadcn UI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backend&lt;/td&gt;
&lt;td&gt;Node.js, Express, TypeScript&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Analytics DB&lt;/td&gt;
&lt;td&gt;MongoDB Time-Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Relational DB&lt;/td&gt;
&lt;td&gt;PostgreSQL via Supabase&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Queue&lt;/td&gt;
&lt;td&gt;BullMQ + Redis&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Auth&lt;/td&gt;
&lt;td&gt;Supabase Auth (OTP)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Infrastructure&lt;/td&gt;
&lt;td&gt;Microsoft Azure + Cloudflare&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SDK Distribution&lt;/td&gt;
&lt;td&gt;npm + jsDelivr CDN&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  What the Dashboard Looks Like Now
&lt;/h2&gt;

&lt;p&gt;The dashboard gives you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Page views, sessions, bounce rate&lt;/li&gt;
&lt;li&gt;Custom events with properties&lt;/li&gt;
&lt;li&gt;JavaScript errors with stack traces&lt;/li&gt;
&lt;li&gt;Referrers, UTM params, device/browser breakdown&lt;/li&gt;
&lt;li&gt;User location (country/city only — IP is discarded immediately after geolocation)&lt;/li&gt;
&lt;li&gt;Scroll depth heatmap (Pro)&lt;/li&gt;
&lt;li&gt;Core Web Vitals from real users (Pro)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All without a single cookie. No consent banner required.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Privacy Architecture (Unchanged, Still Core)
&lt;/h2&gt;

&lt;p&gt;This didn't change between v1 and v2 because it was right from the start:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No IP storage&lt;/strong&gt; — IPs are used for geolocation then immediately discarded&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No cookies&lt;/strong&gt; — session identity uses a daily-rotated hash, no persistent tracking&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No cross-site tracking&lt;/strong&gt; — your data stays in your project&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No data selling&lt;/strong&gt; — ever&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GDPR, CCPA compliant&lt;/strong&gt; — no consent banner needed because no tracking cookies&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What I Learned From 1 Upvote
&lt;/h2&gt;

&lt;p&gt;The product wasn't the problem. The launch was.&lt;/p&gt;

&lt;p&gt;I posted on Product Hunt with a brand new account, no audience, no prior community engagement. The algorithm doesn't surface products from cold accounts. That's not a conspiracy — it's just how it works.&lt;/p&gt;

&lt;p&gt;The lesson: &lt;strong&gt;build an audience before you need it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I'm doing that now. Writing here, sharing on Twitter, building in public. If you're reading this, you're part of that process.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;ucoder-insight
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;initUcoderInsight&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ucoder-insight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;initUcoderInsight&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;YOUR_PROJECT_ID&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the entire setup. It auto-tracks page views, SPA navigation, JavaScript errors, and Core Web Vitals from that single line.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔗 &lt;strong&gt;Platform:&lt;/strong&gt; &lt;a href="https://insights.ucoder.in" rel="noopener noreferrer"&gt;insights.ucoder.in&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📦 &lt;strong&gt;npm:&lt;/strong&gt; &lt;a href="https://www.npmjs.com/package/ucoder-insight" rel="noopener noreferrer"&gt;npmjs.com/package/ucoder-insight&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📖 &lt;strong&gt;Docs:&lt;/strong&gt; &lt;a href="https://insights.ucoder.in/docs" rel="noopener noreferrer"&gt;insights.ucoder.in/docs&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;If you're building something and tired of sending your users' data to Google — give it a try.&lt;/p&gt;

&lt;p&gt;And if you have feedback, I genuinely want to hear it. Drop a comment.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built by Soumyadip Maity — Full Stack Developer, final year CS student, West Bengal, India.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Previously: &lt;a href="https://dev.to/soumyadip_maity_2025/i-was-tired-of-sending-my-users-data-to-google-so-i-built-my-own-analytics-2okg"&gt;I Was Tired of Sending My Users' Data to Google — So I Built My Own Analytics&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>showdev</category>
      <category>buildinpublic</category>
      <category>javascript</category>
    </item>
    <item>
      <title>I Was Tired of Sending My Users' Data to Google — So I Built My Own Analytics</title>
      <dc:creator>Soumyadip Maity</dc:creator>
      <pubDate>Mon, 01 Jun 2026 11:26:23 +0000</pubDate>
      <link>https://dev.to/soumyadip_maity_2025/i-was-tired-of-sending-my-users-data-to-google-so-i-built-my-own-analytics-2okg</link>
      <guid>https://dev.to/soumyadip_maity_2025/i-was-tired-of-sending-my-users-data-to-google-so-i-built-my-own-analytics-2okg</guid>
      <description>&lt;p&gt;&lt;a href="https://dev.tourl"&gt;&lt;/a&gt;I'm a final year CS student. I build things in production.&lt;/p&gt;

&lt;p&gt;Last year, I was working on &lt;strong&gt;[Ucoder](&lt;a href="https://www.ucoder.in" rel="noopener noreferrer"&gt;https://www.ucoder.in&lt;/a&gt;&lt;/strong&gt;) — a full-stack platform I've been building since college. At some point I needed analytics. I wanted to know: are people actually using this? Which features are being used? Where are errors happening?&lt;/p&gt;

&lt;p&gt;So I did what everyone does. I installed Google Analytics.&lt;/p&gt;

&lt;p&gt;It worked. But something felt wrong.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;GA4 sends every user interaction to Google's servers. Every click, every session, every user's IP and device — all of it leaves your infrastructure and goes somewhere you don't control.&lt;/p&gt;

&lt;p&gt;For a platform where I cared about user trust, that felt like a betrayal.&lt;/p&gt;

&lt;p&gt;So I looked at alternatives:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Plausible&lt;/strong&gt; — privacy-first, cookie-free, clean dashboard. But it only gives you pageviews, referrers, and bounce rate. No custom events, no error tracking, no real product analytics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mixpanel&lt;/strong&gt; — powerful, but $28/month per 10K users. At scale, brutal. And the setup takes half a day just for event taxonomy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Microsoft Clarity&lt;/strong&gt; — session replays and heatmaps only. No event tracking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-hosted Matomo&lt;/strong&gt; — closer, but heavy to maintain and the UI feels dated.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of them did what I actually needed:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Track real user behavior, capture errors, support custom events — without cookies, without sending data to a third party, and without a painful setup.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So I built it myself.&lt;/p&gt;




&lt;h2&gt;
  
  
  Introducing Ucoder Insights
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://insights.ucoder.in" rel="noopener noreferrer"&gt;Ucoder Insights&lt;/a&gt;&lt;/strong&gt; is a privacy-first, cookie-free analytics platform with its own npm SDK.&lt;/p&gt;

&lt;p&gt;It tracks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📄 Page views (SPA-aware, works with Next.js, React, Vue)&lt;/li&gt;
&lt;li&gt;⚡ Custom events&lt;/li&gt;
&lt;li&gt;🔴 JavaScript errors (with stack traces)&lt;/li&gt;
&lt;li&gt;📊 Core Web Vitals (LCP, FID, CLS)&lt;/li&gt;
&lt;li&gt;🌐 Referrers, UTM params, device/browser info&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All without cookies. All processed on your own terms.&lt;/p&gt;




&lt;h2&gt;
  
  
  How It Works — Technical Overview
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The SDK
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;ucoder-insight
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;initUcoderInsight&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ucoder-insight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;initUcoderInsight&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;projectid&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Your optional settings here&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. One function call. No configuration overhead.&lt;/p&gt;

&lt;p&gt;The SDK is ~9.5KB gzipped. It uses a &lt;strong&gt;beacon API&lt;/strong&gt; to send events so it never blocks the main thread. For SPAs, it listens to &lt;code&gt;history.pushState&lt;/code&gt; and &lt;code&gt;popstate&lt;/code&gt; to track client-side navigation automatically.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Backend Architecture
&lt;/h3&gt;

&lt;p&gt;The backend is built with &lt;strong&gt;Express 5 + TypeScript&lt;/strong&gt;. When an event comes in:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Request hits the Express API&lt;/li&gt;
&lt;li&gt;Passes through &lt;code&gt;express-validator&lt;/code&gt; for input sanitisation&lt;/li&gt;
&lt;li&gt;Gets pushed into a &lt;strong&gt;BullMQ job queue&lt;/strong&gt; backed by &lt;strong&gt;Redis&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;A background worker processes the queue and writes to &lt;strong&gt;MongoDB&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Why a queue? Because analytics should never slow down your app. If the ingestion endpoint is under load, events queue up and get processed asynchronously — your tracked application is never affected.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Client SDK
   │
   ▼
Express API  ──→  BullMQ Queue (Redis)
                       │
                       ▼
                  Worker Process
                       │
                       ▼
                   MongoDB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Privacy by Design
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No cookies&lt;/strong&gt; — identification uses a daily-rotated hash of IP + User-Agent. No persistent tracking across days.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No PII storage&lt;/strong&gt; — we never store  IPs or personal data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your data stays yours&lt;/strong&gt; — events go to your project only, not a shared Google/Meta data warehouse.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What This Solves That Others Don't
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Error Tracking + Analytics in One Place
&lt;/h3&gt;

&lt;p&gt;With GA4 or Plausible, you need a separate tool (Sentry, LogRocket) for error tracking. With Ucoder Insights, JavaScript errors are captured automatically — with the page URL, user agent, and stack trace — right alongside your pageview and event data.&lt;/p&gt;

&lt;p&gt;No context switching between dashboards.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Real Custom Events, Simply
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;trackEvent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ucoder-insight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Track anything&lt;/span&gt;
&lt;span class="nf"&gt;trackEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;signup_completed&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;plan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;free&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;email&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nf"&gt;trackEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;feature_used&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;feature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;export_csv&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Plausible's custom events require manual script tagging. Mixpanel requires you to plan an entire event taxonomy before you start. Here, you call one function.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. SPA-First
&lt;/h3&gt;

&lt;p&gt;Most analytics tools were built for traditional multi-page websites. Ucoder Insights was built with SPAs in mind from day one — it handles &lt;code&gt;pushState&lt;/code&gt; navigation, React Router, Next.js App Router, and hash-based routing out of the box.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Stack
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SDK&lt;/td&gt;
&lt;td&gt;TypeScript, Beacon API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Frontend Dashboard&lt;/td&gt;
&lt;td&gt;Next.js 16, React 19, Tailwind CSS 4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backend&lt;/td&gt;
&lt;td&gt;Express 5, TypeScript, Socket.IO&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Queue&lt;/td&gt;
&lt;td&gt;BullMQ + Redis (ioredis)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;MongoDB (Mongoose 9)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment&lt;/td&gt;
&lt;td&gt;Docker + PM2 on Linux VPS&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Current Status
&lt;/h2&gt;

&lt;p&gt;The platform is live at &lt;strong&gt;&lt;a href="https://insights.ucoder.in" rel="noopener noreferrer"&gt;insights.ucoder.in&lt;/a&gt;&lt;/strong&gt; and running in production on Ucoder.in.&lt;/p&gt;

&lt;p&gt;The npm package &lt;strong&gt;&lt;a href="https://www.npmjs.com/package/ucoder-insight" rel="noopener noreferrer"&gt;ucoder-insight&lt;/a&gt;&lt;/strong&gt; is public at v1.1.3.&lt;/p&gt;

&lt;p&gt;I'm a solo developer and this is a real project — not a side project I'll abandon. I use it myself, which means I have a real incentive to keep it working and improving.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Coming Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Alert system&lt;/strong&gt; — get notified on Slack/email when error rate spikes or traffic drops&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Server-side proxy&lt;/strong&gt; — bypass ad-blockers without compromising privacy&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Funnel analysis&lt;/strong&gt; — visualise conversion paths across custom events&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API access&lt;/strong&gt; — pull your analytics data into your own dashboards&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;ucoder-insight
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;🔗 &lt;strong&gt;Platform:&lt;/strong&gt; &lt;a href="https://insights.ucoder.in" rel="noopener noreferrer"&gt;insights.ucoder.in&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📦 &lt;strong&gt;npm:&lt;/strong&gt; &lt;a href="https://www.npmjs.com/package/ucoder-insight" rel="noopener noreferrer"&gt;npmjs.com/package/ucoder-insight&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;💻 &lt;strong&gt;My portfolio:&lt;/strong&gt; &lt;a href="https://soumyadip.ucoder.in" rel="noopener noreferrer"&gt;soumyadip.ucoder.in&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're building something and tired of sending your users' data to Google — give it a try. And if you have feedback, I genuinely want to hear it.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built by Soumyadip Maity — Full Stack Developer, final year CS student, West Bengal, India.&lt;/em&gt;&lt;/p&gt;

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