Inspiration

We started with a question from Dario Amodei's essay Machines of Loving Grace: what would it look like if AI genuinely improved the economic lives of people who have been left out of every previous technological wave?

The answer, for us, was personal. One of us has a relative who sells fabric at Kantamanto. She has been in business for over a decade. She works harder than almost anyone we know. And she has never once known her actual profit margin — not because she isn't smart, but because no tool has ever been built for her.

That's the inspiration. Not a statistic. A person.

The ILO estimates that over 80% of Ghana's employed population works in the informal economy. Millions of traders, vendors, artisans, and seamstresses make daily business decisions — pricing, restocking, buying in bulk — based entirely on intuition and what the trader next to them is doing. Most have no access to accountants, business advisors, or even basic financial literacy tools designed for their context.

Dario Amodei writes about the "compressed 21st century" — the idea that AI could deliver decades of economic progress in just a few years. MarketIQ is our small attempt to make that compression real, starting with one trader, at one market, with one honest look at whether their business is actually working.


What it does

MarketIQ is a micro-business intelligence platform for Ghana's informal sector traders. It does four things:

1. Reveals real profit. Traders enter their cost price, selling price, and daily sales. MarketIQ calculates their true gross profit and margin — including the costs they often forget to count (transport, market fees, spoilage). Many traders discover for the first time that certain products are selling at a loss.

2. Recommends optimal pricing. The Claude AI engine analyzes the trader's cost structure, current margin, and sales velocity and recommends a price that maximizes profit without pricing them out of the market. Every recommendation shows its reasoning and assumptions transparently — no black box.

3. Predicts demand. Using 30 days of daily sales history, the system forecasts how much of each product the trader is likely to sell in the coming week. This tells them whether to hold stock, sell aggressively, or prepare for a surge.

4. Triggers restock alerts. Based on current stock levels and predicted sales velocity, MarketIQ tells traders exactly when they will run out and how much to buy — preventing the lost revenue that comes from being out of stock on your best-selling items.

The system works in English and Twi. It runs on any smartphone browser. It requires no installation and no account creation.


How we built it

We used the Hybrid Approach: Claude Code to build our infrastructure, and the Claude API to power our AI intelligence layer.

Backend: Node.js with Express, built with Claude Code as our engineering partner. We used MongoDB with Mongoose for the database, structured around four core models: User (trader profile), Product (inventory + pricing), SaleRecord (the immutable financial history), and AIInsight (cached AI recommendations).

AI Integration: The Anthropic Claude API (claude-sonnet-4-6) powers two engines. The Demand Prediction Engine feeds 30 days of daily aggregated sales data to Claude with a structured system prompt that asks for a unit forecast, confidence level, and key assumptions. The Price Recommendation Engine sends the full product context — cost price, current margin, sales trend, market type — and receives a recommended price with full reasoning.

Claude's output is always parsed into structured JSON and rendered as dashboard cards. Traders never see a chat interface. They see a clean insight with a number, a reason, and a disclaimer. We cache every AI response in MongoDB with a TTL expiry to minimize API calls and protect budget.

Frontend: React, built with assistance from Claude Code and styled for mobile-first use. The dashboard shows live profit, revenue trends, top products, and AI insight cards. A Twi language toggle switches both the UI copy and Claude's response language.

Architecture decisions we made deliberately:

  • Repository pattern to separate DB logic from business logic (testable, swappable)
  • Separate rate limiters for AI endpoints (20/hour) vs general API (100/15min)
  • Soft deletes on products to preserve historical sale integrity
  • Graceful AI degradation — the core product works completely without Claude if the API is unavailable

Challenges we ran into

Prompt engineering for structured, trustworthy output. Getting Claude to produce recommendations that are specific enough to be useful but honest enough about uncertainty was harder than expected. Early prompts produced confident numbers without caveats. We spent significant time crafting system prompts that force Claude to show its assumptions, flag low-confidence predictions, and always include a "this is a recommendation, not a guarantee" statement that feels natural rather than legal boilerplate.

The transparency problem. Our biggest ethical design challenge was this: how do you show AI reasoning to a trader who didn't ask for a lecture? Too little explanation and it feels like magic — the trader doesn't know whether to trust it. Too much and they ignore it. We landed on a three-part card structure: the recommendation upfront, one sentence of reasoning, and an expandable "how we calculated this" section for traders who want to go deeper.

