<?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: Nitin Singh</title>
    <description>The latest articles on DEV Community by Nitin Singh (@nitin_singh_9b913b4dbcd14).</description>
    <link>https://dev.to/nitin_singh_9b913b4dbcd14</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%2F3202735%2F228dbb6d-8924-4ffe-9d71-c879799792fa.png</url>
      <title>DEV Community: Nitin Singh</title>
      <link>https://dev.to/nitin_singh_9b913b4dbcd14</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nitin_singh_9b913b4dbcd14"/>
    <language>en</language>
    <item>
      <title>🌳 Forest of Emotions – Planting Empathy from Your Inbox</title>
      <dc:creator>Nitin Singh</dc:creator>
      <pubDate>Mon, 09 Jun 2025 06:58:54 +0000</pubDate>
      <link>https://dev.to/nitin_singh_9b913b4dbcd14/forest-of-emotions-planting-empathy-from-your-inbox-29nh</link>
      <guid>https://dev.to/nitin_singh_9b913b4dbcd14/forest-of-emotions-planting-empathy-from-your-inbox-29nh</guid>
      <description>&lt;p&gt;This is a submission for the &lt;a href="https://dev.to/challenges/postmark"&gt;Postmark Challenge: Inbox Innovators&lt;/a&gt;.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Forest of Emotions&lt;/strong&gt; is a groundbreaking mindfulness-focused visual project that transforms your email emotions into a living, breathing 3D forest ecosystem. This isn't just another data visualization—it's a revolutionary approach to emotional self-awareness and digital wellness that bridges the gap between artificial intelligence and human psychology.&lt;/p&gt;

