MarketMind — Devpost Submission
Agentic Commerce Platform for Independent African Sellers
Hackathon: Hack0 · AWS + Vercel Track Live Demo: https://marketmind.vercel.app GitHub: https://github.com/hallelx2/marketmind
Inspiration
Nigeria has over 40 million micro and small businesses. Most of them sell through WhatsApp status updates, Instagram DMs, and informal markets — not because they don't want a real online store, but because building one requires skills, time, and money they simply don't have.
At the same time, the buyers who want to shop from these sellers face the opposite problem: they can't find them. There's no single place where a buyer can say "I need a handmade leather bag under ₦20k that ships to Abuja" and get a real answer.
We asked: what if building a store was as easy as having a conversation? What if shopping was too?
MarketMind was born from that question.
What it does
MarketMind is a centralized multi-vendor agentic commerce platform — think Shopify meets a personal shopping assistant, rebuilt from the ground up around AI.
The Network Model
Every seller on MarketMind feeds into a single, global product catalogue. This is a deliberate architectural choice: it makes the platform's AI features dramatically more powerful than a single-seller tool ever could be.
For sellers — the Studio: A seller signs up and opens the AI Store Setup wizard. They answer questions in plain language ("I sell handmade leather wallets and bags in Lagos, prices from ₦6k to ₦25k, I ship nationwide"). Gemini 2.5 Flash extracts their store name, tagline, categories, shipping policy, and pricing strategy — and builds their full storefront automatically. No forms. No agency. No tech skills required.
From the Seller Dashboard, they can add products via the AI Studio: upload a photo, write a short note, and Gemini generates a full product listing — SEO title, description, five highlights, ten search tags, and a category suggestion. Or they can generate a professional product photo from a text prompt, which is instantly uploaded to Vercel Blob CDN.
For buyers — the Agent: A buyer visits MarketMind and opens the AI Shopping Agent. They type in plain English: "Find me a handmade bag under ₦25k that ships to Lagos." The agent searches the entire product database across all sellers, compares options, surfaces the best matches with prices and seller info, and lets the buyer ask follow-up questions — all in chat. No scrolling through category grids. No opening 50 different seller tabs.
Why the centralized architecture matters:
- Cross-vendor comparison only works if the agent has access to all sellers simultaneously
- Algorithmic matching ("top 3 handmade items from 3 different creators") creates value no single seller could replicate alone
- Buyers don't want to manage relationships with 50 independent sellers — they want one trustworthy interface
How we built it
Architecture
Next.js 16 (App Router)
├── Seller Dashboard → Aurora PostgreSQL (IAM auth via @aws-sdk/rds-signer)
├── AI Store Builder → Gemini 2.5 Flash (streamText + useChat)
├── Seller Studio → Gemini 2.5 Flash (Output.object for structured copy)
├── AI Image Gen → Gemini Imagen → Vercel Blob CDN
├── Buyer Agent → Gemini 2.5 Flash (streamText + tool calling)
├── Embeddings → text-embedding-004 (semantic search)
└── File Storage → Vercel Blob (public CDN)
Key technical decisions
Vercel AI SDK 6 + @ai-sdk/google
We used the latest AI SDK (v7 at time of writing) throughout. The buyer agent uses streamText with three server-side tools (search_products, compare_products, get_product_detail) and stepCountIs(10) for loop control. The store builder uses streamText with convertToModelMessages and a detailed system prompt that guides the seller through five stages. Product copy generation uses Output.object() with a Zod schema to get structured JSON (title, description, highlights, tags) back from Gemini in one call.
Amazon Aurora PostgreSQL
All data — users, stores, products, orders, reviews — lives in Aurora. We use AWS IAM authentication via awsCredentialsProvider from @vercel/functions/oidc and the @aws-sdk/rds-signer token signer, so there are no static database passwords anywhere in the codebase. The schema uses six normalised tables with foreign keys, indexes on all FK columns, and TIMESTAMPTZ throughout.
Vercel Blob
Product images — whether uploaded by the seller or AI-generated by Gemini — go through a single /api/upload route and land on Vercel Blob as public CDN assets. The returned URL is stored in Aurora as thumbnail_url. This means images are served globally with zero latency from the same Vercel edge network as the application.
Neobrutalist design system
We built a full custom design system instead of using a component library theme. Tokens: #F5F0E8 warm off-white background, #FF4500 electric orange primary, #2D2DFF electric blue accent, #1A1A1A jet black. Every card uses a 2px solid black border with a hard 4px 4px 0px #1A1A1A shadow. Space Grotesk for headings, Inter for body text.
Challenges we ran into
IAM authentication in a serverless environment
Aurora PostgreSQL with IAM auth is non-trivial in a serverless context. The awsCredentialsProvider from @vercel/functions/oidc needs the OIDC token from Vercel's infrastructure to assume the correct IAM role. Getting the trust relationship between the Vercel OIDC provider and the AWS IAM role right — and understanding that signer.getAuthToken() needs to be called as a function (not a resolved value) so the connection pool refreshes it before the 15-minute expiry — took significant debugging.
AI SDK message format mismatch
The AI SDK v6/v7 distinguishes sharply between UIMessage (from useChat, has a parts array) and ModelMessage (for server functions, has a content field). Every route that receives messages from the client must call await convertToModelMessages(messages) before passing them to streamText. We hit several cryptic errors before fully internalising this distinction.
Streaming errors vs thrown errors
streamText returns synchronously — the stream is lazy. Errors from Gemini surface inside the stream, not as thrown exceptions. This means a try/catch around streamText(...) catches nothing; errors must be handled via the onError callback or surfaced as {"type":"error"} SSE events to the client. We added a GEMINI_API_KEY guard at the route level to return a clean 503 before the stream even starts.
Template literal shadowing
In the buyer agent route, the search tool's input parameter was named query — which shadowed the imported query database function from lib/db.ts. TypeScript surfaced this as "Type 'String' has no call signatures" at the line where we called query(sql, params), not at the shadowing declaration. The fix was renaming the parameter to searchQuery.
Environment variable availability
GEMINI_API_KEY was added to Vercel project settings but the local sandbox needed a restart to pick it up from .env.development.local. The pattern we landed on: all AI routes check if (!process.env.GEMINI_API_KEY) and return a clear 503 with an actionable message, rather than letting the SDK throw an opaque error mid-stream.
Accomplishments that we're proud of
A fully working agentic buyer experience — The shopping agent is not a gimmick. It actually calls search_products with structured filters (category, max price, shipping city), receives real results from Aurora, formats them as rich product cards in the chat, and handles follow-up questions like "compare those two" or "which one ships faster." The entire interaction feels natural.
Zero-form store setup — A seller can go from zero to a live storefront by having a five-message conversation with Gemini. No dropdowns, no text inputs, no "fill in your tagline." The AI extracts everything from natural language and the structured output lands directly in the database.
Production-grade Aurora integration — IAM auth, connection pooling with attachDatabasePool, parameterized queries throughout, TIMESTAMPTZ columns, foreign key indexes, and IF NOT EXISTS schema migrations. The database layer is genuinely production-ready, not a demo hack.
A coherent design system — Every pixel follows the same neobrutalist language. The platform has visual personality — it doesn't look like every other Tailwind + shadcn project.
Real image pipeline — Sellers can either upload a photo or describe their product in words and get a generated product photo. Both paths run through the same /api/upload → Vercel Blob → Aurora URL pipeline.
What we learned
Agentic architecture is about tool design, not model choice. The quality of the buyer agent isn't primarily determined by which model you use — it's determined by how well you define the tools' input schemas, descriptions, and return shapes. A poorly described search_products tool that returns an unstructured blob of text will confuse Gemini just as much as a weak model would. Precise Zod schemas and detailed description fields on every parameter made the difference.
Centralization is a feature, not a compromise. We initially thought about building seller-isolated agents. The moment we switched to a global product pool, the buyer experience became dramatically more valuable. The network effect is the product.
The UI/UX of streaming matters. A text stream that just dumps characters looks worse than a thoughtful loader. We spent real time on the streaming UI — the typing indicator, the tool-call "searching..." intermediate state, and the product card rendering inside the chat — because that's where the AI feels alive or feels broken.
Aurora IAM auth is worth the complexity. Having no static database passwords in the codebase is a significant security win. Once the OIDC trust relationship is configured, it's completely transparent at runtime and the tokens refresh automatically.
What's next for MarketMind
Authentication — Better Auth + session management so sellers have real accounts and buyers have persistent order history. Right now the dashboard is loaded as a seed user.
Paystack integration — Nigerian card payments and bank transfers natively, so orders can actually be completed and funds routed to sellers.
Semantic product search — The embeddings infrastructure is built (/api/ai/embed, text-embedding-004). The next step is storing vectors in a pgvector column in Aurora and wiring the buyer agent to do similarity search alongside the keyword search.
WhatsApp order notifications — Twilio or WhatsApp Business API so sellers get a WhatsApp message the moment an order comes in, since that's where most Nigerian sellers already live.
Mobile app — React Native wrapper with the same Gemini agent at the core, optimised for low-bandwidth connections.
Multi-currency — NGN is the default but USD and GBP support for diaspora buyers purchasing from Nigerian sellers.
Bulk CSV import with AI enrichment — Sellers with existing spreadsheets can upload their product catalogue and Gemini rewrites every description, generates tags, and assigns categories automatically.
Tech Stack
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript |
| Styling | Tailwind CSS v4 + neobrutalist design system |
| Database | Amazon Aurora PostgreSQL (IAM auth) |
| AI — Chat | Google Gemini 2.5 Flash via AI SDK 6 |
| AI — Structured output | Output.object() with Zod schemas |
| AI — Embeddings | text-embedding-004 |
| AI — Images | Gemini Imagen |
| File Storage | Vercel Blob (public CDN) |
| Deployment | Vercel |
| Auth (planned) | Better Auth |
| Payments (planned) | Paystack |
Team
Hallel — @hallelx2
Built solo for the Hack0 Hackathon · AWS + Vercel track · June 2026
Built With
- aurora
- typescript
- v0
- vercel
Log in or sign up for Devpost to join the conversation.