Project · Full Stack
Built GreenCredits, a full-stack real-time carbon credit trading portal, solo in under 4 days for TAPMI's Ecofest 2026. Each stall measured their carbon footprint against a cap — teams in deficit bought credits from surplus teams through a live limit order book with instant automatic matching, partial fills, and escrow logic. Built, tested, and debugged entirely by me.
The Problem
TAPMI's SRME faculty wanted to run a live carbon credit trading simulation across student stalls — but couldn't find a platform that fit. The fallback was paper chits and manual batch matching: ironic for a sustainability course. I stepped in and vibecoded the entire exchange infrastructure myself.
What I Built
Orders match immediately on placement — no batch auction. Sell orders match against the highest bids first; buy orders match against the cheapest asks first. Settlement price is always the seller's ask. Partial fills are fully supported on both sides.
Every order goes through five checks: authenticated session, trading enabled by admin, account not banned, carbon balance set, and sufficient balance for sells. Credits are escrowed immediately on sell order placement.
Admin can open and close trading with a single toggle, set each team's opening carbon balance, ban accounts, and reverse any transaction directly from the panel. A system_settings table with a single trading_active flag gates all order placement across the platform.
Five Postgres tables via Supabase: teams, listings (sell orders), buy_orders, transactions (every completed trade), and system_settings. Order statuses track the full lifecycle: live → sold, open → partial → filled.
Screenshots
Stack
FRONTEND
Next.js (App Router)
DATABASE
Supabase + Postgres
DEPLOYMENT
Vercel
AUTH
Supabase Auth