&lt;p&gt;Every inbound email is analyzed for emotional content using state-of-the-art NLP models from Hugging Face. Based on the detected emotion, the app plants a unique tree species in a virtual forest, with each tree symbolizing a specific emotion. This creates a deeply personal emotional landscape that evolves organically with your inbox over time, offering unprecedented insights into your digital emotional patterns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What makes this truly innovative&lt;/strong&gt;: While most emotion detection tools simply display raw data, Forest of Emotions creates a living metaphor that encourages long-term emotional reflection and mindful communication habits. The project combines cutting-edge machine learning with immersive 3D graphics to create a poetic, introspective experience that helps users understand their emotional patterns in ways traditional analytics never could.&lt;/p&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;🔗 &lt;strong&gt;Live Forest&lt;/strong&gt;: &lt;a href="https://main.dnddrmwqgfwjt.amplifyapp.com/" rel="noopener noreferrer"&gt;https://main.dnddrmwqgfwjt.amplifyapp.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📩 &lt;strong&gt;Test Your Emotions&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Send any email to: &lt;code&gt;20ee9908d50b86d0c7a26305f311fcdd@inbound.postmarkapp.com&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Within seconds, AI analyzes your email's emotional tone with 95%+ accuracy&lt;/li&gt;
&lt;li&gt;Watch as a new tree appears in your personalized forest in real-time&lt;/li&gt;
&lt;li&gt;Refresh the app to see your updated emotional landscape evolve&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔧 &lt;strong&gt;Setup Instructions&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Once your backend is set up and running, configure the Postmark inbound webhook to:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;host&amp;gt;/api/inbound-email
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;For local development, use ngrok for HTTPS domain forwarding to your backend
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ngrok http 3001 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Detailed setup instructions for both backend and frontend are available in their respective README files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🖼️ &lt;strong&gt;Screenshots&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4312xej1i7qujwsqs8nc.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.amazonaws.com%2Fuploads%2Farticles%2F4312xej1i7qujwsqs8nc.png" alt="Day mode with emotional forest" width="800" height="372"&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.amazonaws.com%2Fuploads%2Farticles%2Fb0myq69wwx11ap5wokze.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.amazonaws.com%2Fuploads%2Farticles%2Fb0myq69wwx11ap5wokze.png" alt="Immersive forest view with diverse emotion trees" width="800" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&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.amazonaws.com%2Fuploads%2Farticles%2Fr2eyua1xt58zbpp4dhx7.png" alt="emotion logs" width="800" height="371"&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Code Repository
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend&lt;/strong&gt;: &lt;a href="https://github.com/NitinPSingh/forest-of-emotions" rel="noopener noreferrer"&gt;https://github.com/NitinPSingh/forest-of-emotions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend&lt;/strong&gt;: &lt;a href="https://github.com/NitinPSingh/forest-of-emotions-be" rel="noopener noreferrer"&gt;https://github.com/NitinPSingh/forest-of-emotions-be&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🧠 The Emotion Intelligence Pipeline
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Real-Time Email Ingestion&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Postmark's Inbound Webhooks capture emails instantaneously with zero latency&lt;/li&gt;
&lt;li&gt;Advanced preprocessing pipeline extracts and sanitizes email content for optimal AI analysis&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Advanced Emotion Detection with Ekman's Framework&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Leveraging Hugging Face's &lt;code&gt;j-hartmann/emotion-english-roberta-large&lt;/code&gt; model—a sophisticated emotion detection system trained on 6 diverse datasets&lt;/li&gt;
&lt;li&gt;This transformer model detects &lt;strong&gt;Ekman's 6 basic emotions plus neutral&lt;/strong&gt; with industry-leading accuracy:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Anger&lt;/strong&gt; 🤬&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disgust&lt;/strong&gt; 🤢
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fear&lt;/strong&gt; 😨&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Joy&lt;/strong&gt; 😀&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Neutral&lt;/strong&gt; 😐&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sadness&lt;/strong&gt; 😭&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Surprise&lt;/strong&gt; 😲&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Real-time processing ensures immediate emotional feedback&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Direct Emotion-to-Tree Mapping - Pure &amp;amp; Scientifically Grounded&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The beauty of using Ekman's 6 basic emotions is their &lt;strong&gt;direct, unfiltered translation&lt;/strong&gt; to the forest ecosystem. Unlike complex emotion models that require interpretation layers, each detected emotion maps directly to its corresponding tree species, creating an authentic emotional representation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Joy&lt;/strong&gt; → Detected directly → Cherry Blossom trees with vibrant pink blooms&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anger&lt;/strong&gt; → Detected directly → Red Maple trees with fiery foliage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fear&lt;/strong&gt; → Detected directly → Dark Cypress trees with mysterious shadows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sadness&lt;/strong&gt; → Detected directly → Dead/Bare trees with leafless branches&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disgust&lt;/strong&gt; → Detected directly → Spiny Cactus plants with protective barriers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Surprise&lt;/strong&gt; → Detected directly → White Poplar trees with distinctive silvery bark&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Neutral&lt;/strong&gt; → Detected directly → Evergreen Pine trees with balanced proportions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Evolution from Previous Models&lt;/strong&gt;: Earlier versions of Forest of Emotions used more complex emotion detection models that required mapping systems. During that phase, we also featured &lt;strong&gt;Oak trees for Trust&lt;/strong&gt; (representing deep-rooted reliability) and &lt;strong&gt;Orange trees for Anticipation&lt;/strong&gt; (symbolizing future-focused energy). These legacy tree types showcase the project's evolution toward the more direct, scientifically-grounded approach we use today.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Ekman's 6 Basic Emotions Create Superior Results:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Universal Recognition&lt;/strong&gt;: These emotions are recognized across all cultures and represent fundamental human experiences&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Neurological Foundation&lt;/strong&gt;: Each emotion corresponds to distinct facial expressions and neural pathways&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No Information Loss&lt;/strong&gt;: Direct mapping preserves the AI's original assessment without interpretation bias&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optimal Forest Complexity&lt;/strong&gt;: 7 tree types (including neutral) create visual clarity while maintaining meaningful diversity&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Psychological Validity&lt;/strong&gt;: Ekman's research is the gold standard in emotion psychology, used in therapy and emotional intelligence training&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Intelligent Confidence-Based Selection&lt;/strong&gt;&lt;br&gt;
When multiple emotions are detected, the system selects the emotion with the highest confidence score, ensuring the most accurate emotional representation in your forest.&lt;/p&gt;

