惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
MyScale Blog
MyScale Blog
U
Unit 42
M
MIT News - Artificial intelligence
小众软件
小众软件
P
Proofpoint News Feed
雷峰网
雷峰网
L
LangChain Blog
S
SegmentFault 最新的问题
腾讯CDC
F
Fortinet All Blogs
A
About on SuperTechFans
WordPress大学
WordPress大学
Vercel News
Vercel News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
N
Netflix TechBlog - Medium
Apple Machine Learning Research
Apple Machine Learning Research
Recent Announcements
Recent Announcements
D
DataBreaches.Net
Stack Overflow Blog
Stack Overflow Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
"EcoSphere AI: Why I separated 'logic' from 'AI' when bui...
Ajit Sharma · 2026-06-21 · via DEV Community

Ajit Sharma

The Trap Most Carbon Apps Fall Into

When you say "build a carbon footprint app," the obvious move is: collect some inputs,
ask an LLM "how much CO2 does this produce," and display whatever it says.

That's a trap. LLMs are not reliable calculators. Ask the same model the same emissions
question twice and you'll get two different numbers. For a "track your carbon footprint"
tool, that's disqualifying — the entire premise of tracking requires consistent,
auditable numbers.

The Architecture Decision

EcoSphere AI splits the problem in two:

1. A deterministic carbon engine — pure TypeScript functions using documented
emission factors (diet type, transport mode, energy use, shopping habits). Same input,
same output, every time. Fully unit tested. This is what computes your actual footprint,
your Carbon DNA archetype, your Risk Score, and your ranked recommendations.

2. Google Gemini AI — used only for what LLMs are actually good at: natural language
explanation, contextual conversation, and pattern narration. The AI coach receives the
engine's real computed numbers as context and explains them — it never invents the
math itself.

This split mattered more than any single feature. It's the difference between a project
that looks AI-powered and one that is genuinely intelligent.

What I Built

  • Carbon DNA: A personality-style profile ("Urban Explorer", "Frequent Flyer") derived from rule-based logic on your habits
  • Carbon Twin: An optimized version of you, with savings calculated from the same emission factors — not arbitrary
  • AI Sustainability Coach: Ask anything, get answers grounded in your actual data
  • What-If Simulator: Drag sliders, watch projected 2050 footprint update live
  • Carbon Risk Score: 0-100, like a credit score for environmental impact
  • Gamification: Weekly missions auto-generated to target your highest-impact category

Cloud Services Used

Gemini API powers the conversational coach and weekly AI-generated summaries — always
fed real context, never guessing.

Firebase Firestore stores monthly profile snapshots, enabling a deterministic
habit-change detector that flags "+17% this month, likely from increased food delivery"
— again, computed, not hallucinated.

Deployment: Initially deployed on Vercel for rapid iteration, with a Dockerized Google Cloud Run architecture staging for final production.

Testing Strategy

Because the carbon engine is pure functions, it was trivial to write 20+ meaningful
unit tests — ordering checks (vegan footprint < high-meat footprint), boundary checks
(risk score clamped 0-100), and invariant checks (Carbon Twin always projects lower
than current). This is testing that actually validates logic, not just "does it render."

The Antigravity Build Process

Six structured master prompts: scaffold + security → deterministic engine → Firebase/AI
layer → core UI → coach/gamification UI → tests/Docker/README. Each prompt built on
the last, intent-driven the whole way.

Live Demo & Code

🔗 Live: https://ecosphere-ai-tan.vercel.app/
💻 GitHub: https://github.com/ajx1tech/ecosphere-ai