Skip to content

hariomsah01/PennApps

Repository files navigation

Project Type-less

Write smarter prompts. Save tokens. Save energy. Save the planet.


🚀 About the Project

Have you ever thought about the hidden environmental cost of AI?
Every query consumes energy, and scaled across millions of users, this translates into significant CO₂ emissions.

We built Type-less at PennApps to solve this challenge.
Our tool helps people communicate more efficiently with AI by compressing prompts into their essential form — without losing meaning.

With every optimized prompt:

  • ⚡ Fewer tokens are processed
  • 🌍 Less compute → lower CO₂ footprint
  • 📊 Users track their savings in real time

✨ Features

  • 🔹 Prompt Optimizer – NLP/ML algorithms shorten redundant queries
  • 🔹 Token & CO₂ Savings Tracker – daily and monthly impact dashboard
  • 🔹 MongoDB Storage – saves usage history for cumulative stats
  • 🔹 Netlify Hosting – fast, serverless frontend deployment
  • 🔹 Clean UI – human-friendly design for easy adoption

🛠️ Tech Stack

  • Frontend: React, Tailwind CSS
  • Backend: Flask (Python)
  • Database: MongoDB
  • Hosting: Netlify (frontend), Flask backend on local/remote server
  • Other Tools: Axios, REST APIs

📂 Project Structure

PennApps/
│── backend/           # Flask API (compression + savings logic)
│── frontend/          # React + Tailwind UI
│── database/          # MongoDB integration
│── utils/             # Helper scripts (CO₂ + token tracking)
│── README.md

⚡ Getting Started

1️⃣ Clone the repo

git clone https://github.com/hariomsah01/PennApps.git
cd PennApps

2️⃣ Backend Setup (Flask API)

cd backend
pip install -r requirements.txt
python app.py

3️⃣ Frontend Setup (React + Netlify)

cd frontend
npm install
npm start

👉 To deploy frontend:

  • Push your frontend/ folder to a branch
  • Connect the repo to Netlify
  • Netlify auto-builds & deploys your React app

4️⃣ Environment Variables

Create a .env file in backend/:

MONGO_URI=your_mongodb_connection_string

📊 How It Works

  1. User enters a long prompt in the React UI
  2. Text is sent to the Flask backend
  3. NLP/ML logic compresses the prompt (removes redundant words, simplifies)
  4. MongoDB logs:
    • Tokens before vs. after
    • Estimated CO₂ savings
    • Cumulative daily/monthly impact
  5. Netlify-hosted frontend displays results + history

🌍 Why It Matters

  • AI queries consume energy-intensive computation
  • By saving tokens, we reduce energy load on servers
  • Even small savings per prompt → large impact at scale

📌 Studies show:

  • Training a single large AI model can emit hundreds of tons of CO₂ (Strubell et al., 2019).
  • Even inference (day-to-day queries) adds up across millions of users.

🎯 Future Scope

  • Chrome extension for live prompt optimization
  • Gamified leaderboards (who saves most CO₂)
  • Visual dashboards with community impact stats
  • Advanced transformer-based compression

🤝 Contributing

We welcome contributions:

  1. Fork the repo
  2. Create a branch (git checkout -b feature-name)
  3. Commit changes (git commit -m 'Add feature')
  4. Push (git push origin feature-name)
  5. Open a PR 🚀

🏆 Hackathon

Built at PennApps XXVI (2025)


👨‍💻 Authors


Learn More

📜 License

Licensed under the University of Pennsylvania License.

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •