KleanLoop is a sustainable plastic recycling platform built for the PIM Inter Hackathon. It connects individuals who collect plastic waste with companies that need plastic credits for their sustainability goals.
- Sell Plastic: Upload photos, get instant pricing, and schedule pickups
- Reputation System: Earn points and unlock higher tiers (Bronze → Silver → Gold → Platinum)
- Real-time Notifications: Track pickup status and rewards
- Transaction History: View all your sales and earnings
- Buy Plastic Credits: Purchase verified recycling credits
- Impact Tracking: Monitor your sustainability impact
- Certificate Generation: Download official certificates for purchased credits
- Cost Transparency: See detailed breakdown of where your money goes
- Frontend: Next.js 15.5.6, React, TypeScript
- Styling: Tailwind CSS 3.4, Framer Motion 11
- Backend: tRPC v11 + React Query
- Database: PostgreSQL (Neon) with Prisma 6 ORM
- UI: Custom components with mobile-first design
- Auth: Cookie-based sessions
- Primary: Chrysler Chrome (#E8F4F8)
- Secondary: Empire Sky (#A8D8E8)
- Accent: Liberty Copper (#6FC7B6)
- Success: Central Green (#5A8F4F)
# Clone repository
git clone https://github.com/SassyxD/KleanLoop.git
cd KleanLoop
# Install dependencies
npm install
# Setup environment variables
cp .env.example .env
# Edit .env and add your Neon PostgreSQL connection string
# Run database migrations
npx prisma migrate dev --name init
# Seed database with mock data
npx prisma db seed
# Run development server
npm run devDatabase Setup:
- Create free PostgreSQL database at https://console.neon.tech
- Copy connection string to
.envfile - Run migrations and seed data
- Email: user@kleanloop.com
- Password: password123
- Tier: Bronze (100 points)
- Email: corp@company.com
- Password: password123
- Company: บริษัท สีเขียว จำกัด
- URL: /admin/login
- Username: admin
- Password: admin123
- Home: Sustainability news, statistics, price board
- Sell: 4-step process to sell plastic (Personal users only)
- Buy: Purchase plastic credits (Corporate users only)
- Notifications: Real-time updates with filters
- Profile: User stats, tier progress, transaction history
| Tier | Points | Min Weight | Price Multiplier | Priority |
|---|---|---|---|---|
| 🥉 Bronze | 0-499 | 5 kg | 1.0x | Normal |
| 🥈 Silver | 500-1,999 | 3 kg | 1.1x | High |
| 🥇 Gold | 2,000-4,999 | 2 kg | 1.25x | Highest |
| 💎 Platinum | 5,000+ | 1 kg | 1.5x | VIP |
- PET bottles: 8-15 ฿/kg (avg: 12 ฿/kg)
- HDPE: 5-10 ฿/kg (avg: 8 ฿/kg)
- LDPE/PP film: 0-3 ฿/kg (avg: 1.5 ฿/kg)
- Mixed/other: 0 ฿/kg
- 100 kg: 25 ฿/credit (2,500 ฿ total)
- 500 kg: 22 ฿/credit (11,000 ฿ total) - POPULAR
- 1,000 kg: 20 ฿/credit (20,000 ฿ total)
- Custom: 25 ฿/credit
- users: User accounts (personal/corporate)
- transactions: Sale/purchase records
- notifications: Real-time alerts
- credits: Corporate credit purchases
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
npx prisma studio # Open Prisma Studio
npx prisma db seed # Seed database with mock data
npx prisma migrate dev # Run database migrations- Push to GitHub
git push origin main-
Import to Vercel
- Go to https://vercel.com/new
- Import your GitHub repository
-
Add Environment Variables
DATABASE_URL: Your Neon PostgreSQL connection stringNODE_ENV: productionNEXT_PUBLIC_APP_URL: Your Vercel domain
-
Deploy! 🚀
- Sell Plastic: 4-step process - Upload photos, select material type, confirm, get notification
- Reputation System: Auto-upgrade tiers based on points (Bronze → Silver → Gold → Platinum)
- Real-time Notifications: Track transaction status and tier upgrades
- Transaction History: View all sales and earnings
- Buy Plastic Credits: Purchase verified recycling credits with packages
- Impact Tracking: Monitor your sustainability contribution
- Certificate Generation: Download official certificates (PDF)
- Cost Transparency: Detailed breakdown with transaction fees
- Transaction Approval: Approve/reject pending sell orders
- Monitor Purchases: Track corporate credit purchases
- Database Management: Reset database with fresh seed data
MIT License - Built for PIM Inter Hackathon 2025