Track your plastic. Reduce your footprint. Earn your place on the planet
PlastiTrack is an open-source web application that helps individuals and communities take meaningful action against plastic pollution β one log at a time. Users can record what plastic they collect, visualize their environmental impact, discover nearby eco-friendly locations, and earn badges for their efforts.
Plastic pollution is one of the most visible and solvable environmental crises of our time. Yet most people have no easy way to measure or celebrate the small actions they're already taking β picking up a bottle on a walk, swapping a bag, choosing a refill station.
PlastiTrack gives those actions a home. It turns everyday eco-habits into trackable data, community motivation, and real environmental metrics.
Log every piece you collect or avoid. Capture the type (PET, HDPE, LDPE, etc.), quantity, and weight. Attach a proof photo to keep it honest and shareable.
Find and pin eco-friendly spots on an interactive Leaflet map β refill stations, eco shops, and recycling points. Every visited pin reinforces better habits in the real world.
See the aggregated effect of the entire PlastiTrack community: total plastic saved, COβ reduced, water conserved, and users joined. Individual actions, collective numbers.
Charts powered by Recharts show your weekly plastic-reduction trend. Compare your personal totals against the global picture and watch your contribution grow over time.
Google Gemini (via Firebase Genkit) generates fresh, personalised tips each week for reducing plastic consumption β including a zero-waste recipe recommendation that minimises packaging.
A points system rewards every log submission (10 eco points per entry). Unlock milestone badges β Plastic Saver, Water Warrior, Eco Hero, and Planet Protector β as your impact grows.
Clean, mobile-first layout with dark mode support (next-themes), keyboard-navigable components (Radix UI), and ARIA-friendly markup throughout.
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router, React 19) |
| Language | TypeScript 5 |
| Styling | Tailwind CSS 3 + shadcn/ui + Radix UI |
| Charts | Recharts |
| Maps | Leaflet + React-Leaflet |
| AI | Google Gemini 2.5 Flash via Firebase Genkit |
| Forms | React Hook Form + Zod validation |
| Animations | Framer Motion |
| Deployment | Vercel / Firebase App Hosting |
PlastiTrack/
βββ src/
β βββ ai/
β β βββ genkit.ts # Genkit + Google AI initialisation
β β βββ flows/
β β βββ weekly-plastic-reduction-tips.ts # AI tips flow (Gemini)
β βββ app/
β β βββ dashboard/page.tsx # Main dashboard route
β β βββ challenges/page.tsx # Challenges route
β β βββ rewards/page.tsx # Rewards route
β βββ components/
β β βββ dashboard/ # Dashboard widgets
β β β βββ plastic-log-form.tsx # Log submission form
β β β βββ location-tracker.tsx # Map + nearby eco-spots panel
β β β βββ global-impact.tsx # Community-wide stats
β β β βββ personal-impact.tsx # Per-user stats
β β β βββ rewards.tsx # Points + badge display
β β β βββ tips-carousel.tsx # AI tips carousel
β β β βββ weekly-overview.tsx # Weekly chart + skeleton
β β βββ challenges/ # Challenges list + header
β β βββ map/ # Leaflet map component
β β βββ ui/ # shadcn/ui primitives
β β βββ app-header.tsx
β β βββ app-sidebar.tsx
β β βββ bottom-nav.tsx
β βββ data/
β β βββ users.json # Seed / mock user data
β βββ hooks/
β β βββ use-mobile.tsx
β β βββ use-toast.ts
β βββ lib/
β βββ utils.ts
β βββ placeholder-images.ts
βββ public/ # Static assets & challenge images
βββ docs/
β βββ blueprint.md # Original product brief
βββ next.config.ts
βββ tailwind.config.ts
βββ apphosting.yaml # Firebase App Hosting config
- Node.js 18+ and npm
- A Google AI API key (for Gemini-powered tips) β get one at aistudio.google.com
git clone https://github.com/your-username/PlastiTrack.git
cd PlastiTracknpm installCreate a .env.local file in the project root:
GOOGLE_GENAI_API_KEY=your_google_ai_api_key_herenpm run devOpen http://localhost:9003 in your browser.
To develop or inspect AI flows locally:
npm run genkit:dev| Script | Description |
|---|---|
npm run dev |
Start the Next.js dev server on port 9003 (Turbopack) |
npm run build |
Build for production |
npm run start |
Start the production server |
npm run lint |
Run ESLint |
npm run typecheck |
Type-check without emitting |
npm run genkit:dev |
Start the Genkit AI developer UI |
npm run genkit:watch |
Start Genkit in watch mode |
- Push your fork to GitHub.
- Import the repo in Vercel.
- Add
GOOGLE_GENAI_API_KEYas an environment variable. - Deploy β Vercel auto-detects Next.js and handles everything else.
We'd love your help making PlastiTrack better. Here's how to get involved:
Found something broken? Open an issue and include:
- What you expected to happen
- What actually happened
- Steps to reproduce
- Your browser and OS
Have an idea? Open a feature request issue with as much context as you can β screenshots, mockups, and use cases are all welcome.
- Fork the repo and create a new branch from
main:git checkout -b feature/your-feature-name
- Make your changes, keeping commits focused and descriptive.
- Run lint and type-check before pushing:
npm run lint && npm run typecheck - Open a pull request against
mainwith a clear description of what changed and why.
Looking for a place to start? Check issues tagged good first issue. Some ideas to get you going:
- Connect the plastic log form to a real database (Firebase Firestore is a natural fit)
- Add user authentication so logs persist between sessions
- Expand the AI tips flow to accept user-specific data as input
- Add more badge tiers to the reward system
- Write unit tests for form validation and utility functions
- Improve accessibility audit scores
- Persistent storage (Firestore integration)
- User authentication (Firebase Auth)
- Community leaderboard
- Photo upload for log proof
- Push notifications for weekly tips
- Multilingual support (i18n)
- PWA / offline support
PlastiTrack uses a consistent nature-inspired palette:
| Token | Hex | Usage |
|---|---|---|
| Primary (Forest Green) | #386641 |
Buttons, headings, icons |
| Background (Sage) | #E3E8E4 |
Page background |
| Accent (Mustard Yellow) | #D4AC0D |
Badges, highlights, CTAs |
| Font | PT Sans | All body and heading text |
This project is open source. See the LICENSE file for details.
Built with a lot of love for the planet, and powered by the open-source community behind Next.js, Tailwind CSS, shadcn/ui, Leaflet, Recharts, and Firebase Genkit.
"We don't need a handful of people doing sustainability perfectly. We need millions of people doing it imperfectly."