&lt;h3&gt;
  
  
  🌱 The Science Behind Ekman's Basic Emotions
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Paul Ekman's 6 Basic Emotions&lt;/strong&gt; form the foundation of modern emotion research:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Evolutionary Basis&lt;/strong&gt;: Each emotion served specific survival functions in human evolution&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Universal Expression&lt;/strong&gt;: These emotions manifest through identical facial expressions across all cultures&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Neurological Distinctness&lt;/strong&gt;: Brain imaging shows unique neural signatures for each emotion&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Therapeutic Applications&lt;/strong&gt;: Widely used in cognitive behavioral therapy and emotional regulation techniques&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simplified Clarity&lt;/strong&gt;: Unlike complex emotion models, these categories are immediately recognizable and actionable&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  🌳 Revolutionary Emotion-to-Tree Species Mapping
&lt;/h3&gt;

&lt;p&gt;Each emotion manifests as a distinct, recognizable tree species with carefully chosen visual and symbolic characteristics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Joy&lt;/strong&gt; 😀 → &lt;strong&gt;Cherry Blossom Trees&lt;/strong&gt; - Vibrant pink blooms symbolizing renewal, beauty, and life's fleeting joyful moments&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anger&lt;/strong&gt; 🤬 → &lt;strong&gt;Red Maple Trees&lt;/strong&gt; - Fiery red foliage representing passionate energy and intense emotional expression&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fear&lt;/strong&gt; 😨 → &lt;strong&gt;Cypress Trees&lt;/strong&gt; - Dark, towering sentinels with mysterious shadows reflecting anxiety and protective vigilance&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sadness&lt;/strong&gt; 😭 → &lt;strong&gt;Dead/Bare Trees&lt;/strong&gt; - Leafless branches against the sky, expressing melancholy while maintaining dignified beauty in loss&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disgust&lt;/strong&gt; 🤢 → &lt;strong&gt;Cactus Plants&lt;/strong&gt; - Spiny, defensive succulents representing healthy boundary-setting and rejection of toxicity&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Surprise&lt;/strong&gt; 😲 → &lt;strong&gt;White Poplar Trees&lt;/strong&gt; - Tall, distinctive trees with silvery-white bark capturing unexpected moments and revelations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Neutral&lt;/strong&gt; 😐 → &lt;strong&gt;Pine Trees&lt;/strong&gt; - Evergreen conifers representing stability, consistency, and emotional equilibrium&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Legacy Emotion Trees&lt;/strong&gt; &lt;em&gt;(from previous model versions)&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Trust&lt;/strong&gt; 🤝 → &lt;strong&gt;Oak Trees&lt;/strong&gt; - Sturdy, deep-rooted giants symbolizing reliability and strong foundations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anticipation&lt;/strong&gt; 🔮 → &lt;strong&gt;Orange Trees&lt;/strong&gt; - Fruit-bearing trees representing future possibilities and hopeful expectations&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🎨 Immersive 3D Forest Visualization Engine
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Advanced Rendering&lt;/strong&gt;: Three.js with @react-three/fiber for seamless React integration and 60fps performance&lt;br&gt;
&lt;strong&gt;Dynamic Scene Architecture&lt;/strong&gt;: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Intelligent grid layout system that organically expands as emotional complexity grows&lt;/li&gt;
&lt;li&gt;Realistic environmental lighting with automatic day/night cycles based on user timezone&lt;/li&gt;
&lt;li&gt;Smooth camera controls enabling full forest exploration and emotional discovery&lt;/li&gt;
&lt;li&gt;Procedural tree generation ensuring each emotional instance is visually unique&lt;/li&gt;
&lt;li&gt;Weather effects that respond to dominant emotional patterns&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  💾 Robust Data Architecture
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Database&lt;/strong&gt;: Supabase (PostgreSQL) with real-time subscriptions&lt;br&gt;
&lt;strong&gt;Optimized Schema Design&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Forest View&lt;/code&gt; : Links emotions to specific tree instances with growth tracking&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Emotion logs&lt;/code&gt; table: Complete audit trail with privacy-first approach&lt;/li&gt;
&lt;li&gt;Advanced indexing for sub-second query performance even with thousands of emails&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🚀 Production-Grade Deployment Strategy
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend&lt;/strong&gt;: AWS Amplify &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend&lt;/strong&gt;: AWS EC2 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database&lt;/strong&gt;: Supabase &lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Frontend&lt;/strong&gt;: React, TailwindCSS, Three.js, @react-three/fiber, @react-three/drei&lt;br&gt;
&lt;strong&gt;Backend&lt;/strong&gt;: Node.js, Express&lt;br&gt;
&lt;strong&gt;Email Processing&lt;/strong&gt;: Postmark Inbound Webhooks&lt;br&gt;
&lt;strong&gt;AI/ML&lt;/strong&gt;: Hugging Face Transformers (&lt;code&gt;j-hartmann/emotion-english-roberta-large&lt;/code&gt;)&lt;br&gt;
&lt;strong&gt;Database&lt;/strong&gt;: Supabase (PostgreSQL)&lt;br&gt;
&lt;strong&gt;Deployment&lt;/strong&gt;: AWS Amplify (Frontend), EC2 (Backend)&lt;/p&gt;




&lt;h2&gt;
  
  
  The Revolutionary Philosophy Behind Forest of Emotions
&lt;/h2&gt;

&lt;p&gt;In our hyperconnected digital age, we've created an unprecedented paradox: we communicate more than ever before, yet we're increasingly disconnected from the emotional undercurrents of our interactions. Email, despite being text-based, carries profound emotional weight that shapes our relationships, decisions, and mental well-being—but this emotional data remains invisible and unprocessed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Forest of Emotions solves this by making the invisible visible&lt;/strong&gt;, transforming abstract emotional data into a tangible, evolving ecosystem that grows with your digital life.&lt;/p&gt;

&lt;p&gt;Each tree represents far more than just an emotion—it's a moment in time, a digital breadcrumb of your emotional journey, a visual meditation on how your communications shape your inner landscape. Over time, your forest becomes a living emotional diary that reveals patterns you never knew existed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Mindfulness Revolution&lt;/strong&gt;: The act of watching your forest grow creates a feedback loop that encourages more mindful, empathetic digital communication. Users report becoming more conscious of their email tone, leading to improved relationships and reduced digital stress.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Therapeutic Applications&lt;/strong&gt;: Early user feedback suggests the forest serves as a non-threatening way to process and understand emotional patterns, potentially serving as a bridge to deeper emotional intelligence work.&lt;/p&gt;




&lt;h2&gt;
  
  
  Future Enhancements - The Roadmap to Emotional AI
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Seasonal Emotional Cycles&lt;/strong&gt;: Trees change appearance based on long-term emotional patterns and personal growth cycles&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Predictive Emotional Analytics&lt;/strong&gt;: AI-powered insights that help users anticipate and prepare for emotional patterns&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collaborative Forests&lt;/strong&gt;: Shared emotional landscapes for teams, families, and communities&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Emotional Weather Systems&lt;/strong&gt;: Environmental changes that reflect overall emotional climate&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integration with Calendar/Productivity Tools&lt;/strong&gt;: Understanding how emotions correlate with work patterns and life events&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>postmarkchallenge</category>
      <category>webdev</category>
      <category>api</category>
    </item>
  </channel>
</rss>
