Skip to content

samikciku/hackthetrash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—‘οΈ HackTheTrash

A crowdsourced web platform where citizens report illegal landfills with photos + GPS coordinates, helping authorities and communities clean up the environment.

Status License

Public map Photo-first /report Authority Dashboard
Public map Report page Dashboard

🌍 What is HackTheTrash?

Illegal trash dumps pollute our forests, rivers, and neighborhoods. HackTheTrash lets anyone snap a photo, share their GPS location, and create a public, verifiable map of trash hotspots β€” so cities, NGOs, and volunteers can clean them up.

✨ Features

  • πŸ“Έ Submit reports β€” photo upload + GPS auto-detection
  • πŸ—ΊοΈ Interactive map β€” public, color-coded by status
  • 🏷️ Tags & severity β€” categorize trash (plastic, e-waste, hazardous…)
  • βœ… Moderation system β€” verify reports, merge duplicates
  • πŸ›οΈ Authority dashboard β€” track and resolve cleanups
  • πŸ† Gamification β€” badges for active reporters
  • πŸ”’ Privacy first β€” anonymous reporting, EXIF stripping

πŸ› οΈ Tech Stack

Layer Tech
Frontend (web) Next.js 14 + TypeScript + TailwindCSS + Leaflet
Mobile app React Native + Expo + Leaflet (WebView)
Backend Node.js + Express + TypeScript
Database PostgreSQL + PostGIS
Storage AWS S3 / Cloudinary
Auth JWT
Hosting Vercel + Railway + EAS Build

πŸ“‚ Project Structure

hackthetrash/
β”œβ”€β”€ frontend/          # Next.js app
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/       # Routes (report, map, dashboard, auth)
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   └── styles/
β”‚   └── public/
β”œβ”€β”€ backend/           # Express API
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ ai/        # Pluggable image classifier
β”‚   β”‚   β”œβ”€β”€ db/        # Migrations + seeds (PostGIS)
β”‚   β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   └── services/
β”‚   └── uploads/
β”œβ”€β”€ mobile/            # React Native (Expo) app
β”‚   β”œβ”€β”€ App.tsx
β”‚   β”œβ”€β”€ src/screens/   # Home, Report (camera+GPS), Map (OSM), Success
β”‚   └── src/lib/
β”œβ”€β”€ docs/              # Wireframes, mockups, architecture, API docs
└── scripts/           # Dev / deployment scripts

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • PostgreSQL 14+ (with PostGIS extension)
  • npm or pnpm

Installation

git clone https://github.com/yourusername/hackthetrash.git
cd hackthetrash

Option A β€” Docker Compose (everything, including Postgres+PostGIS):

docker compose up --build
# Web:     http://localhost:3000
# API:     http://localhost:4000
# DB:      postgres://htt:htt@localhost:5432/hackthetrash

Option B β€” Local Node (no Docker):

# Cross-platform (macOS / Linux / Windows):
node scripts/setup.mjs       # install backend + frontend deps
node scripts/dev.mjs         # start both services with prefixed logs

# Or platform-specific helpers:
bash scripts/setup.sh && bash scripts/dev.sh        # bash
pwsh scripts/setup.ps1; pwsh scripts/dev.ps1        # PowerShell

Environment Variables

Copy .env.example to .env in both frontend/ and backend/:

# backend/.env
DATABASE_URL=postgresql://user:pass@localhost:5432/hackthetrash
JWT_SECRET=your_secret_here
PORT=4000
S3_BUCKET=...
# frontend/.env.local
NEXT_PUBLIC_API_URL=http://localhost:4000
NEXT_PUBLIC_MAPBOX_TOKEN=...

πŸ—ΊοΈ Roadmap

  • Project scaffold
  • MVP submission form + map
  • Moderation panel
  • Authority dashboard
  • PostgreSQL + PostGIS schema & migrations
  • AI image verification (pluggable, HuggingFace ready)
  • HTML mockups
  • Mobile app (Expo)
  • Push notifications + offline queue
  • i18n English + Albanian (Pristina-focused)

See docs/ROADMAP.md for full details.

πŸ“š Docs

🀝 Contributing

Contributions welcome! Please read CONTRIBUTING.md.

πŸ“œ License

MIT Β© 2026 HackTheTrash Contributors

πŸ’š Acknowledgements

Built for a cleaner planet 🌱


Powered by FLOSSK

About

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors