Inspiration
PlotTwist started from a shared challenge of wanting to garden, but not knowing where to start. The internet has so much contrasting, and unreliable gardening advice.
But this project isn't just about a hobby being tricky, it ties into massive global challenges. There is a significant environmental cost of getting food to our plates. York University research shows that food-transport emissions make up 20% of all Canadian greenhouse gases. Even worse, Canada wastes nearly 2 million tonnes of food every year, equivalent to 10 million tonnes of CO₂ emissions or 2 million cars on the road. We built PlotTwist to improve sustainability and help anyone start their own garden and grow food, no matter their gardening experience.
What it does
PlotTwist is an intelligent, gamified gardening app that removes the research and pre-planning of growing food by providing optimized garden layouts, providing curated plant notifications, and tracking environmental impact all while making the process feel like a game.
- Snap & Plant: Take a photo of your backyard space and pick what you want to grow. Our computer-vision layout tool automatically maps out an optimized grid, pairing plants based on size, soil needs, and companion-planting science (how well some plants grow together).
- The Learn Hub: Search for tips directly in the app, no more endless Googling. We built an in-app search engine that provides custom summary articles by finding curated tips, blog posts, Wikipedia articles. It even pulls YouTube videos directly into your dashboard.
- Smart Weather & Tasks: Using your live location, the app watches the weather to send real-time watering alerts, harvest countdowns, and local weather advice.
- Gamified Sustainability: To help habits stick, we built a competitive XP system. You earn points for keeping up with your garden (like +2 XP for watering on time) and lose them if you slack off (-4 XP for a missed watering). You can even compete with friends on a live leaderboard.
How we built it
To create the app fast, we optimized our workflow:
- The Setup: We brainstormed the UI visuals in Base44, then accelerated our actual coding loops using Cursor and Claude Code to build out our frontend in React, TypeScript, and Vite.
- The Custom Database: Because there was no readily available, all-in-one dataset, we found scattered data sources and used MongoDB to aggregate the information into a single, cohesive database:
- PlantNet API handles the photo ID to figure out exactly what plant you’re looking at.
- OpenPlantDB and Perenual verify plant grouping and spacing rules as well as provide care details.
- Open-Meteo feeds our localized weather engine.
- Our World in Data and City of Toronto food waste audits provide accurate carbon-offset data.
- Identity: We integrated Auth0 to handle user accounts safely, linking auth IDs to MongoDB to sync friend lists, game states, and the real-time leaderboard.
Challenges we ran into
- Grid Fragmentation: Our layout algorithm originally used a greedy approach, but it had a bad habit of dodging obstacles (like a stray bicycle left in the yard) by splitting the remaining space into completely unusable, 1-wide gutter strips. To solve this grid fragmentation, we used a perimeter-contact bonus from a rectangle-packing literature, forcing plant blocks to hug the walls and each other.
- Target Starvation: We ran into an issue where a user's high-priority "hard target" (like a massive watermelon) would get completely starved of space because taller, faster filler plants stole the geometry. We fixed this by rewriting the backend to use a two-phase placement model: you must-have crops claim their territory first, and the app treats your wishes as promises, not preferences.
- Lack of Data & Consolidation: Finding clean, reliable data was a major challenge. There wasn't a readily available dataset that connected plant biology, companion metrics, and carbon calculations. We had to manually find, scrape, and cross-reference multiple sources to create a single database that our app could query in real time.
- The Spatial Grid & Scaling: Mapping a skewed, flat smartphone photo of a backyard into a perfectly scaled 2D grid was very difficult. Turning the pixels into physical dimensions for exact plant spacing required a lot of testing. On top of that, uploading raw photos ruined dimensions entirely. To fix this, we implemented a "reference object" option, allowing users to place a standard object (like a coin) in the frame so the app could accurately calculate the real measurements.
Accomplishments that we're proud of
- Making gardening easier: We built a tool that genuinely makes sustainable living accessible. By automating the gardening layout, companion matching, and science-heavy planning, anyone can start a garden without feeling overwhelmed or having to do extensive research.
- Gamification: The combination of positive reinforcement from XP (like +2 XP for watering) and friendly competition helps turns boring plant maintenance into a fun daily routine.
What we learned
- Data Scavenging: We realized that building a great app often means data engineering from scratch. Specifically, we learned how to aggregate various open-source datasets into a functional backend.
- Tiny Habits, Big Impact: We realized that a simple hobby app can have a genuine impact against climate change when adopted by a community.
- Full-Stack Integration: We learned how to combine completely independent external tools like machine learning vision, weather data, and cloud authentication into a single user experience.
What's next for PlotTwist
- Better Grid Detection: We want to upgrade the camera tool from static photos to live edge detection, making grid mapping on uneven terrain or abnormal shapes more accurate.
- Local Marketplace: We want to build an in-app marketplace like UberEats, but for gardening. By partnering with local community gardens and major retailers, users could instantly order the exact soil refills, gear, or seeds tailored to their current garden setup.
Built With
- auth0
- javascript
- mongodb
- open-meteo
- openplantdb
- perenual
- plantnet
- python
- react
- typescript
Log in or sign up for Devpost to join the conversation.