Inspiration

Around the Federal University of Technology, Owerri (FUTO) and neighboring Owerri communities in Imo State, Nigeria, recyclable materials like plastic bottles, aluminium cans, paper, and cardboard are often mixed with general waste because convenient collection, clear sorting guidance, and low-friction rewards are missing. At the same time, small micro-rewards are awkward over traditional banking channels, while recycling aggregators need reliable, sorted material supply.

KILN (Turn Waste Into Worth) was built to connect community suppliers, collection agents, administrators, and material buyers through a transparent operational workflow backed by Bitcoin Lightning, Nostr, AI-assisted sorting, and micro-learning.

What I Built

KILN is a full-stack web MVP built with Python, Django, PostgreSQL (with SQLite fallback), Django REST Framework, Tailwind CSS, and HTMX across modular apps (accounts, collections, materials, rewards, inventory, learning, integrations, notifications, and reporting):

  • End-to-End Collection & Verification Workflow: Users request pickups or drop-offs; collection agents accept assignments, inspect and weigh materials, and log actual vs. rejected weight and contamination notes; administrators review and approve verifications before rewards or inventory entries are created.
  • Ledger-Backed Rewards & Lightning Demo: Points are calculated from verified eligible weight using atomic database transactions and row locking, with support for Bitcoin Lightning payouts via NWC / LNURL-Pay and manual payout workflows in a safe demo-first mode.
  • Optional Nostr & NIP-07 Support: Challenge-based Nostr authentication and zero-PII Proof-of-Recycling event publishing to configured relays when enabled, without exposing user personal data or private keys.
  • AI Waste Sorter & Learn & Earn: Photo/text waste classification with sorting and contamination guidance in English and Nigerian Pidgin (including a rule-based fallback when no external AI API key is configured), paired with three short learning modules and quizzes that award a one-time bonus.
  • Inventory, Batches, Sales, Audit Logs & W2E Readiness: Tracks verified materials into inventory, batches, and buyer sales/transfers with CSV exports and append-only audit logs, while keeping recyclable streams separate from future organic Waste-to-Energy (ORGANIC_W2E) feedstock fields.

How I Built It

We structured the project around strict state transitions, Decimal arithmetic for weights and rewards, role-based access control on the backend, and low-bandwidth responsive templates designed for mobile devices and everyday network conditions around FUTO. Docker configuration (Dockerfile, docker-compose.yml), environment templates, and a seed_demo command allow local setup and end-to-end testing of the full workflow.

Challenges Faced

  • Preventing Double Credits & Invalid Transitions: Enforcing strict collection request states, preventing duplicate reward credits or negative wallet balances, and separating material transfer status from payment status required careful transactional boundaries and validation rules.
  • Balancing Hackathon Scope With Real Operations: We focused the MVP on real recycling collection, weighing, verification, inventory, and demo-safe Lightning/Nostr/AI integrations rather than building fake metrics or premature industrial Waste-to-Energy plant controls.
  • Avoiding Generic UI Clutter: Refining the interface away from generic template patterns toward clear operational hierarchy, readable tables, mobile-friendly controls, and immediate first-time visitor clarity took deliberate iteration.

What I Learned

  • Ledger Integrity Comes First: Treating wallet balances, verifications, batches, and redemptions as auditable state machines prevents subtle accounting and permission bugs early.
  • Graceful Fallbacks Matter: Designing AI classification, Lightning payouts, and Nostr publishing so they degrade cleanly when external keys or relays are unavailable makes demos and real-world pilots far more reliable.

Built With

Share this project:

Updates