Inspiration

Market Game did not start during Build Week.

I had already built it as a multi-workspace SaaS for creating and running gamified marketing campaigns. It supported quizzes, spin-to-win wheels, scratch cards and instant-win campaigns, along with lead capture, scoring, rewards, distribution links, QR codes, webhooks and analytics.

But one problem kept bothering me: even with a no-code builder, the hardest part was still left to the user.

They still had to decide which mechanic to use, what questions to ask, how to qualify leads, what results to display, how to distribute rewards and which channels to prepare.

The software made campaigns easier to configure, but it did not help enough with the thinking behind them.

OpenAI Build Week gave me the right deadline to work on the next phase I had already planned: turning Market Game into an AI-assisted campaign studio.

The goal was not to add a chatbot to the interface. I wanted GPT-5.6 to produce something the existing product could actually use.

What Market Game does

Market Game helps marketing teams create interactive campaigns designed to generate, qualify and understand leads.

A campaign can include:

  • a branded landing experience;
  • lead capture and consent;
  • scoring and qualification rules;
  • personalized results;
  • rewards and limited stock;
  • tracked hosted pages, embeds and QR codes;
  • webhooks and analytics;
  • a complete mobile-first participant journey.

During Build Week, I added the AI Campaign Architect.

The user starts with a business brief: the objective, the audience, the offer, the tone, the qualification intent, the rewards and the distribution channels.

GPT-5.6 then recommends a campaign format and generates a structured proposal containing the campaign strategy, content, questions, results, scoring, qualification rules, segments, rewards and placements.

The important part is what happens next.

The output is not displayed as a block of generated text. It is reviewed, validated and converted into a real Market Game draft. The user can edit it, regenerate a section, preview it and continue working inside the same builder used for manually created campaigns.

There is no separate AI demo and no second campaign engine.

How I built it

Market Game is built with Laravel, Inertia, React and TypeScript.

For the AI layer, I used the Laravel AI SDK with GPT-5.6.

I used different model configurations depending on the task. Campaign generation needs deeper reasoning, while mechanic recommendations, section revisions, lead summaries and campaign suggestions can use faster requests.

Every AI feature returns structured data. The server normalizes and validates that data before it can affect the product.

The AI execution layer includes:

  • versioned prompts and schemas;
  • asynchronous generation jobs;
  • retries and cancellation;
  • workspace budgets and concurrency limits;
  • token and cost estimates;
  • proposal revisions and diffs;
  • idempotent draft creation;
  • automated tests and evaluation datasets.

Codex was my main engineering partner during this phase.

I used it to audit the existing project, understand the campaign domain, challenge architectural decisions, implement backend and frontend changes, investigate security issues, add tests and keep the Build Week documentation aligned with the code.

Market Game existed before the event and had also been developed with other tools, including Cursor. I documented the baseline and the Build Week contribution separately instead of pretending the entire product appeared in one week.

The hardest part

The easy part was generating marketing copy.

The hard part was generating data that could safely become a real campaign.

A model can produce a convincing reward configuration that is logically impossible, a scoring system that contradicts the qualification rules, or a campaign structure that looks correct but cannot be published.

I did not want GPT-5.6 to become the source of truth.

The model creates a proposal. Market Game still owns the business rules.

Generated data goes through schemas, normalization, domain validation and human review. Rewards, publication, integrations and other consequential actions remain inactive until the user explicitly confirms them.

Another challenge was integrating AI without duplicating the existing builder. Creating a parallel “AI builder” would have been faster for a demo, but it would have created two products that would eventually drift apart.

Instead, the AI proposal is converted into the same campaign definition used everywhere else in Market Game.

Security and control

Market Game can optionally analyze a public brand website to understand its tone and visual identity.

That feature introduced real risks: SSRF, unsafe redirects, oversized responses and prompt injection hidden inside external content.

The brand fetcher only accepts validated public HTTPS destinations, blocks private and metadata addresses, limits response size and time, restricts accepted content types and treats downloaded content as untrusted data.

AI usage is also controlled per workspace. Runs are tracked, budgeted and limited, because an unlimited AI endpoint inside a SaaS product would be a surprisingly efficient way to create a financial problem.

What I learned

The biggest lesson was that adding AI to a real product is not mainly about the API call.

The difficult work is everything around it:

  • deciding what the model is allowed to influence;
  • validating what it returns;
  • handling incomplete or invalid output;
  • controlling cost;
  • keeping a human in charge;
  • and making the feature fit the product instead of sitting beside it.

I also learned how valuable an existing domain model can be.

Market Game already understood campaigns, rewards, leads, scoring, placements and analytics. That allowed GPT-5.6 to act as a planner without becoming the system of record.

Codex was most useful when I treated it as an engineering collaborator, not as an autocomplete tool. It helped me inspect unfamiliar parts of my own project, compare options and keep changes consistent across a fairly large codebase.

What I am proud of

The result is not a prototype built only for a three-minute video.

A campaign generated with GPT-5.6 becomes a genuine Market Game draft. It can be edited, previewed, published, played by participants, connected to rewards and webhooks, and analyzed through the existing platform.

The AI is central to the experience, but it does not bypass the rules that make the product reliable.

What comes next

The next step is to turn this Build Week version into a public launch.

The roadmap includes:

  • production testing with real campaigns;
  • Brevo lead synchronization;
  • reusable HubSpot and Klaviyo connectors;
  • multilingual campaign generation;
  • improved campaign templates;
  • richer optimization recommendations;
  • agency and client collaboration workflows.

The long-term vision is straightforward:

Describe the result you want. Market Game builds the campaign you can actually launch.

Built With

Share this project:

Updates