Green Market Farm
Green Market Farm is a full-stack digital commerce and operations platform built for a single family-run farm. Rather than functioning as just another ecommerce site, it is designed to support the full lifecycle of a small agricultural business: selling products, managing inventory, fulfilling orders, advertising to customers, and reducing operational friction through AI-assisted workflows. The platform combines a customer-facing storefront with an internal management dashboard so that both commerce and farm operations happen inside one connected system.
Customer Storefront and Core Ordering Flow
The public-facing Customer Storefront is designed for polished, accessible shopping, allowing customers to browse, sort, view product details, add items to a cart, and complete purchases via Stripe Checkout. This structured digital catalog solves a visibility problem, making the farm easier to discover, trust, and buy from.
The Cart and Checkout flow is simple yet secure, with client-side cart state persistence, and a backend revalidation of pricing and stock from the database before provisional order creation and Stripe redirection, which protects against stale inventory, incorrect totals, and manipulated requests, ensuring a smooth UX and defensible transaction pipeline.
Finally, the platform supports both Guest and Account-Based Ordering to remove friction for casual buyers while providing authenticated users with order tracking and convenience, which keeps the farm approachable while maintaining structure for managing purchases and follow-up communication.
Admin Dashboard
The admin dashboard is the operational core of the platform. It centralizes the tasks that farm staff need to handle every day, including product management, inventory updates, order fulfillment, event publishing, customer communication, and outreach. The dashboard also surfaces business metrics like revenue, active orders, low-stock alerts, and sales patterns. This matters because the platform is not only helping the farm sell online; it is helping the farm run more clearly and efficiently behind the scenes.
Product and Inventory Management
The inventory system allows farm staff to create products, edit descriptions and pricing, adjust stock, toggle availability, and remove items from the storefront through soft deletion. That soft delete strategy is especially meaningful because it preserves historical order integrity even when a product is no longer sold. Seasonal availability windows also make the data model more realistic for agricultural products, where timing is often just as important as quantity. Instead of treating products as static ecommerce entries, the platform models them as part of a changing farm inventory cycle.
Order Lifecycle Management
Orders are treated as operational objects, not just payment confirmations. They move through statuses such as placed, confirmed, preparing, ready, fulfilled, cancelled, failed, or abandoned. This gives the farm a much more accurate picture of where work stands. A paid order may still need to be packed or staged before pickup, so distinguishing between payment completion and fulfillment readiness makes the workflow more realistic. This also improves customer communication because updates can reflect the true state of the order rather than a binary paid or unpaid view.
Stripe Payment Architecture
Stripe is used not simply as a payment widget, but as part of a webhook-driven order confirmation system. The application creates a provisional order before redirecting to Stripe Checkout, then waits for verified webhook events to finalize payment outcomes. On successful completion, the system confirms the order, updates inventory, stores relevant Stripe identifiers, and triggers notifications. The use of webhook idempotency ensures duplicate events do not create inconsistent order states. This gives the payment system the kind of reliability expected in a real production workflow.
Advertising, Outreach, and Customer Retention
The Green Market Farm platform addresses the challenge small farms face with ongoing advertising by embedding outreach directly into the product. The system provides a multi-channel approach to communication, starting with the Weekly Newsletter System, which acts as a recurring promotional channel. Staff can compose and distribute updates from the admin dashboard to subscribers, which helps build long-term customer relationships and maintains the farm's visibility even when customers are not actively browsing the site, thereby strengthening retention and encouraging repeat purchases.
Beyond marketing, the platform supports crucial operational and customer-service communication:
- Twilio SMS Notifications provide immediate, timely updates, such as alerting customers when an order is ready for pickup, separating this critical, quick visibility from the broader engagement handled by email.
- Events and Community Engagement allows staff to publish farm dates and events, expanding the site's role beyond pure commerce and creating additional touchpoints.
- Contact Inbox and Customer Messaging centralizes customer questions submitted through the storefront, allowing staff to read, archive, and respond from the admin dashboard without needing a separate CRM, which improves the organization and continuity of all non-purchase-related customer interactions.
Media Gallery and Visual Branding
The media gallery gives the farm a way to visually communicate trust, freshness, and local identity. Staff can upload and manage images that showcase products, the farm environment, and events. While technically this is a storage and content-management feature, its larger value is in branding. Small businesses often benefit from authenticity and visual presence, and this feature helps the platform feel more personal and community-rooted rather than purely transactional.
AI Features
The Green Market Farm platform features several integrated AI capabilities:
- AI Product Image Analysis utilizes Google's Gemini 2.5 Flash model to generate structured suggestions for product details, such as name, description, and price, from a photo upload, which significantly reduces the manual burden of catalog creation by offering an editable draft.
- AI Voice Assistant for Farm Operations allows staff to use spoken commands to check inventory, update stock, and manage order fulfillment. This assistant uses Gemini 2.5 Flash to interpret intent, with actions safely executed via controlled backend tools.
- Speech Transcription for Voice Workflows uses Deepgram's Nova-2 model to convert audio to text, which simplifies operational actions over traditional admin screens.
- Semantic Enrichment and Embeddings expands product data into richer, search-oriented text via Gemini 2.5 Flash, then embeds it using OpenAI's
text-embedding-3-small(1536-dim, stored in pgvector with an HNSW index), establishing a technical foundation for future semantic search and intelligent product retrieval.
Analytics and Reporting
The analytics layer helps the farm move beyond simply recording transactions and toward understanding business patterns. Revenue summaries, order counts, low-stock alerts, top-performing products, and busy-day trends help turn raw data into decisions. For a small business, this kind of visibility can shape how inventory is managed, what gets promoted, and when to prepare for higher demand. The dashboard therefore acts not only as a management tool, but as a lightweight decision-support system.
Authentication and Role-Based Access
Authentication is handled through Supabase Auth, with role-aware permissions layered on top. This allows the system to distinguish between customers and internal farm users, protecting operational routes while keeping the public-facing experience simple. Role-based access matters here because the platform combines storefront functionality with sensitive internal workflows, and those two sides need to coexist without exposing administrative capabilities publicly.
What's in the Future
We fully believe in our fleshed-out marketplace system for Green Market Farms, but we believe we can also use what we built to help other local vendors in the Blacksburg and surrounding areas. Therefore, we plan to get in touch with Blacksburg Farmer's Market to expand our storefront into a vendor marketplace with multiple storefronts linked to the same marketplace catalog.
Summary
Taken together, Green Market Farm is not just a website for selling produce. It is a unified farm operations platform that combines ecommerce, advertising, customer communication, analytics, and AI-assisted workflows into one system. The AI features are a major part of that value: they help reduce the manual burden of catalog management, make operational actions more accessible through voice, and lay the groundwork for more intelligent search and discovery. The result is a platform that gives a small farm not only a digital storefront, but a smarter and more sustainable way to run and promote its business.
External Links
Web Application Live Link: https://greenmarketfarm.vercel.app/ (Test farmer-side using this login): email - greenmarketfarms1@gmail.com password - GreenMarketFarms2006
Technical Documentation: https://docs.google.com/document/d/19Me2QOu15SgQV33hkjFOUHfMJ7uwaI_FMtZ3St53j2M/edit?usp=sharing
GitHub Repo: https://github.com/VibhavTh/GDG_Hackathon
Built With
- css
- eslint
- gemini2.5flash
- git
- github
- haiku4.5
- html
- javascript
- next.js
- node.js
- nova-2
- oauth
- openai-text-embedding-3-small
- postgresql
- react
- resend
- stripe
- supabase
- tailwind
- twilio
- typescript
- vercel
- zustand
Log in or sign up for Devpost to join the conversation.