Inspiration

We were inspired by the idea that small farms and home gardens can be hard to manage, even when people are motivated to grow food. A lot of growers have to keep track of crop placement, harvest timing, inventory, local demand, and extra produce all at once. At the same time, people WANT to buy from their neighbors. Such produce is often healthier and cheaper, and it goes a long way in fostering a community. We wanted to build something that made that process easier while also encouraging people to share food locally.

What it does

Sunpatch is based on the idea that your digital farm should mirror your real farm. Instead of being a game, it is a visual planning and tracking tool that helps growers understand what is happening in their actual space. Our web-app lets users create a digital version of their real farm or garden. They can map out their growing space, organize crops, track inventory, and see useful planning information about their harvests. This is all done through an LLM-based Gemini generation pipeline. Users map their plot of land on a real satellite view, and a beatiful 3d farm is generated, which they can further plan and edit. This is powered by maplibre-gl and three.js.

The mobile app then actually connects the community to your garden. It shows other farms in the area, what they're selling, and even what the layouts of their farms look like (if shared, of course!).

Instead of extra tomatoes, herbs, or greens sitting unused, they can be shared with neighbors who actually want them.

How we built it

We built Sunpatch with Next.js, React, and MongoDB. The web app includes a real-farm planning dashboard, inventory system, marketplace pages, and AI intelligence views. The planning dashboard is powered by three.js and MapLibre GL.

For data, we used MongoDB Atlas with the MongoDB Node.js driver to store farm plans, crop layouts, inventory items, marketplace listings, shop displays, and social reviews. MongoDB’s document model worked well because each farm plan can have custom plot shapes, crops, outputs, and metadata. For the storefront image data, we used MongoDB GridFS. Instead of trying to store images as huge base64 strings inside regular documents, GridFS stores them as file data with metadata.

A major technical feature is the Gemini API integration. Users can select their real plot from a satellite-style map view, and Gemini uses that farm context to generate an optimized farm plan with crop suggestions, yield forecasts, monthly surplus predictions, farm health metrics, and planning recommendations. We used MapLibre GL for map-based plot selection and Three.js for the interactive farm visualization, so the generated plan can mirror a real physical space instead of being a fictional game map.

The Sunpatch Market app was built with Expo and React Native. It connects to the same Next.js + MongoDB Atlas backend, so users can list produce, browse nearby farm stands, and view local produce locations through React Native Maps on mobile and Leaflet on web.

Challenges we ran into

One challenge was designing Sunpatch as a real farm mirror instead of a fictional farming game. We wanted the interface to be visual and friendly, but still connected to actual planning needs. That meant thinking about real crops, real inventory, harvest timing, and local produce listings instead of fake points or levels. To solve this, we scraped dozens of websites and mapped together hundreds of real plant listings that included data such as growing conditions, temperature ranges, water needs, soil pH, sunlight requirements, soil depth, crop categories, life span, pest control tips, harvest advice, nutritional information, and estimated carbon savings. This helped make our farm recommendations feel based on real agricultural data instead of random guesses.

Another challenge was connecting multiple parts of the product into one system. The web farm planner, inventory tracker, marketplace, mobile app, database, and AI features all needed to work together. Even if each part made sense on its own, the harder part was making the whole product feel connected. Even more so, it was difficult to coordinate the work of three people to fit all this. We think we did well though!

Accomplishments that we're proud of

We're really proud of the community part of the project. The produce listing app gives growers a way to share what they have, while letting other people discover fresh local produce nearby. This supports stronger neighborhood food networks because it makes local food more visible and easier to exchange.

We're also quite proud of the design. On the one hand, we wanted the whole thing to feel warm and friendly. You should open your farm and feel proud! On the other hand, we also wanted people to want to keep coming back to their farm. To accomplish these goals, we drew inspiration from indie games such as Stardew Valley. These games feel "comfy", but are also obviously fun! This is exactly what we needed, and I think we pulled it off quite well.

What we learned

We learned that building tools for real-world workflows is different from building a simple demo. A farm has physical space, seasonal timing, crop needs, inventory, and community connections, so the app had to account for a lot of moving parts.

We also learned a lot about full-stack development. We worked with Next.js, React, API routes, MongoDB, Expo, maps, and AI-generated insights. We had to think about frontend design, backend data, mobile compatibility, and how to make everything communicate correctly.

Most importantly, we learned that technology can help local communities when it is focused on real needs. Sunpatch is not just about tracking produce; it is about helping people grow food, use their harvest better, and connect with others nearby.

What's next for Sunpatch

We want to deploy Sunpatch out into the real world to see if it facilitates real connections. It can start simple: just the marketplace app for users and partnered farms. With more traction, we can then deploy the farm planning aspect, but this can come later. We actually really love this idea, and personally know farms that have issues selling produce. As soon as we drive back to SLO, we plan on contacting these people to see if they'd be open to trying something like this, especially given that there are no drawbacks to it.

Built With

+ 4 more
Share this project:

Updates