GreenCode Sentiment Hub

This is a submission for the Pulumi Deploy and Document Challenge: Shhh, It’s a Secret!

What I Built

I built GreenCode Sentiment Hub, a full-stack MERN app that analyzes GitHub pull requests for sentiment and environmental impact. The front…


This content originally appeared on DEV Community and was authored by Soham

This is a submission for the Pulumi Deploy and Document Challenge: Shhh, It's a Secret!

What I Built

I built GreenCode Sentiment Hub, a full-stack MERN app that analyzes GitHub pull requests for sentiment and environmental impact. The frontend side lets users input their GitHub Personal Access Token (PAT) and repo details, while the backend (Node.js/Express) fetches PR data, uses Hugging Face’s API to assess sentiment, and calculates a carbon impact score based on code changes. It then updates PRs with labels like "Positive" or "Critical" and comments like "Green Code!" for eco-friendly changes. Deployed on Render (backend) and Netlify (frontend), it uses MongoDB Atlas for storage and WebSockets for real-time updates.

Live Demo Link

Project Repo

My Journey

I started wanting to use Pulumi’s Automation API to manage GitHub resources, but hit roadblocks and ended up with a simpler, CLI-free solution. I aimed for a no-CLI setup, but the Automation API kept demanding pulumi version, throwing errors like crazy. Regenerated my PAT with repo scope, tested it, and boom—labels started sticking. I ditched the Automation API and used axios to hit GitHub’s REST API directly—less fancy, but it worked!

Using Pulumi ESC

I leveraged Pulumi ESC to securely manage my app’s sensitive data—specifically, the Hugging Face API key for sentiment analysis. created an ESC environment in Pulumi Cloud. I used the @pulumi/esc-sdk to fetch the key at runtime. It provided a centralized, encrypted way to manage secrets, which was a lifesaver when deploying to Render. I didn’t use Pulumi Copilot (the AI assistant) since my focus was on manual configuration, but ESC alone proved its worth by keeping my secrets safe and accessible

Above image created by AI


This content originally appeared on DEV Community and was authored by Soham


Print Share Comment Cite Upload Translate Updates
APA

Soham | Sciencx (2025-04-06T11:48:24+00:00) GreenCode Sentiment Hub. Retrieved from https://www.scien.cx/2025/04/06/greencode-sentiment-hub/

MLA
" » GreenCode Sentiment Hub." Soham | Sciencx - Sunday April 6, 2025, https://www.scien.cx/2025/04/06/greencode-sentiment-hub/
HARVARD
Soham | Sciencx Sunday April 6, 2025 » GreenCode Sentiment Hub., viewed ,<https://www.scien.cx/2025/04/06/greencode-sentiment-hub/>
VANCOUVER
Soham | Sciencx - » GreenCode Sentiment Hub. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/04/06/greencode-sentiment-hub/
CHICAGO
" » GreenCode Sentiment Hub." Soham | Sciencx - Accessed . https://www.scien.cx/2025/04/06/greencode-sentiment-hub/
IEEE
" » GreenCode Sentiment Hub." Soham | Sciencx [Online]. Available: https://www.scien.cx/2025/04/06/greencode-sentiment-hub/. [Accessed: ]
rf:citation
» GreenCode Sentiment Hub | Soham | Sciencx | https://www.scien.cx/2025/04/06/greencode-sentiment-hub/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.