Balancing scope with polish. We had ten features we wanted to build and time for three. Cutting the loan readiness report, the USSD interface, and the voice input was painful because those are the features that would most expand access to traders without smartphones. We made peace with it by treating this as version one of something real, not a hackathon project we abandon on Sunday.

Making MongoDB aggregations work for time-series AI input. The demand prediction engine needs 30 days of daily sales grouped by date — not just a raw list of transactions. Writing the aggregation pipeline to produce clean, date-filled arrays (including days with zero sales, which Claude needs to detect slow periods) took more iteration than expected.


Accomplishments that we're proud of

We're proud that Claude is invisible to the user. That sounds paradoxical for an AI project, but it's exactly right. The trader doesn't chat with an AI. They enter their data and see insight. The AI is the engine, not the interface. That distinction — AI as infrastructure, not spectacle — is what separates MarketIQ from a chatbot with a business theme.

We're proud of the transparency layer. Every recommendation shows the math. Every AI output includes the assumptions Claude made. A trader can look at a price recommendation and say "wait, that doesn't account for the fact that prices drop at this market on Fridays" — and they'd be right to push back. We designed for that. The tool is smarter when the trader is skeptical of it.

We're proud that the system degrades gracefully. The core product — profit tracking, inventory management, restock alerts based on sales velocity — works entirely without Claude. AI adds the layer of interpretation. But a trader who loses connectivity in the middle of a market doesn't lose their dashboard.

And we're proud that we built it for Auntie Akua, not for the demo. Every design decision — the Twi toggle, the one-minute data entry flow, the mobile- first layout, the plain-language disclaimer — came from asking: would someone at Makola actually use this?


What we learned

We learned that the hardest part of building AI products for underserved users is not the AI — it's the interface design. Getting Claude to produce a good price recommendation is a prompt engineering problem. Getting a trader at Kejetia to trust and act on that recommendation is a design, language, and trust problem. The second problem is harder and more important.

We learned that transparency is a feature, not a disclaimer. Showing the math doesn't make users more confused — it makes them more confident. When people can see why the system says what it says, they engage with it rather than either blindly following or ignoring it.

We learned that scope discipline is a form of respect for your users. Every feature we didn't build is one more thing that couldn't break, one fewer thing a trader would have to learn. A product that does three things extremely well is more useful than one that does ten things adequately.

And we learned — or confirmed — something from Dario Amodei's essay: the returns to intelligence are highest when they're applied to problems where people currently have no access to expertise at all. Traders who had zero access to business advice now have access to something that reasons carefully about their specific situation. The delta is enormous, even if the product is simple.


What's next for MarketIQ

Loan Readiness Report. One of the biggest barriers to business growth for informal traders is access to credit. Banks and microfinance institutions ask for business records that traders don't have. MarketIQ already generates those records. The next step is a formatted "business credibility report" — a structured summary of 90 days of revenue, profit, and sales trends — that a trader can print or share digitally when applying for a loan. This turns MarketIQ's data into economic access.

Voice input in Twi. Many traders at rural markets are comfortable speaking but prefer not to type. A voice-first data entry mode — "I sold 12 pieces of fabric today at 35 cedis each" — would dramatically lower the barrier to use.

USSD interface. Smartphones are common in Accra but not universal across Ghana. A USSD interface (*123#) would bring MarketIQ to feature phone users at no data cost — the way mobile money reached people before smartphones did.

Offline-first mode. Markets have intermittent connectivity. A service worker-based offline mode would let traders record sales with no signal and sync when connectivity returns.

Expand across West Africa. The informal economy problem is not unique to Ghana. Makola has equivalents in Lagos, Abidjan, Dakar, and Nairobi. The system prompt is the easiest thing to localize. MarketIQ's architecture was built to support multiple markets and currencies from day one.

The vision, eventually, is what Amodei calls "biological freedom" but for economic life: every trader having access to the same quality of business intelligence that a large company has, regardless of whether they finished secondary school or can afford an accountant. That's the destination. Today is the first step.

Built With

Share this project:

Updates