-
-
The Break-Even landing and user login page featuring options for email authentication, Google and Microsoft single sign-on.
-
The Website Builder workspace, where users can configure layouts, track basic traffic metrics, and deploy sites to Netlify or GitHub Pages.
-
The communications console showing centralized customer inbox, which allows business owners to track, filter, and reply to client inquiries.
-
The AI Business Copilot drawer interface, used to initiate the reflective optimization loop and analyze site performance
-
The interactive Schema Editor where users can modify individual page sections, select layout variants, and preview changes in real time.
-
The administrative dashboard, displaying key business metrics (average order value, total products, response rates) and performance charts.
-
The Services management page, displaying available catalog items with pricing, inventory details, edit or delete, and product comments.
-
The AI Tools, where business owners can select a content template to write copy using the assistant interface.
Break-Even: The Self-Optimizing AI Business OS
Small business owners wear a dozen different hats every day: accountant, marketer, customer support agent, and operations manager. While large enterprises have the budget to hire developers and data scientists to continuously A/B test layouts and analyze user paths, small businesses are often left with static, rigid templates that become digital brochureware.
Inspiration
My aunt runs a small, homemade cookies and cakes business. She is one of the hardest working people I know, waking up before dawn to whip buttercream, temper chocolate, and carefully decorate custom cakes.
She is a master baker, but running a business in the digital age was a constant challenge. She couldn't tell why customers left her website without buying, which products caught their attention, or what flavors they preferred. Managing inventory, understanding customer behavior, and updating her website required time and technical skills she simply didn't have.
Watching her struggle with complex tools made us ask a simple question: What if a website wasn’t just a static page, but a living, breathing employee that actively works to optimize itself?
What it does
We wanted to democratize conversion rate optimization (CRO) by building a self-improving Business OS. Instead of forcing business owners to analyze charts and write code, we envisioned a platform where an AI agent swarm observes real world traffic, models customer behavior, makes safe design hypotheses, and automatically updates the site - closing the loop from analytics to production without manual intervention.
How we built it
We structured Break-Even as a distributed, full-stack application split into three main layers:
1. The Core Platform (Control Center & Dashboard)
Built with React 18 and styled using a premium glassmorphic system (Tailwind and custom Vanilla CSS), the frontend offers a centralized cockpit. Business owners can view revenue analytics, manage catalogs, view real-time chat messages, and track customer satisfaction scores.
2. The Persistent Memory Engine (MongoDB Atlas)
At the heart of the system is the MongoDB Model Context Protocol (MCP) layer. Rather than treating MongoDB as a basic data dump, it is used as a contextual vector database that powers our Retrieval-Augmented Generation (RAG) agent loops. We track conversion patterns, layout configurations, and historic failures (patches that broke the UI or dropped conversion rate) to guide future optimization paths.
3. The Self-Improving Optimization Loop
When a visitor interacts with a static child website hosted on Netlify, micro-events (clicks, scroll depth, form submissions) are sent back to the Flask backend.
Our optimization model is mathematically grounded using Bayesian inference. When the AI agent evaluates two layout variations, \(L_A\) and \(L_B\), we model their conversion rates, \(\theta_A\) and \(\theta_B\), as Beta distributions:
$$\theta_A \sim \text{Beta}(\alpha_A, \beta_A), \quad \theta_B \sim \text{Beta}(\alpha_B, \beta_B)$$
Here, \(\alpha\) represents successful conversions (e.g., booked consultations or products added to cart) plus a prior, and \(\beta\) represents visitors who left without converting. The system continuously calculates the probability that layout \(L_A\) outperforms \(L_B\):
$$P(\theta_A > \theta_B) = \int_{0}^{1} \int_{\theta_B}^{1} \frac{\theta_A^{\alpha_A-1}(1-\theta_A)^{\beta_A-1}}{\text{B}(\alpha_A, \beta_A)} \cdot \frac{\theta_B^{\alpha_B-1}(1-\theta_B)^{\beta_B-1}}{\text{B}(\alpha_B, \beta_B)} \, d\theta_A \, d\theta_B$$
When \(P(\theta_A > \theta_B)\) crosses our significance threshold \(T_s\) (e.g., \(95\%\)), the agent initiates a deployment step:
- Hypothesis Generation: A Gemini LLM analyzes the conversion delta and writes raw HTML patches.
- Sandbox Validation: The system runs security and layout integrity checks to ensure no tags are broken.
- Automated Publishing: The Flask backend compiles the static files and deploys them to Netlify via a programmatic pipeline.
Challenges we ran into
1. The HTTPS to HTTP Mixed Content Wall
Our static websites are deployed globally on Netlify using secure protocols (https://), while our AWS EC2 container endpoints originally ran on raw IP sockets (http://51.21.197.65:5000). Modern browsers block mixed content outright:
$$\text{Request Blocked: } \text{HTTPS (Origin)} \to \text{HTTP (Destination)}$$
To solve this, we had to build robust fallbacks to dynamically route API requests, configure the backend URL during CLI compilation (redeploy_all_sites.py), and implement client-side exception handling to gracefully guide users to trust the custom domain/origin configuration in secure environments.
2. Maintaining Code Integrity during Dynamic Merging
Because the websites generated by the AI are compiled to static HTML, handling dynamic changes (like a client adding a comment under a product, or booking a salon appointment) was a major architectural bottleneck. We solved this by creating a hybrid compilation model:
- Static Content: Product cards and page templates are compiled statically for SEO and fast load speeds.
- Dynamic Hydration: A client-side snippet (
tracking_snippet.py) injects dynamic components into standard HTML elements, fetch-binding reviews, comments, and booking availability on the fly.
3. Sentiment-Weighted Feedback Analysis
Parsing comments is easy, but converting customer feedback into actionable business metrics requires filtering noise. We introduced a Sentiment-Weighted Customer Satisfaction Score (CSAT).
For \(N\) reviews, each rating \(R_i \in [1, 5]\) is weighted by its sentiment score \(w_i\), which is derived from a text-classification LLM:
$$w_i = \begin{cases} 1.25 & \text{if Sentiment is Highly Positive} \ 1.00 & \text{if Sentiment is Neutral} \ 0.50 & \text{if Sentiment is Negative} \end{cases}$$
We compute the adjusted score as:
$$\text{CSAT}{\text{adj}} = \min\left(100, \, \frac{\sum{i=1}^{N} (w_i \cdot R_i)}{N \cdot 5} \times 100\right)$$
This ensures that a single high rating accompanied by a highly critical text comment (a sarcasm vector) does not artificially inflate the business owner's score.
Accomplishments that we're proud of
- Closing the AI Optimization Loop: We successfully built a secure pipeline that allows an LLM to safely generate, validate, and compile website layout changes and publish them directly to Netlify without breaking existing code.
- Intelligent Business Coach: We built an active AI recommendation system that acts as a business coach, analyzing real-time sales records and sentiment trends to provide actionable business growth steps.
- Dynamic Hybrid Static Sites: We successfully combined the SEO benefits of static landing pages with the interactive capabilities of real-time database endpoints (comments, scheduling) via client-side snippet hydration.
What we learned
- Agent Sandbox Isolation is Mandatory: Letting LLMs generate code that compiles directly to production is powerful but hazardous. Without our strict parsing and validation step, a single misplaced tag could break the entire user interface.
- Contextual Memory is King: AI is only as smart as its history. Storing layout snapshots, successful configurations, and failed layout attempts directly in MongoDB prevents the optimization engine from repeating the same sub-optimal experiments.
- The Power of Micro Interactions: By displaying the AI's internal reasoning (the "thinking logs" of the agent swarm) directly in the dashboard, we turn a mysterious "black box" into a collaborative teammate that the user trusts.
What's next for Break-Even
- Automated Price Elasticity Experiments: Let the AI agent safely experiment with small, temporary price adjustments to calculate real world price elasticity curves and optimize profit margins automatically.
- Multimodal Heatmap Tracking: Incorporate visual analysis by generating user click heatmaps and feeding them to Gemini Vision models to detect visual friction points.
- Custom Domain Support: Enable users to seamlessly connect their own domains with auto-renewing SSL certificates directly from their BreakEven dashboard.
Log in or sign up for Devpost to join the conversation.