Smart & Digital Innovation | Sustainability Hackathon 2026
Track your carbon. Transform your organization.
GreenLens is a production-grade, multi-tenant B2B SaaS platform that empowers modern enterprises, campuses, and organizations to track, manage, and reduce their collective carbon footprint using AI.
- Frontend (Vercel): https://green-lens-tau.vercel.app
- Backend (Render): https://greenlens-backend-n3ws.onrender.com
- True multi-tenant data isolation using a core
Organizationstructure. - Role-Based Access Control (RBAC): Users are assigned either
adminoremployeeroles. - Corporate Admin Dashboard: A dedicated, protected route for administrators to view aggregated company-wide COβ savings.
- pHash (Perceptual Hashing) Fraud Detection: Implemented
ImageHashwith a 30-day sliding window to prevent users from uploading visually similar receipts to cheat the leaderboard. - DDoS & Cost Protection: Strict API rate-limiting via
slowapion expensive LLM routes (5 req/min) to prevent abuse of the Gemini Vision API. - OOM Protection: Hard limits on UploadFile sizes (Max 5MB) to prevent memory exhaustion attacks.
- Secure Auth: JWT-based authentication with bcrypt password hashing and enforced strong password policies.
- Full PWA support allowing employees to install GreenLens directly to their iOS or Android home screen for a seamless, native-app-like receipt scanning experience.
- 1-Click CSV Export: Administrators can instantly download a formatted CSV report of their entire organization's carbon offset activities for sustainability compliance and CSR reporting.
- Dynamic Data Visualization: High-performance charting using
Rechartsto visualize offset trends over time.
- Vision Scanning: Uses Google Gemini 1.5 Flash to automatically extract carbon footprint data from photos of food or transport receipts.
- AI Coach: Generates contextual, personalized nudges encouraging employees to make greener choices.
| Technology | Purpose |
|---|---|
| FastAPI | High-performance async web framework |
| SQLAlchemy | ORM for database interactions |
| PostgreSQL | Relational Database (Neon) |
| SlowAPI | Endpoint rate limiting |
| ImageHash | Perceptual hashing for fraud detection |
| Alembic | Database migrations |
| Technology | Purpose |
|---|---|
| React + Vite | Lightning-fast UI framework |
| Tailwind CSS | Utility-first styling |
| Recharts | Corporate dashboard data visualization |
| Vite PWA | Progressive Web App integration |
| Axios | Secure API communication |
GreenLens/
βββ backend/
β βββ main.py # Core API, Auth, Rate Limiting & Admin Routes
β βββ models.py # Organizations, Users, Activities, Stats
β βββ vision.py # pHash Fraud Detection + Gemini API
β βββ alembic/ # DB Migrations for Multi-Tenancy
β βββ requirements.txt
β
βββ frontend/
β βββ src/
β β βββ pages/
β β β βββ AdminDashboardPage.jsx # Protected corporate analytics
β β β βββ DashboardPage.jsx # Employee personal view
β β β βββ AuthPages.jsx # Org creation & signup flow
β β βββ api.js # Centralized Axios interceptors
β βββ vite.config.js # PWA configuration
β βββ package.json
1. Clone the repository
git clone <your-repo-url>
cd GreenLens2. Backend Setup
cd backend
pip install -r requirements.txt
# Add .env with DATABASE_URL, SECRET_KEY, GEMINI_API_KEY
alembic upgrade head # Run migrations
python main.py3. Frontend Setup
cd frontend
npm install
# Add .env.local with VITE_API_URL=http://localhost:8000
npm run devGreenLens Development Team
- Smart & Digital Innovation Category
- Building scalable SaaS for a sustainable future.
Built for the Parul University Sustainability Hackathon 2026