# Analytics
Source: https://docs.getmocha.com/basics/analytics
Understand your app's traffic: visitors, pageviews, sources, top pages, locations, and devices
Mocha Analytics helps you understand how people find and use your app.
## Where To Find Analytics
In the Mocha app, click the **Analytics** tab in the top menu.
## Availability And Lookback Window
Analytics is available for **published apps** (including apps on a Mocha subdomain, not only custom
domains). It is **not available on the free tier**.
How far back you can view analytics depends on your plan:
| Plan | History you can view |
| ------ | -------------------- |
| Bronze | 15 days |
| Silver | 60 days |
| Gold | 2 years |
Privacy note: Mocha does not use cookies or track visitors across websites. Visitor counts use an
anonymous identifier that resets every day.
## Visitors
**Unique visitors**: The number of people who visited your app during the selected time period. If
someone visits multiple pages in one session, they are still counted as one visitor.
Because the anonymous visitor identifier resets daily, the same person visiting on two different
days will be counted as two unique visitors. Visitors using different devices (for example phone
and laptop) are also counted separately since there is no cross-device tracking.
**Total pageviews**: The total number of pages loaded across all visitors. If one person views 5
pages, that counts as 5 pageviews.
**Current visitors**: The number of people on your app right now (within the last 30 minutes). This
updates in real time regardless of the date range you have selected.
## Sources and Campaigns
**Sources** show where your visitors came from before landing on your app. For example, if someone
clicks a link to your app from Instagram, the source may show `instagram.com`. If someone clicks a
link from Google search results, it may show `google.com`.
**Campaigns** let you attribute traffic to specific marketing links by using UTM parameters. For
example:
```text theme={null}
https://your-app.example/?utm_source=twitter&utm_campaign=launch
```
Mocha supports five UTM tags:
* **Source** (`utm_source`): where the link was posted (e.g. `twitter`, `newsletter`)
* **Medium** (`utm_medium`): the type of channel (e.g. `social`, `email`)
* **Campaign** (`utm_campaign`): the name of your campaign (e.g. `launch`, `summer-sale`)
* **Content** (`utm_content`): differentiate similar links in the same campaign
* **Term** (`utm_term`): identify keywords in paid search campaigns
## Top Pages
**Top pages** show which pages of your app get the most visitors. Each entry shows the page path
(the part of the URL after your domain) and how many unique visitors viewed it.
## Locations
**Locations** show where your visitors are located, broken down by country, region, and city. This
is determined from the visitor's internet connection and is approximate. It does not use GPS or
precise location tracking.
## Devices
Analytics breaks device information down into:
* **Browsers**: Chrome, Safari, Firefox, etc.
* **Operating systems**: Windows, macOS, iOS, Android, etc.
* **Devices**: desktop, mobile, or tablet.
# Using Images and Assets
Source: https://docs.getmocha.com/basics/assets
Learn how to upload, manage, and use assets in your Mocha projects
Mocha makes it easy to work with images, screenshots, and other assets in your projects. You can upload assets directly in the chat, manage them in project settings, and use them to enhance your website.
## Uploading Assets in Chat
You can upload assets directly in the chat interface. The AI will intelligently determine how to use them based on your request.
### Common Use Cases
* **Inspiration & Design**: Upload screenshots of websites you like for the AI to use as design inspiration
* **Content Creation**: Share images for your portfolio, blog posts, or product pages
* **Problem Solving**: Show screenshots of issues you want to fix or improve
* **Asset Integration**: Upload images to be used as backgrounds, profile pictures, or featured content
### Example Prompts
"Build a portfolio with this image as the main vibe"
"Use this as the background for the hero section"
"The spacing here looks off, can you fix it?"
## Reusing Uploaded Assets
Once you've uploaded assets to your project, you can easily reuse them in future conversations using the + button in the chat interface.
## Managing Assets
You can manage all your project's assets in the project settings. Here you can:
* Upload new assets
* Rename existing assets
* Add descriptions
* Delete assets
Adding descriptions to your assets helps the AI understand and use them more effectively in your project.
## Storage Limits
All Mocha accounts come with asset storage, but subscribers get significantly more space:
* đ **Free**: 100MB storage
* đ„ **Bronze**: 1GB storage
* đ„ **Silver**: 2GB storage
* đ„ **Gold**: 10GB storage
Need more storage? Consider upgrading your subscription to get more space for your assets.
# Authentication
Source: https://docs.getmocha.com/basics/auth
Builtâin auth with Google: add signâin and protect pages and actions
Mocha includes a builtâin authentication module. Today it supports Google signâin via our Mocha provider. You can enable auth simply by asking the AI to add it.
Ask: âAdd authentication and a signâin button.â The AI will set up signâin/out flows and guard protected pages and actions.
No. Mocha's provider handles the Google OAuth flow. Just ask the AI to enable authentication.
Not yet. Multiple providers and scopes are on our roadmap. For now, Google is supported out of the box.
Email/password and username/password authentication are not directly supported yet. While Mocha can sometimes build custom auth flows, it often makes mistakes with security-critical code. We strongly recommend sticking with Google authenticationâit's a solid, secure mechanism that works reliably. We plan to add native email/password support soon.
Yes, if you're on a Silver or Gold plan. By default, users see "Mocha" in the Google sign-in screen. With your own credentials, they'll see your app's name and logo instead. Learn more in [Customize Google Sign In](/basics/custom-oauth-clients).
***
## More Authentication Questions
Google authentication is currently the only officially supported option because:
* **It's secure** - Google handles the security-critical parts like password storage and two-factor auth
* **It's reliable** - Fewer things can go wrong compared to custom auth systems
* **It's familiar** - Most users already have a Google account
We're working on adding more authentication options, including email/password, in the future.
Phone number authentication isn't currently supported as a built-in feature. While you could potentially ask the AI to build something custom using a service like Twilio, we don't officially support this and can't guarantee it will work correctly.
For now, we recommend using Google authentication for the most reliable experience.
Currently, Google is the supported authentication method. Users need a Google account to log in to apps that use Mocha's built-in auth.
We're planning to add email/password authentication as an option in the future, which would allow users to sign up with any email address.
If login works in your preview but not on your published app, see our [troubleshooting login guide](/guides/troubleshooting-login). This is usually related to third-party cookie settings in the browser.
The preview environment is different from your published app. Login issues in preview due to cookies don't affect your published app.
# Backend & APIs
Source: https://docs.getmocha.com/basics/backend
Mocha writes backend code for you, calls external APIs, and manages secrets
Mocha is "fullâstack", which means you can build useful software, not just pretty mockups. Beyond the visual pages, Mocha can run logic for you in the backgroundâthings like saving form submissions, talking to other services (APIs), and powering features your business needs.
Backend code runs in a scalable serverless runtime. It can handle a lot of traffic and scale up and down as needed.
## Quick start
This section won't be long, because mostly Mocha just does the work for you.
Say what you need in plain English. For example: âI want users to be able to subscribe to my app by giving their email address.â The AI will create the necessary backend logic.
Don't give Mocha technical details like "use postgresql". This won't work well, Mocha is highly opinionated on how to build things technically, and you should describe your desired outcomes for the product, instead of the technical details.
Use the inâapp preview to test the feature. You can see results and logs right away, then deploy when youâre ready.
That's it! Congratulations on building a full-stack feature that uses your own backend code.
## Managing secrets
Some features require private keys to talk to other services (often called "APIs"). These private keys are called secrets.
A secret is a private value your app uses to connect to another service. It might be an API key, access token, or signing key.
* Weather API key (for example, an OpenWeather key) to show today's forecast in your app
* OpenAI API key to generate images or summaries for your content
If your feature needs a secret, the AI will prompt you to add one and will wire it up correctly. You just provide the key once.
Usually, Mocha will ask you to add a secret to your project as part of the conversation, and will even show you how to get the secret from the provider, just follow the prompts.
Avoid pasting the secrets directly into the chat input. Instead, paste them into the secure forms that appear in the chat inyour pages or commit history. Store them as secrets instead.
## Common patterns
Want weather data, maps, email, or payments? Save your API key as a secret and ask the AI to connect the service. Example: âShow todayâs weather in San Francisco using my OpenWeather key.â
Add forms to your pages to collect emails, feedback, or orders. The AI saves submissions and can store them in your database.
Some services can notify your app when something happens (often called webhooks). Ask the AI to set this up and it will handle the details.
***
## Payments & Monetization
Want to accept payments or sell products through your Mocha app? Here's what you need to know.
Mocha doesn't have a built-in payment system. To accept payments, you'll need to integrate with an external payment provider like Stripe.
Yes, it's possible to integrate Stripe with your Mocha app. However, we don't have an official step-by-step guide yetâthis is an area we're still developing better support for.
**Our recommendation:** Start simple. For most use cases, you don't need complex payment integration:
* **Stripe Payment Links** - Create payment links in Stripe and add them as buttons on your site. No coding required.
* **Stripe Checkout** - Redirect customers to Stripe's hosted checkout page for a more seamless experience.
These simple approaches work for selling products, services, subscriptions, and donations without needing to build custom payment flows.
No, Mocha doesn't have a built-in payment processor. You'll need to use an external service like Stripe or PayPal to accept payments.
The good news is that these services are designed to be easy to integrate, especially if you use their hosted solutions like Payment Links.
The simplest approach:
1. **Create a Stripe account** at stripe.com
2. **Create Payment Links** in Stripe for each product you want to sell
3. **Add buy buttons** to your Mocha app that link to your Stripe Payment Links
This approach lets you start selling quickly without complex integration. Stripe handles the payment form, security, and receipts.
Similar to Stripe, you can integrate PayPal by using their hosted checkout options and linking to them from your Mocha app. PayPal also offers simple button generators that work well for basic payment needs.
Stripe supports recurring payments and subscriptions through their Payment Links feature. You can create subscription products in Stripe and link to them from your Mocha app.
For more complex subscription management (like customer portals, usage tracking, etc.), you may need to build more custom integration.
Starting simple with Payment Links is a great way to validate your business idea before investing time in more complex payment integrations. You can always upgrade to a more sophisticated setup later.
# Custom Domains
Source: https://docs.getmocha.com/basics/custom-domains
Learn how to connect your own domain to your Mocha project
## Overview
Mocha supports custom domains, allowing you to deploy your Mocha applications to your own domain. This feature gives you complete control over your website's URL and branding.
## Domain Limits by Plan
* đ„ **Bronze**: 1 custom domain
* đ„ **Silver**: 5 custom domains
* đ„ **Gold**: 20 custom domains
These limits are subject to change as we continue to evolve our offerings.
## How to Set Up Your Custom Domain
Buy a domain directly in Mocha or from your preferred domain registrar (e.g., Namecheap, GoDaddy, Squarespace Domains)
You cannot use `*.mocha.app` subdomains as custom domains. These are reserved for Mocha's built-in hosting. Use a domain you own from an external registrar instead.
In your Mocha project settings, navigate to the "Domains" section
Enter your domain name and follow the verification process. This will link your domain to your Mocha account.
This can take a while, up to 48 hours depending on the domain provider.
Select the project you want to associate the domain with.
Once the domain is connected, you can simply publish as usual, and your Mocha app will be live at your custom domain.
## Troubleshooting
DNS changes can take up to 48 hours to propagate, though it typically happens within 1-2 hours. Here's what to check:
If your domain stays "stuck" in the pending state. We recommend simply "Deleting" it in Mocha and connecting it again. The process can be flakey and fails sometimes, but typically will work the second time.
We apologize for the inconvenience. and are working on improving the process.
SSL certificates are provisioned automatically when you connect a domain, but they can take a few minutes to activate. If you're seeing certificate errors:
1. **Wait 10-15 minutes** after connecting your domain for the SSL certificate to be issued
2. **Try a different browser** or try an incognito/private window
3. **Clear your browser cache** or try an incognito/private window
If you recently changed DNS providers or settings, you may need to wait for the changes to propagate before SSL works correctly.
To remove a custom domain from your project:
1. Go to your project settings
2. Navigate to the "Domains" section
3. Find the domain you want to remove
4. Click the remove/disconnect option
After removing, your app will still be accessible via its `.mocha.app` subdomain (if you have one set up).
To unpublish your app and take it offline:
1. Click the publish button to open the publish modal
2. Toggle the selector from "Published" to "Unpublished"
Once unpublished, your app will no longer be accessible to visitors. You can republish at any time.
Mocha currently only supports the exact domain you connect â **www subdomains are not automatically configured**. For example, if you connect `mydomain.com`, then `www.mydomain.com` will not work and will show a Cloudflare Error 1001.
This is a known limitation we're actively working to fix. In the meantime, here's a workaround:
1. **Set up domain forwarding at your registrar** â most registrars (GoDaddy, Namecheap, etc.) offer a "Forwarding" or "Redirect" option in their domain settings
2. **Forward `www.mydomain.com` â `mydomain.com`** using a 301 (permanent) redirect
3. This ensures visitors who type `www.mydomain.com` are automatically sent to your working domain
Do **not** add a CNAME record pointing `www` to `*.mocha.app` â this will not work because the www hostname is not registered in our infrastructure. Use your registrar's forwarding/redirect feature instead.
If your domain suddenly stopped working:
1. **Check if your subscription is active** - Custom domains require a paid plan
2. **Verify DNS settings haven't changed** - Sometimes DNS providers reset settings
3. **Check domain expiration** - Make sure your domain registration hasn't expired
If everything looks correct, contact [support@getmocha.com](mailto:support@getmocha.com) for help.
If you're having trouble connecting your domain and the above doesn't help, reach out to [support@getmocha.com](mailto:support@getmocha.com) with your domain name and a screenshot of your DNS settings.
## Managing Multiple Domains
For users on Silver and Gold plans, you can manage multiple domains:
* Add new domains at any time
* Remove domains from your project
* Monitor domain status
* Configure domain-specific settings
Need more domains? Consider upgrading your subscription to get access to more custom domains.
## Purchase Domains Through Mocha
We've partnered with IONOS, a leading domain registrar, to offer seamless domain purchases directly within Mocha. This integration allows you to search, purchase, and manage your domains all in one place.
### Benefits of Buying Through Mocha
* **Streamlined Process**: Search and purchase domains without leaving Mocha
* **Instant Setup**: Domains purchased through Mocha are automatically linked to your account
* **Competitive Pricing**: Access to IONOS's competitive domain pricing
* **Easy Management**: Manage all your domains in one place
After purchasing a domain through Mocha, you can follow the regular domain linking process to associate it with your project.
Buying through Mocha is the fastest way to get started with a custom domain, but you can also purchase or use domains from other registrars.
# Custom Knowledge
Source: https://docs.getmocha.com/basics/custom-knowledge
Give your project the context it needs to succeed
Mocha allows you to build anything, and your project is unique: it has own objectives, limitations, and preferences. The **Custom Knowledge** tab lets you document these details. Anything you add here is saved and used throughout your project, helping Mocha make more relevant and intelligent edits.
You don't need to add too much (adding a lot will start costing credits), just a few lines of clear direction can really help.
## What to include in your Custom Knowledge
* **Project guidelines:** What is the project? The goals? What should the AI avoid, and how should decisions be made.
* **Audience:** Detailed descriptions of your target users and their needs.
* **Design preferences:** Color palettes, typography, layout rules, and other visual elements. You can also express inspiration like "Make it feel like Canva.com"
* **External references:** Links to API docs, internal tools, design systems, or style guides.
* **Compliance requirements:** Any legal or regulatory requirements your project must adhere to.
## Tips for using Custom Knowledge
Even a few lines can make a meaningful difference.
Everything here is shared with the AI on each request.
Update it as your project evolves to stay aligned and relevant.
# Custom Login Options & Branding
Source: https://docs.getmocha.com/basics/custom-login-branding
Add your own branding to the login experience for your users
All Mocha apps come with Google sign-in already working. Your users can log in with their Google accounts immediatelyâno setup required.
**Why this works well:**
* Zero configuration needed
* No technical setup or Google approvals
* Your app is ready to accept user logins right away
**The trade-off:**
When users sign in, they'll see "Mocha" in the Google sign-in screen instead of your app's name and logo.
## Using Your Own Google Sign-In
If you are a Silver or Gold subscriber and want your users to see your app's branding when signing in, you can connect your own Google OAuth client. This requires creating credentials through Google, but gives you complete control over the sign-in experience.
**What you'll gain:**
* Your app name and logo in the Google sign-in flow (instead of Mocha's)
* Professional, branded authentication experience
**What you'll need to do:**
* Create a Google Cloud account (free)
* Set up a Google OAuth client (we'll walk you through this)
* In Mocha, in your application settings, enter your client ID and client secret in the "Google Sign In" section
## About Google OAuth Clients
We use the language "Google OAuth clients" but sometimes these are called "OAuth applications" or "credentials" by Google. These are simply the connection settings that let your app use Google sign-in with your own branding.
## Setting Up Your Google OAuth Client
1. Go to the [Google Developer Console](https://console.developers.google.com/)
2. Create a new project or select an existing one
3. Search for and navigate to the "OAuth consent screen"
4. Click on "Create OAuth client"
5. Choose "Web application" as the application type
6. Add Mocha's redirect URI `https://getmocha.com/u/oauth/google/callback` as one of the "Authorized redirect URIs" -- **this is critical for sign in to work**
7. In your Mocha project, go to the "Google Sign In" section in the settings dialog and paste the client ID and client secret into the appropriate fields. Click "Add OAuth client"
8. If your configuration is correct and your application is approved by Google, your app will immediately start using your custom OAuth client for signing in
The "Branding" section in the Google Developer Console allows you to customize how your app appears in the Google sign-in flow. You can add your app's name, logo, and other branding elements.
*Note: DO NOT share the client ID or client secret with anyone! They are sensitive passwords. The values in the images above were never used and have been deleted.*
## Scopes
You might see information about scopes. At this time, Mocha only supports `email profile` scopes. This will be customizable in the future.
## Google resources
* [https://developers.google.com/identity/protocols/oauth2#1.-obtain-oauth-2.0-credentials-from-the-dynamic\_data.setvar.console\_name](https://developers.google.com/identity/protocols/oauth2#1.-obtain-oauth-2.0-credentials-from-the-dynamic_data.setvar.console_name).
* [https://support.google.com/cloud/answer/15549257?sjid=13321326564820129226-NC#zippy=%2Cauthorized-domains%2Cuser-type](https://support.google.com/cloud/answer/15549257?sjid=13321326564820129226-NC#zippy=%2Cauthorized-domains%2Cuser-type)
# Databases
Source: https://docs.getmocha.com/basics/databases
Your app comes with a databaseâunderstand dev vs prod and manage data
Every Mocha app ships with a database. Databases are used to store data for your app. Think of it as a spreadsheet for your app.
Use the Data tab to view tables, inspect rows, and make quick edits.
There are two databases per app: a **Dev** database for the inâMocha preview, and a **Prod** database for your deployed site. They do *not* share data.
## Dev vs Prod
* **Dev**: Used while building and testing in the preview. Safe to experiment.
* **Prod**: Used by your deployed site. Data here is what real users see.
When you click publish, Mocha runs any migrations that have been defined since the last deployment. This is how Mocha creates new tables. So for example if you introduce a new concept in your app (like "todos"), Mocha will create a new table for it. You'll see it in the Data tab immediately for Development, and after you deploy, it will be in the Production tab as well.
If you add data in Dev, you wonât see it in Prod after deploying. If you want to add data to your production database, explicitly ask Mocha to do so, or create an upload mechanism and then upload the data through the published site.
## Quick start
Open the Database tab to see your tables and recent rows.
Use the builtâin form UI to insert or edit rows. Great for testing quickly.
## What you can ask the AI to do
If you want to add data to your production database, explicitly ask Mocha to do so, or create an upload mechanism and then upload the data through the published site.
If you want to edit data in your production database, explicitly ask Mocha to do so, or create an edit mechanism and then edit the data through the published site.
***
## Data Ownership & Export FAQ
**Yes, absolutely.** You own everything you create with Mocha:
* The code generated for your app is yours
* The data stored in your database belongs to you
* You can download and export your project at any time
Mocha is a tool to help you buildâwe don't claim ownership over what you create.
Yes! You can download your entire project's source code at any time:
1. Click the app name in the header
2. Look for the "Download code" button
3. Your project will download as a zip file
The code is standard TypeScript/React, so you can review it, learn from it, or use it elsewhere.
Learn more about downloading your project in the [hosting guide](/basics/hosting#can-i-download-my-project%3F).
Yes, you can ask Mocha to add data export functionality to your app. For example, ask: "Add a button to export all users to CSV" and the AI will create the feature for you.
For direct database access, you can also view and manage your data through the Data tab in the Mocha interface.
Mocha uses **SQLite** as the database for your apps. SQLite is a reliable, widely-used database that works well for most web applications.
You don't need to configure or manage the databaseâMocha handles all of that for you.
No, Mocha apps use the built-in SQLite database. You cannot connect to external databases like PostgreSQL, MySQL, or MongoDB.
This is by designâMocha is built to work seamlessly without requiring you to set up and manage external services.
Mocha apps are hosted on **Cloudflare's** global infrastructure. This means your app benefits from:
* Fast loading times worldwide
* Automatic scaling
* Built-in security and DDoS protection
* High availability
You don't need to manage servers or worry about infrastructure.
No, you're not locked in. You can:
* Download your source code at any time
* Export your data through features you build
* Take your project elsewhere if needed
The code Mocha generates is standard web technology (TypeScript, React, SQLite) that can run in other environments with some setup.
While you can take your code, some Mocha-specific features (like the built-in auth integration) would require adaptation to work outside of Mocha's infrastructure.
# Direct Edit Mode
Source: https://docs.getmocha.com/basics/direct-edit
Edit text directly on your website without using AI credits
Direct Edit Mode lets you make quick text changes to your website without using AI credits. Simply click on text elements and edit them directly - perfect for typos, content updates, and quick tweaks.
## Enabling Direct Edit Mode
You can enable Direct Edit Mode directly from the header of your project.
## How to Use Direct Edit Mode
Once enabled, editing text is simple:
Click on any text element you want to edit
Type your new text directly in the element
Click outside the element or press Enter to save
## Benefits
Direct edits don't consume AI credits, saving you money
See your changes immediately without waiting for AI processing
Perfect for typos, content updates, and quick text changes
Just click and type - no complex interface needed
## Limitations
Not all text can be edited directly. If text is dynamically generated, Direct Edit Mode won't work and you'll need to ask the AI to make changes instead.
When you try to edit dynamically generated content, Mocha will let you know and suggest using the AI for those changes.
## Coming Soon
Direct Edit Mode will expand with even more functionality:
* đž **Image Upload**: Replace images directly
* đš **Style Tweaks**: Adjust fonts, colors, and spacing
* đ€ **AI Improvements**: Enhance content with AI assistance
* âš **And More**: Additional editing capabilities
Use Direct Edit Mode for quick text changes and save your AI credits for more complex modifications and new feature requests.
# Discuss Mode
Source: https://docs.getmocha.com/basics/discuss-mode
A dedicated toggle for conversational interactions with your codebase
## Overview
Discuss Mode is a chat mode that guarantees no changes to your files while interacting with Mocha.
You can freely ask questions, brainstorm ideas, and get help without worrying about unintended modifications to your codebase.
Use it as an AI-powered development partner that offers insights, debugging help, and guidance within Mocha.
Discuss Mode transforms Mocha from a code generator into an interactive assistant that helps you plan effectively, debug intelligently, and ship confidently.
Discuss Mode now runs on the same model as code mode, giving it full access to your conversation history and the ability to investigate issues in real-time by taking screenshots and reading logs. It can also take multiple turns on its own to dig deeper into problems before reporting back.
## Use Cases
### Debugging & Problem Solving
* Get step-by-step breakdowns of errors
* Resolve stuck loops and infinite processes
* Understand complex error messages
### Feature Planning & Implementation
* Identify minimal necessary changes for new features
* Plan database structures and relationships
* Design scalable system architectures
### Product Development
* Refine feature ideas before implementation
* Make informed product decisions
* Structure features and onboarding flows
### Code Quality & Best Practices
* Get real-time coding feedback
* Improve code readability and efficiency
* Learn and apply best practices
### Knowledge & Documentation
* Store and organize development knowledge
* Create and maintain documentation
* Reduce redundant prompts and questions
### Collaboration & Learning
* Bridge communication between technical and non-technical team members
* Get guidance on API integrations and technical concepts
* Learn new development techniques and patterns
### Safe Discussion
* Guaranteed no code changes when Discuss Mode is active
* Freely ask questions and brainstorm ideas
* Get AI assistance without worrying about unintended modifications
## How to Use
Click the "Discuss Mode" button in the interface when you want to chat about your code without making changes
Ask questions, brainstorm ideas, or troubleshoot issues with the AI
When you're ready to make changes, simply toggle Discuss Mode off
## Pricing
Discuss Mode now uses dynamic credits, just like regular code mode. Because it runs on the same model, each request may cost more than beforeâbut the improved reasoning and context awareness often saves credits overall by helping you avoid mistakes and plan more effectively.
## Feedback
We'd love to hear your thoughts on Discuss Mode! Share your feedback in our Discord community.
# Duplicating Apps
Source: https://docs.getmocha.com/basics/duplicate
Create a copy of any Mocha app to experiment, remix, or start a new project from an existing one
You can duplicate any Mocha app to create an independent copy. This is useful when you want to experiment with a new direction, create a variation, or use an existing app as a starting point for something new.
## How to Duplicate
1. Click the dropdown arrow next to your app name in the top-left corner
2. Select **Duplicate**
3. A new copy of your app is created with all its pages, assets, and settings
The duplicate is a fully independent project â changes to one won't affect the other.
## When to Use It
* **Experimenting**: Try a bold redesign without risking your current version
* **Remixing**: Use a working app as a template for a new project
* **Branching**: Maintain separate versions for different audiences or use cases
Duplicating an app copies pages, assets, and settings, but **does not** copy database contents or secrets. If your app relies on data stored in the [dev database](/basics/databases), you'll need to re-enter that data in the new copy.
You can also duplicate a specific **version** of your app from the [version history](/basics/versions). This lets you branch off from any point in your project's history.
# Email
Source: https://docs.getmocha.com/basics/email
Send emails from your Mocha app
Mocha Email lets your apps send emails â things like welcome messages, password resets, order confirmations, and notifications. It's fully built in, so there's nothing extra to install or set up.
## How it works
Just ask Mocha to add email to your app. Tell it something like "send a welcome email when someone signs up" or "add a password reset flow," and it'll handle the code for you. You can monitor deliveries, opens, bounces, and more from the Email tab in your dashboard.
Want to change how your emails look or what they say? Just prompt. Tell Mocha something like "make the welcome email more colorful" or "add the user's name to the subject line" and it'll update the email for you.
## Testing emails during development
While you're building and previewing your app, emails are automatically sent from `noreply@mail.mocha.app` and can only be delivered to your own account email. This way you won't accidentally email real users while testing.
We're planning to expand this shared Mocha sender for users on our paid tiers in the near future, so you have more flexibility when testing emails during development.
Once you publish your app with a verified domain, emails go out from your domain and can reach anyone.
## Connecting a domain
To send emails from your own domain, you need to verify that you own it.
Go to **Settings > Domains** and enter your domain name.
Click **Connect**. Mocha will open a guided setup that walks you through adding two DNS records to your domain. If your registrar supports it, this can be done automatically with a few clicks.
DNS changes usually take a few minutes but can take up to 48 hours depending on your provider. Mocha checks automatically, so you don't need to keep refreshing.
Once verified, your domain is ready to send from.
## Set your sender address
Go to **Settings > Email** to configure the sender address and display name for your emails. This is what recipients will see in their inbox â for example, `noreply@yourdomain.com` from "My App." You'll need a verified domain before you can set a custom sender address.
## Email limits
Your monthly email limit depends on your plan:
| Plan | Emails per month |
| ------ | ---------------- |
| Free | 10 |
| Bronze | 500 |
| Silver | 2,500 |
| Gold | 10,000 |
If you need higher limits, reach out to [support@getmocha.com](mailto:support@getmocha.com).
Limits reset at the start of each calendar month. You can check your current usage in the Email tab.
## Bounces and suppressions
If an email bounces or a recipient marks it as spam, that address is automatically suppressed. Mocha won't try to send to it again. This protects your domain's reputation and keeps your delivery rates healthy.
You can see all suppressed addresses in the Email tab under **Undelivered messages**.
## Marketing emails
Mocha supports two kinds of email: **transactional** and **marketing**. Transactional emails are triggered by something a user does â like a welcome email when they sign up, or a receipt after a purchase. Marketing emails are ones *you* choose to send â like newsletters, product announcements, or weekly digests.
To set up marketing emails, just ask Mocha to create an email campaign in your app. It'll handle delivery through your existing email configuration, and automatically manages your subscriber list â including unsubscribe handling so you stay compliant.
Broadcast emails count toward your monthly email limit.
## Common issues
| What you're seeing | What to do |
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| "Monthly email limit exceeded" | You've used all your emails for this month. Upgrade your plan or wait for the next month. |
| Emails only going to your own address | This is normal during development. Publish your app with a verified domain to send to anyone. |
| Domain stuck on "Pending" | DNS changes can take up to 48 hours. If it's been longer, double-check your DNS records are configured correctly. |
| "Recipient is suppressed" | That address previously bounced or complained. Mocha won't send to it to protect your reputation. |
| No sender address configured | Go to Settings > Email and set a default sender email and name. |
# Deploy your website
Source: https://docs.getmocha.com/basics/hosting
Information about hosting, deployment, and managing your Mocha projects
### Can I publish my app?
**Yes!**
You can publish your app in one click directly in Mocha.
You do so by clicking the `Publish` button in the header.
if you're a bronze, silver or gold subscriber you can also pick an available subdomain, like [https://my-super-cool-website.mocha.app](https://my-super-cool-website.mocha.app).
### Can I publish my app to a custom domain?
Yes, see [custom domains](/basics/custom-domains).
### Can I use Vercel, Netlify or other platforms for hosting my app?
No, Mocha does not support publishing to external platforms. We support publishing to our own infrastructure only which is hosted on [Cloudflare](https://www.cloudflare.com).
Mocha enables people with no techincal knowledge to build and launch apps with as little friction as possible.
It's critical Mocha users can publish their app with a click of the button and without needing to create or manage accounts on external platforms.
The only way for us to provide this experience is by choosing a technical foundation for our apps, a platform to deploy it on, and hiding all those details from our users.
### How do I connect a GitHub repository in Mocha?
You cannot do this at this time. GitHub sync is something we're considering but haven't built yet.
### Can I download my project?
Yes, you can. Click the app name in the header, and you'll see a download code button.
### Can I undo / rollback changes or load a backup?
Yes! You can, see more in our [versions](/basics/versions) guide.
### Can I edit the code directly?
Yes! The Mocha application is a fully functioning editor. If you want to simply edit the code, you have to enter "dev mode" by clicking the code toggle on the top left:
Unless the file is marked as read-only (a few important files are set by Mocha and cannot be edited), you can edit the code directly.
When you finish typing, the file will automatically be saved. You can see the preview refresh in real-time, and if the refreshing doesn't work for some reason, use the preview restart menu with a quick restart âĄ.
### How can I edit only a specific section of code?
Simply ask it to modify the file with "filename.tsx". You can ask it to ONLY modify that file and it should comply. We have not yet implemented file locking, so this isn't guaranteed, but being insistent with the AI is an effective technique. See more in our [prompting guide](/guides/prompting).
***
## Mobile Apps FAQ
No, Mocha builds **web applications**, not native mobile apps. This means you cannot create `.apk` files (Android) or `.ipa` files (iOS) to publish to the Google Play Store or Apple App Store.
However, Mocha apps are **responsive** and work great on mobile devices through a web browser. Many successful businesses run entirely on web apps that users access via their phone's browser.
Yes! Mocha apps are built to be responsive, meaning they automatically adapt to different screen sizes. Your app will look good and work well on:
* Desktop computers
* Tablets
* Mobile phones
Users access your app through their web browserâno app store download required.
A **Progressive Web App (PWA)** is a web app that can be "installed" on a device and behaves more like a native appâit can have an icon on the home screen and work in a more app-like way.
Mocha doesn't currently have built-in PWA support, but you can ask the AI to add PWA features to your app. Results may vary depending on complexity.
Not directly. Mocha builds web apps, not native apps. To publish to app stores, you would typically need:
* A native app built with tools like React Native, Flutter, or Swift/Kotlin
* Or a PWA-to-native wrapper service (though these have limitations)
For most use cases, a responsive web app accessed through a browser works great and doesn't require app store approval or fees.
Mocha apps require an internet connection to work because they communicate with your database and backend. Basic offline functionality isn't built-in.
If offline support is critical for your use case, you can ask the AI to implement some caching, but full offline functionality is limited.
Web apps have several advantages:
* **Instant access** - Users don't need to download anything
* **No app store approval** - Launch and update whenever you want
* **Works everywhere** - One app works on all devices and platforms
* **Easier to maintain** - One codebase, not separate iOS and Android versions
* **Lower cost** - No Apple Developer ($99/year) or Google Play ($25) fees
Many successful productsâfrom simple tools to complex SaaS platformsâare web apps rather than native mobile apps.
If you're building for mobile users, focus on making your web app responsive and fast. Most users are comfortable accessing web apps on their phones, and you avoid the complexity of app store publishing.
# Max Mode
Source: https://docs.getmocha.com/basics/max-mode
Unlock maximum intelligence with the best coding agent Mocha has to offer
## Overview
Max Mode gives you access to Claude's most powerful Opus family of models for handling your most complex development challenges.
Max Mode is "greedy" â it optimizes for maximum intelligence at the expense of speed and cost. When you're facing a difficult problem that requires sophisticated reasoning, Max Mode can help you get it right the first time.
Max Mode is available on all Mocha tiers, including Default.
## When to Use Max Mode
Max Mode shines when you're working on tasks that require deeper reasoning and more nuanced understanding:
### Complex Third-Party Integrations
APIs, webhooks, and services that require careful coordination and error handling.
### Sophisticated UI/UX Designs
Nuanced layouts, animations, and interactions that need thoughtful implementation.
### Advanced Business Logic
Role-based access control, multi-step workflows, and complex state management.
### Challenging Debugging
Tricky bugs that require understanding multiple parts of your codebase at once.
### Quality Over Speed
If you prioritize the highest quality output and aren't sensitive to credit cost, Max Mode delivers the best results Mocha can offer.
## How to Enable
Find the dropdown menu next to the chat input field
Choose "Max Mode" from the available options
Send your prompt and let the most powerful model tackle your challenge
## Credits & Cost
Max Mode uses more credits per request than the default mode â typically 20% to 200% more depending on the complexity of your request.
However, Max Mode can actually save you credits on complex tasks:
* **Fewer iterations**: Better reasoning means getting things right the first time
* **Less debugging**: More intelligent code generation leads to fewer bugs
* **More reusable code**: Higher quality output that you won't need to rewrite
Switching between Max Mode and default mode during a session resets Mocha's caching system. For the most economical usage, try to stay consistent with one mode throughout a session.
## Best Practices
1. **Start with default mode** for routine tasks and simple modifications
2. **Switch to Max Mode** when you hit a wall or need sophisticated reasoning
3. **Stay consistent** within a session to preserve caching benefits
4. **Be specific** in your prompts â Max Mode excels when given detailed context about complex requirements
# Version History
Source: https://docs.getmocha.com/basics/versions
Learn how to manage, view, and restore previous versions of your Mocha projects
# Managing Version History
Every prompt you send in Mocha creates a new version of your project. This version history allows you to track changes, view previous states, and restore to earlier versions if needed.
## Understanding Versions
Each version represents a snapshot of your project at a specific point in time. You can:
* View previous versions to see how your project looked
* Restore to an earlier version if needed
* Duplicate versions to work on multiple variations
## Viewing Previous Versions
The "View" option lets you explore previous versions without making any changes. This is perfect for:
* Checking how your project looked at a specific point
* Taking screenshots of previous designs
* Comparing different iterations
## Restoring Versions
When you restore to a previous version:
* Your project returns to that exact state
* All versions created after that point are removed
* You can continue working from that restored point
Restoring a version is permanent and cannot be undone. All versions created after the restored point will be deleted.
## Working with Multiple Versions
If you want to keep both the current and previous versions:
1. View the version you're interested in
2. Use the "Duplicate" feature to create a new project
3. Work on both versions independently
Use version duplication when you want to explore different design directions or maintain multiple variations of your project.
## Best Practices
Make incremental, atomic changes so that you have nice, clean version history
Always view a version before restoring to ensure it's the right one
When in doubt, duplicate instead of restoring to preserve your work
# Account & Subscriptions
Source: https://docs.getmocha.com/billing/account-subscriptions
Information about your Mocha account and subscription options
You can create an account and get started with Mocha for free. On any tier, you can create infinite apps, but have a limit on the size of your apps and how many you can publish.
You have the option to upgrade to one of our metal plans (Bronze, Silver, or Gold), and most plans let you add extra credit bundles if you need more capacity.
### What subscription plans do you offer?
Here's a quick overview of what each base plan unlocks:
| Plan | Credits | App size limit | Published apps | Custom domains |
| ------------- | -------------- | ------------------------------------ | -------------- | -------------- |
| đ **Free** | 20 | Small (ideal for testing & learning) | 1 | â |
| đ„ **Bronze** | 1,500 / month | Medium (small-to-medium projects) | 5 | 5 |
| đ„ **Silver** | 4,500 / month | Nearly Unlimited | 15 | 15 |
| đ„ **Gold** | 25,000 / month | Unlimited | 35 | 20 |
### Add extra credits with credit bundles
If you need more credits than your base plan provides, you can add credit bundles to your subscription. Each credit bundle adds 1,500 credits per month.
**Bronze plans:**
* Bronze (1,500 credits)
* Bronze + 1 credit bundle (3,000 credits total)
**Silver plans:**
* Silver (4,500 credits)
* Silver + 2 credit bundles (7,500 credits total)
* Silver + 4 credit bundles (10,500 credits total)
* Silver + 7 credit bundles (15,000 credits total)
**Gold plans:**
* Gold (25,000 credits)
* Gold + 7 credit bundles (35,500 credits total)
* Gold + 14 credit bundles (46,000 credits total)
* Gold + 21 credit bundles (56,500 credits total)
Unused **subscription credits** can accumulate up to **2Ă your monthly subscription allowance** (base plan + bundles). For example, Bronze + 1 bundle (3,000 credits/month) can save up to **6,000 subscription credits**.
Need more capacity? You can always upgrade later or add credit bundles â your projects and data carry over seamlessly.
### How do I upgrade my account?
From the main menu, click on "Manage plan and Billing > Upgrade plan". You can pick any tier from bronze, silver or gold, and add credit bundles if you need extra credits.
Credit bundles are add-ons that give you more credits each month. You can add them when you first subscribe, or add or remove them later through the same upgrade menu.
### How do I manage my subscription?
If you're in the app builder view, you can use the dropdown menu in the top left corner to access "Manage Subscription". This will take you to the Stripe customer portal from which you can modify or cancel your plan.
If you're in the apps dashboard view, you can click on "Subscription and Billing" in the left sidebar.
### How do I change my account email or password?
Mocha does not use traditional passwords. You can log in using Google or GitHub (via OAuth2), or with your emailâif you choose email, we'll send you a magic link to sign in.
For more information about billing and payment options, please see our [Billing FAQ](/billing/billing).
If you need to change your account email, the Mocha team can help you. Email [support@getmocha.com](mailto:support@getmocha.com) from the email address associated with your account, and our support team will process your request. We can only transfer the account if the new email does not already have an account associated with it.
***
## Subscription Management FAQ
If you cancel your subscription:
* **Published apps stay online** until the end of your current billing period
* After your subscription ends, published apps on custom domains will go offline
* Your projects and data are preservedâyou don't lose anything
* You can still access your projects, view them, and download your code
* You can republish by resubscribing at any time
Your work is never deleted when you cancel. You can always come back and pick up where you left off.
Published apps remain online until the end of your billing period. After that, apps on custom domains will go offline. Apps published to `.mocha.app` subdomains may also be affected by your plan limits.
To keep your apps online, you'll need to maintain an active subscription at a tier that supports your publishing needs.
When you downgrade:
* Your new credit limit takes effect at the start of your next billing cycle
* If you have more published apps than your new tier allows, you may need to unpublish some
* Your existing projects and data remain intact
* Features specific to higher tiers (like more custom domains) will be limited to your new tier's allowances
We recommend reviewing your published apps and domains before downgrading to ensure you're within your new tier's limits.
The Bronze tier allows up to **5 published apps**. You can create as many projects as you want, but only 5 can be published at a time.
If you need to publish more apps, you can either:
* Unpublish an existing app to make room
* Upgrade to Silver (15 published apps) or Gold (35 published apps)
To duplicate an app:
1. Open the app you want to duplicate
2. Go to the version history
3. Select the version you want to duplicate
4. Use the "Duplicate" option to create a new project from that version
This is useful when you want to experiment with different directions or create variations of your app.
Learn more in the [versions guide](/basics/versions).
If you accidentally deleted a project, contact [support@getmocha.com](mailto:support@getmocha.com) as soon as possible. We may be able to help recover it, but we can't guarantee recovery in all cases.
Deleted projects may not be recoverable after some time. If you think you might want to return to a project, consider keeping it rather than deleting it.
When you upgrade to a higher tier or add credit bundles, your credits are topped up immediately. You don't have to wait for your billing cycle to reset.
Credit bundles are add-ons that give you extra credits each month on top of your base plan. Each bundle adds 1,500 credits per month.
* **Bronze** can add up to 1 credit bundle
* **Silver** can add 2, 4, or 7 credit bundles
* **Gold** can add 7, 14, or 21 credit bundles
Credit bundles are billed monthly along with your subscription. You can add or remove them anytime through the upgrade menu, and you will be billed only the difference at the time of the change. Then, at the next billing cycle, you will be billed the full amount for the new total.
# Billing
Source: https://docs.getmocha.com/billing/billing
Information about subscriptions, payments, and billing
### How do I subscribe?
Go to your profile and click on "Upgrade". You can pick any tier from bronze, silver or gold.
### Do you offer any discounts?
Not currently but we regularly run campaigns.
### Can I cancel my subscription?
Yes, you can cancel at any time. To do this first open the upgrade modal, and click "Manage subscription". This will take you to the Stripe customer portal from which you can cancel your plan.
### How do I request a refund?
Please email [support@getmocha.com](mailto:support@getmocha.com) from the email address associated with your account, and our support team will process your request.
We do not offer refunds if you have used a large amount of your monthly credits.
We do not offer refunds for "wasted credits trying to fix something with the AI". We understand how frustrating it can be, but our recommendation is to use [Discuss Mode](/basics/discuss-mode) to chat through the problem first; and prioritize [restoring a known-good version](/basics/versions) to roll back to a working state, and go from there. Read more in our [troubleshooting Guide](/guides/troubleshooting).
For help with billing, and requesting refunds or token credits, please contact our customer service team directly at [support@getmocha.com](mailto:support@getmocha.com)
We respond to everyone but have a very small team, so please be patient if we don't respond right away. Thank you đ
# Credit and App Size Limits
Source: https://docs.getmocha.com/billing/limits
Learn about Mocha credit allowances and app size limitations
In Mocha, there are two limits that you should be aware of:
1. [Credit limits](#credit-limits)
2. [App size limits](#app-size-limits)
## Credit Limits
### How many credits do I get?
Everyone starts with **20 free credits** on the Free tier.
On a Bronze, Silver or Gold plan you receive **1,500, 4,500, and 25,000 credits** per month respectively. These refill every billing cycle.
* đ„**Bronze**: 1,500 credits per month
* đ„**Silver**: 4,500 credits per month
* đ„**Gold**: 25,000 credits per month
Unused **subscription credits** can accumulate up to **2Ă your monthly subscription allowance** (base plan + any credit bundles). If you're already at the cap when your billing cycle refreshes, you won't receive additional subscription credits until you spend some.
Example: A plan with **1,500 credits/month** can save up to **3,000 subscription credits**.
### How do you count credits?
We only deduct credits when an AI operation (code generation or edit) succeeds. You can track your credit balance by clicking the main dropdown menu in the top left corner.
### Do credits roll over from month to month?
Subscription credits refresh each billing cycle. Unused subscription credits can carry over up to **2Ă your monthly subscription allowance** (base plan + bundles). Purchased and gifted credits are kept forever and are only used after subscription credits run out.
### I used all my credits by clicking "Fix with AI", what should I do?
You can email us at [support@getmocha.com](mailto:support@getmocha.com) from the email associated with the account. In general, only use Fix with AI once or twice, if the AI can't fix it automatically you should try a different strategy or ask for help in our [Discord](https://discord.gg/y998ff2XTv).
### How can I purchase more credits?
You should subscribe to a higher plan. If you want to buy one-off credits, let us know at [support@getmocha.com](mailto:support@getmocha.com), we are debating adding this as an option if there is demand.
## App Size Limits
Mocha's AI agent can handle apps of virtually any size, with limits varying by subscription tier:
* đ„**Bronze**: Limited app size (suitable for small to medium projects)
* đ„**Silver**: Nearly unlimited app size
* đ„**Gold**: Even larger app size, and uses our greedy agent mode.
Starting with the Silver tier, you can build large, complex applications without worrying about size constraints. The limits are set so high that they're effectively unlimited for most use cases.
### I keep seeing "Project size exceeds maximum allowed bronze tier limits". What can I do?
If you're on the Bronze tier and encountering size limits, upgrading to Silver or Gold will give you nearly unlimited capacity to continue building your app.
The Bronze tier is designed for smaller projects and learning. For production applications or larger codebases, we recommend upgrading to Silver or Gold for the best experience.
***
## Credits FAQ
Credits are consumed when you ask Mocha's AI to make changes to your app. This includes generating new features, editing existing code, fixing bugs, and any other AI-powered modifications. Credits are also used for [Discuss Mode](/basics/discuss-mode).
Credits are **not** used for:
* Browsing your project
* Using [Direct Edit Mode](/basics/direct-edit) to change text
* Viewing or managing your database
* Publishing your app
* Restoring a version
It depends on the complexity of your request. Here are some rough examples:
* **Simple text or styling change:** 5-15 credits
* **Adding a new component or section:** 15-40 credits
* **Building a new page:** 30-60 credits
* **Adding a complex feature with database:** 50-100+ credits
* **Using Discuss Mode:** Dynamic credits (same as code mode)
Smaller, focused requests typically use fewer credits than large, complex ones. We recommend breaking big features into smaller steps.
**Subscription credits** refresh each billing cycle and can accumulate up to **2Ă your monthly subscription allowance** (base plan + bundles). If you're already at the cap at the time of renewal, you won't receive additional subscription credits until you spend some.
**Purchased credits** (one-time purchases) and **gifted credits** are kept forever, don't expire, and are only used when subscription credits have been used up.
When you run out of credits, you won't be able to make AI-powered changes until your credits refresh or you get more. However, you can still:
* View and browse your project
* Use [Direct Edit Mode](/basics/direct-edit) for simple text changes
* Publish your app
* Access your database
* Download your code
If you're stuck mid-project, consider upgrading to a higher tier, or contact [support@getmocha.com](mailto:support@getmocha.com) to discuss options.
We're exploring adding one-time credit packs based on user demand. If this interests you, let us know at [support@getmocha.com](mailto:support@getmocha.com).
Currently, the best way to get more credits is to subscribe to a paid plan (Bronze, Silver, or Gold).
Your credits reset on the anniversary of when you started your subscription. For example, if you subscribed on the 15th of the month, your credits will refresh on the 15th of each following month.
You can check your current credit balance and billing date from the main menu in the top left corner of the app.
***
## Scalability FAQ
Mocha apps are hosted on Cloudflare's global infrastructure, which is designed to handle significant traffic. Your app can serve many concurrent users without you needing to worry about server management or scaling.
For most use casesâincluding small businesses, communities, and growing startupsâMocha's infrastructure handles the load automatically.
Yes! Mocha's infrastructure scales automatically. Many users build and run SaaS products, membership sites, and tools with substantial user bases on Mocha.
For the best experience with larger applications, we recommend Silver or Gold tiers which have generous limits on app size and published apps.
Mocha apps run on Cloudflare, which automatically handles traffic spikes. You don't need to configure anythingâthe infrastructure scales up to meet demand and scales down when traffic subsides.
Storage limits vary by tier. Silver and Gold tiers have very generous limits that accommodate most use cases. If you're building something that requires large amounts of data storage, consider reaching out to [support@getmocha.com](mailto:support@getmocha.com) to discuss your needs.
# Bugs & Feature requests
Source: https://docs.getmocha.com/community/bugs-features
How to report issues and request new features for Mocha
# Reporting Bugs & Requesting Features
â ïž Please check our existing issues before submitting a new one.
We track bugs and feature requests in [Discord](https://discord.com/channels/1268304428771971093/1312187414952935455). Please take the time to search first before creating a new issue. Upvoting an existing issue is a more efficient way to get us to prioritize it than creating another ticket!
## Steps to Report a Bug
1. Join our [Discord community](https://discord.gg/y998ff2XTv)
2. Navigate to the bugs-and-issues channel
3. Search for similar issues to yours
4. If you don't find an existing report, create a new post with:
* A clear description of the issue
* Steps to reproduce the problem
* Screenshots if applicable
* System information (browser, OS, etc.)
## Requesting Features
Have an idea for a new feature or improvement? We'd love to hear it!
1. Join our [Discord community](https://discord.gg/y998ff2XTv)
2. Navigate to the feature-requests channel
3. Search for similar requests
4. If your idea is new, create a detailed post explaining:
* The problem your feature would solve
* How it would work
* Why it would be valuable
## Known Issues
We maintain a list of known issues in our Discord server. Check there first to see if we're already aware of the problem you're experiencing.
# Community & News
Source: https://docs.getmocha.com/community/community
Stay connected with the Mocha community and latest updates
## Getting Help
Need help with Mocha? Here are your options:
**Fastest response** - Our active Discord community is the quickest way to get help. The Mocha team and community members are there to assist.
For account issues, billing questions, or private matters, email us at [support@getmocha.com](mailto:support@getmocha.com)
**Discord is usually the fastest option.** The Mocha team is active there, and many community members can help with common questions too.
For account-specific issues (billing, subscription problems, account recovery), email [support@getmocha.com](mailto:support@getmocha.com) directly.
* **Discord:** Usually within a few hours during business hours, sometimes faster
* **Email:** We aim to respond within 1-2 business days
We're a small team, so please be patient. We read and respond to everything.
To get the best help, please include:
1. **What you're trying to do** - Describe your goal
2. **What's happening instead** - Describe the issue or error
3. **Screenshots** - A picture is worth a thousand words
4. **Error messages** - Copy any error text you see
The more context you provide, the faster we can help!
We don't currently offer phone or live chat support. Discord is our real-time support channel, and it works well for most questions.
For urgent issues, posting in Discord with a clear description usually gets quick attention.
***
## Join the Community
We have a thriving community of Mocha users and developers. Connect with us through these channels:
* [Discord](https://discord.gg/y998ff2XTv) - Our central hub for community discussions, support, and sharing projects
* [X / Twitter](https://x.com/buildwithmocha) - Follow for the latest updates and announcements
## Other Platforms
You can also find us on:
* [YouTube](https://www.youtube.com/@buildwithmocha) - Tutorials and demonstrations
* [LinkedIn](https://www.linkedin.com/company/96310770) - Company news and updates
## Share Your Work
We love seeing what you build with Mocha! Share your projects in our Discord's showcase channel or tag us on social media.
## Stay Updated
For the latest features, improvements, and company news, check out our [Blog](https://getmocha.com/blog).
# Getting Started with Mocha
Source: https://docs.getmocha.com/getting-started
Start your journey with Mocha and create your first AI-powered website
**Mocha is shutting down on August 1, 2026.** Read the [shutdown announcement](https://getmocha.com/blog/mocha-shutdown) to learn how to migrate or export your apps.
Welcome to Mocha! This guide will walk you through creating and customizing your first AI-powered website. Let's get started!
## Create Your First Project
Head over to [getmocha.com](https://getmocha.com) and create your free account. The signup process is quick and straightforward.
Once registered, you can create your first project. Simply enter a prompt describing what you want to build, and Mocha's AI will handle the rest.
Hang tight! It takes a couple of minutes for the AI to build the first version of your site. The AI is carefully crafting your website's code, design, and content.
## Customize Your App
Below is an overview of the Mocha interface. The main menu on the top left allows you to see your user, number of messages remaining, billing status, and more.
On the right side, you can see the chat interface, where you can ask the AI to make changes to your website.
In the center, you can see the website preview, where you can see and interact with the current state of your website.
In the top nav, you can find the page you're currently navigating on, and access to the project settings where you can change the project name, description, custom knowledge, and sharing settings.
Use the chat panel on the right to make changes to your website. Ask for new features, design updates, or any modifications you'd like to make.
Attach images in the chat to show the AI exactly what you want. For example:
* "Make it look like this" (with a screenshot)
* "Use this as the background"
* "Add this image to the hero section"
## Build Full-Stack Features
Write backend endpoints and call external APIs. Manage secrets safely.
Add signâin with Google and protect pages and actions.
Create tables, view data, and understand Dev vs Prod databases.
## Interactive Features
Your website is fully interactive! You can:
* Test all features directly in the preview pane
* Maximize the preview for a full-screen experience
* Interact with buttons, forms, and other elements
Don't panic if you encounter errors!
You have several options to resolve issues:
* Use the "Fix with AI" button
* Paste error messages in the chat
* Restore previous working versions
* Check our detailed error handling guide
## Publishing Your Website
Publish your website to the web with a single click. Your site will be available at a unique mocha.app subdomain.
Available on Pro tiers (Bronze, Silver, Gold)
Upgrade to a Pro tier to:
* Use custom subdomains (e.g., my-super-app.mocha.app)
* Connect your own custom domain (coming very soon)
That's it! Your website is live and ready to share. Send the link to friends, post it on social media, or add it to your portfolio.
## Advanced Features
Customize your project through the settings panel:
* Change project name and description
* Add custom knowledge
* Configure sharing settings
Create additional pages by simply asking the AI:
* "Add a profile page"
* "Create a pricing page"
* "Add a contact form page"
## Social Media Integration
Make your website stand out on social media!
To update your website's social media preview:
1. Upload your desired image
2. Ask Mocha: "Use this as the sharing preview when sharing the link on social media"
## Next Steps
* Try different AI prompts
* Experiment with image uploads
* Test the live preview
* Visit our [Community Discord](https://discord.gg/shDEGBSe2d)
* Check out our [YouTube tutorials](https://www.youtube.com/@buildwithmocha)
* Contact [support@getmocha.com](mailto:support@getmocha.com)
# FAQ
Source: https://docs.getmocha.com/getting-started/faq
Frequently asked questions about Mocha
**Mocha is shutting down on August 1, 2026.** Read the [shutdown announcement](https://getmocha.com/blog/mocha-shutdown) to learn how to migrate or export your apps.
Mocha is an AI-powered platform that enables users of any skill level to create full-stack web applications without requiring coding expertise by simply describing what they want in plain English. Instead of hiring developers, users can generate web apps or websites instantly.
Mocha offers a freemium model with different tiers to suit your needs. You can get started for free and upgrade to a Pro plan when you need more features and resources. Learn more about our [subscription plans](/billing/account-subscriptions).
Simply create an account on Mocha, explore the interface, and start building by typing prompts that describe what you want to create.
You can build any web app idea that you have. A website for your business, a SaaS, landing pages, AI-powered utilities, internal tools,... Your ideas are the limit.
Yes, Mocha is a full-stack app builder and comes batteries included with a database, API server, and optionally authentication. You can also call any backend APIs by passing your own secret API keys to the system.
Mocha chooses the tech stack for you. It uses TypeScript, React, Hono (for API endpoints), and a SQLite database. We use Cloudflare for hosting Mocha apps. This is designed to be reliable and performant for the vast majority of app-builder use cases.
No. Mocha is designed to be accessible by people with no technical background, so we make choices on behalf of Mocha users.
Supporting arbitrary tech stacks or external platforms would introduce complexity and lead to a less reliable product, particularly for non-techincal users.
No! Mocha is designed for people with 0 coding experience and expertise. Our goal is to empower people who previously couldn't build their own apps. We offer some internal tools like the code editor in case you're technical and want to get your hands dirty, but these are completely optional.
Mocha allows non-technical users to create apps through a structured workflow: **plan, prompt, scaffold, debug, and deploy.** You can generate project documentation, break the process into steps, and let AI guide you.
Yes! It is completely optional but Mocha gives you access to the code and you can use [Discuss Mode](/basics/discuss-mode) to ask questions and get help.
The best way to learn is by doing. Mocha helps you understand coding by:
* Generating and explaining code
* Encouraging pattern recognition in AI-generated responses
* Allowing experimentation and debugging
It depends on complexity. By breaking tasks into smaller steps, planning ahead, and refining based on feedback, you can move quickly while ensuring quality.
In a matter of minutes, you can get a landing page up and running.
For more serious projects, you can expect to spend 1-2 hours to get a solid version running.
Mocha provides an AI-driven debugging tool that analyzes errors in real time. If an error occurs:
* Click "Fix with AI"
* Use [**Discuss Mode**](/basics/discuss-mode) to describe the issue and ask Mocha to debug it
* Review error logs and console output for additional details
Try refreshing your session or reviewing documentation. If the issue persists, contact **Mocha Support** through our support page.
We have built Mocha to be very opinionated. We're website building experts and make the AI structure things for you.
You should focus on the **idea** and the outcomes you want. If you describe what you want clearly, Mocha will structure the project for you.
You can also use [Discuss Mode](/basics/discuss-mode) to plan the next feature and have Mocha write a clear PRD (product requirements document) for you. Then switch back to edit mode and say "Build it!" and Mocha will comply.
Yes! You can use your own custom domain with Mocha. We support connecting domains from any registrar, and you can even purchase domains directly through Mocha with our IONOS integration. Learn more about [custom domains](/basics/custom-domains).
Yes! You can download your project code at any time. Click the app name in the header, and you'll see a download code button. Learn more about [downloading your project](/basics/hosting#can-i-download-my-project%3F).
Yes! Diagrams (from Miro/FigJam/etc.) and screenshots are super helpfulâespecially for flows and UI bugs. While videos aren't supported yet, screenshots can often do the job. Learn more about [using images](/basics/assets).
Mocha has the concept of an "app size". The more complex your app is, the bigger the app size. Each tier has different limits for the app size. In practice, silver tier and above have incredibly high app size limits, and you should never hit them unless you're building a terribly complex app.
Credits are an internal mechanism Mocha uses to track usage. When you ask Mocha to do something, it uses an amount of credits proportional to the complexity of the request. Simple tasks take only a few credits, and larger tasks can take north of 100 credits (this is rare, most changes should take between 15 and 50 credits).
You can see your remaining credits in the top left menu of the app.
You can get more credits by upgrading to a Pro plan. Each tier refreshes your credits every month.
Subscription credits refresh each month and can accumulate up to **2Ă your monthly subscription allowance** (base plan + bundles). If you're already at the cap at renewal, you won't receive additional subscription credits until you spend some. Purchased and gifted credits never expire and are only used after subscription credits run out.
Learn more about credits in our [limits guide](/billing/limits).
Mocha doesn't have a direct Figma import feature. However, you can:
* **Take screenshots** of your Figma designs and share them with Mochaâdescribe what you want and the AI will recreate it
* **Describe your design** in detail and let Mocha generate it
* **Use reference images** to guide the AI toward your desired look
Screenshots and reference images are often very effective at communicating design intent to the AI.
Mocha is primarily **AI-driven** rather than drag-and-drop. Instead of manually placing elements, you describe what you want and Mocha builds it for you.
That said, we do offer [Direct Edit Mode](/basics/direct-edit) which lets you click on text and edit it directlyâperfect for quick content changes without using credits.
We're also working on more visual editing features for the future.
Yes! While Mocha is designed for non-technical users, you can absolutely view and edit the code if you want to:
1. Click the code toggle in the top left to enter dev mode
2. Browse and edit files directly
3. Changes save automatically and the preview updates in real-time
This is completely optionalâyou don't need to touch code to build with Mocha.
If Mocha misunderstands or creates something different than what you wanted:
1. **Be more specific** - Add details about what you want
2. **Use screenshots** - Show Mocha what you're looking for
3. **Use [Discuss Mode](/basics/discuss-mode)** - Chat about your idea first before making changes
4. **Restore a previous version** - Roll back and try a different approach
Breaking complex requests into smaller, specific steps often works better than asking for everything at once.
You can't choose your model directly, but Mocha offers two modes: **Max Mode** and **Default Mode**. Both are available on all tiers, including Default. Choose [Max Mode](/basics/max-mode) if you want the best results and aren't cost-sensitive.
Tips for getting great results:
* **Start with a clear plan** - Know what you want before you start prompting
* **Be specific** - "Add a blue button that says Contact Us in the header" works better than "make it look better"
* **Use screenshots** - Visual references help the AI understand what you want
* **Build incrementally** - Small, focused changes are more reliable than big, complex ones
* **Use Discuss Mode** - Plan complex features before building them
* **Use [Max Mode](/basics/max-mode)** - For complex tasks, Max Mode delivers the best results
Check out our [prompting guide](/guides/prompting) for more tips.
# Mocha Help Desk
Source: https://docs.getmocha.com/getting-started/index
Find answers to common questions and get help with Mocha
**Mocha is shutting down on August 1, 2026.** Read the [shutdown announcement](https://getmocha.com/blog/mocha-shutdown) to learn how to migrate or export your apps.
# Mocha Help Desk
Thanks for visiting the Mocha Help Desk! We want to help, and we know that running into issues can be frustrating, but please remember that we're a small team with limited resources.
Your best bet is to first look for similar questions and topics in the FAQ.
## Quick Links
* [Usage Guides](/guides)
* [Education & Tutorials](/guides)
* [FAQs](/getting-started/faq)
* [Reporting Bugs & Requesting Features](/community/bugs-features)
* [Community & News](/community/community)
* [Billing](/billing/billing)
## Support Contact
For support on billing, refunds, and other urgent issues:
> Email: [support@getmocha.com](mailto:support@getmocha.com)
# Migrating older apps
Source: https://docs.getmocha.com/getting-started/migrating
Guidance for migrating older Mocha applications to the latest version
[Mocha 1.0 was announced](https://blog.getmocha.com/mocha-1-0-announcement/) in July 2025. Starting from this release, all new Mocha apps have a different underlying architecture to support new features, such as databases, user logins, and more.
Mocha apps created prior to this release are no longer supported moving forward. If you have an older app and want to continue using it, we recommend you migrate it to a new Mocha app.
If you see the following banner in your app, please follow the instructions below.
## Migrating to a new Mocha app
Unfortunately, there's no straightforward way today to migrate apps. The simplest way is to create a new app, describe functionality of previous one, and include screen shots.
If you are a paying subscriber, you can reach out to our support team for assistance with the migration process. We cannot guarantee help but we will do our best if you're stuck.
# From Idea to Live Website
Source: https://docs.getmocha.com/guides/idea-to-website
Learn how to bring your vision to life with Mocha
"I've got a clear vision for a website, but zero technical skills to make it happen."
Sound familiar? Then you're exactly where you need to be.
## Who This Guide Is For
You're brimming with ideas. Perhaps you've dabbled with AI platforms, jotted down concepts, or even attempted to launch a project or two. Yet you find yourself caught in that frustrating gap between your brilliant concept and actually bringing it to life.
This guide is designed to help you:
* Transform your abstract idea into a functioning website
* Sidestep typical pitfalls along the way
* Leverage Mocha effectivelyâparticularly if you don't have coding experience
## The Most Common Mistake: Don't do this!
A lot of users fall into the same trap: They jump right into building before they've clearly defined what they're buildingâboth for themselves and for Mocha.
The result?
* Wasted time in the wrong direction
* Lots of errors and frustration
* Confused AI and AI-generated errors
* A project that feels "too far gone to fix" that you give up on
## Best Practices for Turning Ideas Into Real Websites
Before you prompt the AI, spend 15 minutes writing:
* **Core features**: What your website does
* **Audience**: Who it's for (even if it's just you)
* **Minimum viable product**: What the simplest & minimum version should include
Turn this into a list of features or use cases. Feed it into Mocha to get a clear plan for your website.
```
I want to build a CRM tool for sales teams in growing tech startups to manage leads, track deals, and communicate with clients efficiently. This tool centralizes customer data, streamlines sales workflows, and provides reporting features.
Project Name:
ClientFlow CRM
Target Audience:
sales reps, account managers, small to medium-sized teams
Core Features:
1. Contact management with lead and customer profiles
2. Pipeline tracking to monitor deal stages
3. Automated follow-up reminders and notifications
4. Integration with email services for direct outreach
5. Reporting dashboard with charts and metrics
6. Optional AI-driven lead scoring or automated outreach templates
Design Preferences:
A professional, data-focused interface with organized layouts, easy filters, and a color scheme that makes charts and data points stand out.
```
For the smoothest development experience with Mocha, follow this three-phase approach:
Start with the skeleton
* Create a basic layout and navigation
* Focus on user flows and page structure
* Find and nail your "vibe"
* Use screenshots to guide your design
* Use placeholder content and mock data
* Don't worry about perfect styling yet
Make it functional
* Implement core features one by one
* Connect components and establish logic
* Test each feature as you build it
* Consider adding auth
* Consider adding an admin for you to operate the site
Make it shine
* Enhance visual design and animations
* Optimize for performance and responsiveness
* Add final touches like error handling
* Add analytics
* Add a customer domain, and deploy!
This phased approach prevents you from getting stuck in details too early. You'll see your website take shape quickly, maintain momentum, and avoid the frustration of trying to perfect everything at once.
Mocha isn't just a website builderâit's your project-aware assistant.
It understands your project goals and can help you:
* Debug issues with context
* Brainstorm new components
* Translate vague ideas into working designs
Use chat mode to ask questions and plan your next move without making any changes to your project. This is perfect for exploring ideas before committing to code changes.
```
I want to build a dog breeding management website. Here's what I need it to do: [list]. Can you break this down into steps or components to build?
```
Don't build everything at once. Split your idea into Lego pieces:
* One Lego piece = one component, page, or flow
* Build one at a time
* Test each before moving on
Ask Mocha to help plan this with prompts like:
```
Here's my website idea. Can you break it into features or pages I should build?
```
If you're stuck:
* Don't repeatedly try the same approach
* Instead, take a step back
* Ask Mocha to investigate alternative approaches
* Revert to a previous working version by restoring it from the history
* Or start a fresh project with what you've learned
You can duplicate your app from a previous version if you want to explore a different direction without losing your work.
Before every prompt, ask yourself:
```
What are my goals?
What am I trying to build right now?
How can I break it into a smaller, manageable task?
```
Avoid shifting mid-conversation. AI gets confused if your goals change without clarity.
Projects evolve. If things feel tangled:
* Start a new project (you keep the original)
* Begin fresh with what you've learned
* Keep the new build focused and structured
## Builder's Checklist
* Write your idea in 5-10 bullet points
* List core features for an MVP
* Decide: Front-End First or Back-to-Front
* Use Mocha to co-plan and debug
* Build in bricks: 1 feature at a time
* Only connect backend services when ready
* Start fresh if errors pile up
* Test as you build
* Get feedback before going live
* Use Mocha's built-in hosting
* Connect your custom domain
* Share your creation with the world
## Final Tip: You're the First User
Design for yourself first. Test like your future users would.
And remember: you're building something only you could imagine.
You don't need to know how to code.
You just need a clear idea, a good plan, and a little patience.
Mocha will help with the rest.
# Blank Page or Missing Images
Source: https://docs.getmocha.com/guides/network-blocking
What to do if your Mocha app shows a blank screen, images don't load, or your network blocks the site
If you're seeing a blank page, missing images, or a "this site is unsafe" warning when viewing your Mocha app, your internet provider or network security software might be blocking one of our domains. This is frustrating, and we're sorry you're dealing with it.
This issue only affects *viewing* your appâyour work in Mocha is safe and nothing is lost. Once you fix the network issue, everything will appear as expected.
## Why does this happen?
Mocha hosts images and other assets on a domain called `mocha-cdn.com`. Unfortunately, some people have misused our platform to build websites that violate our terms of service. When this happens, security services sometimes flag our entire domain as potentially unsafeâeven though your app is perfectly fine.
We're actively working to prevent abuse and get our domains removed from blocklists. We apologize for the inconvenience this causes.
## What you might see
Here are the common symptoms of this issue:
* **Blank white page** when loading your published app
* **Images not showing up** (broken image icons or empty spaces)
* **"This site is unsafe"** or similar security warning
* **Parts of your app missing** while other parts work fine
* Everything works in the Mocha editor, but not on the published site
## How to fix it
The quickest way to check is to try viewing your app on a different network:
* **Try your phone's mobile data** (turn off WiFi first)
* **Try a different WiFi network** (like a coffee shop or a friend's house)
* **Try a VPN** if you have one
If your app works on a different network, you've confirmed the issue is with your home or office network's security settings.
Many internet providers include security or "shield" software that filters websites. Common ones include:
* **Xfinity xFi Advanced Security** (Comcast)
* **AT\&T ActiveArmor**
* **Verizon Home Network Protection**
* **Norton, McAfee, or other antivirus software** on your computer
* **Pi-hole or other network-wide ad blockers**
* **Corporate firewalls** (if you're on a work network)
Check your router's admin page or your internet provider's app to find security settings.
Once you find the security software, look for options like "Allowlist," "Whitelist," "Trusted sites," or "Exceptions." Add these domains:
```
mocha-cdn.com
getmocha.com
```
The exact steps vary by provider. If you can't find the setting, try searching for "\[your provider name] allowlist website" or contact your internet provider's support.
After adding the domains to your allowlist:
1. Close your browser completely
2. Reopen it and visit your app again
3. You may need to wait a few minutes for the changes to take effect
## Provider-specific instructions
1. Open the **Xfinity app** on your phone
2. Go to **Connect** â **xFi Advanced Security**
3. Find **Blocked Threats** or **Settings**
4. Look for an option to add trusted sites
5. Add `mocha-cdn.com` and `getmocha.com`
1. Open the **AT\&T Smart Home Manager** app
2. Navigate to **Network Security** or **ActiveArmor**
3. Find the allowlist or exceptions section
4. Add `mocha-cdn.com` and `getmocha.com`
If you're on a work or school network, you'll likely need to contact your IT department and ask them to allowlist `mocha-cdn.com` and `getmocha.com`.
1. Open your antivirus software
2. Look for **Settings** â **Web Protection** or **Firewall**
3. Find **Exclusions**, **Exceptions**, or **Allowed sites**
4. Add `mocha-cdn.com` and `getmocha.com`
## Still not working?
If you've tried the steps above and still have issues:
1. **Double-check the spelling** of the domains you added
2. **Restart your router** after making changes
3. **Clear your browser cache** (Cmd+Shift+R on Mac, Ctrl+Shift+R on Windows)
4. **Try a different browser** to rule out browser-specific blocking
If you're seeing this issue and none of the above helps, please reach out on our [Discord server](https://discord.gg/shDEGBSe2d). Include:
* Your internet provider
* What you see (blank page, missing images, error message)
* Whether it works on mobile data
We want to help get you unblocked!
## We're working on it
We take this issue seriously. Our team is actively:
* Monitoring for abuse and removing violating content quickly
* Working with security services to clear our domains from blocklists
* Improving our systems to prevent misuse in the first place
We appreciate your patience as we work to make this a non-issue for everyone.
# Prompting Best Practices
Source: https://docs.getmocha.com/guides/prompting
Learn how to effectively communicate with Mocha AI
Great prompts help Mocha build better apps.
Think of your prompt like a blueprint.
If your blueprint is clear, your app is closer to what you imagined.
If your blueprint is vague, Mocha has to guess.
This guide shows you how to prompt clearly, even if you are not technical.
## 1) Quick Start / TL;DR
Your prompt should describe the outcome you want.
Be specific about who the app is for, what it does, how it should feel, and what users should do.
Use this formula:
`Build a [type of app] for [audience] that [core function]. It should [key features].`
Examples:
* `Build a client portal for freelance designers that helps clients review project progress. It should include timelines, file uploads, comments, and status updates.`
* `Build a booking app for a local yoga studio that lets customers reserve classes. It should show weekly schedules, instructor bios, and easy checkout.`
* `Build a simple CRM for a small real estate team that tracks leads, follow-ups, and deal stages.`
If you are unsure where to start, begin with one sentence using the formula above, then add details in your next message.
## 2) Writing Your First Prompt
Use the **Who / What / Why** framework.
### Who
Who is this app for?
Examples: first-time home buyers, wedding photographers, busy parents, small teams.
### What
What should users do in the app?
Examples: manage contacts, book appointments, publish portfolio work, pay for subscriptions.
### Why
Why does this app matter?
Examples: save time, reduce back-and-forth, look professional, keep everything in one place.
You do not need to explain code or technical setup. Describe the end result you want users to experience.
### Good vs bad prompts
Bad:
* `Make me a CRM.`
* `Build a portfolio site.`
* `Create a booking app.`
Why these are hard:
* No audience
* No key workflows
* No design direction
Better:
* `Build a CRM for a two-person insurance agency. We need lead tracking, call notes, reminders, and a pipeline view from new lead to closed policy. Keep it simple and easy to read.`
* `Build a portfolio site for a motion designer targeting startup clients. Include case studies, testimonials, and a contact form. Style should feel bold and modern.`
* `Build a booking app for a mobile dog grooming business. Customers should choose service type, pick a time slot, enter pet details, and get confirmation by email.`
Best:
* `Build a CRM for a small real estate team handling 200 leads per month. The goal is to stop missing follow-ups. Include lead stages, owner assignment, notes, reminders, and a daily task list. Keep the dashboard clean with obvious next actions.`
Clear prompts reduce rework and help Mocha make fewer wrong assumptions.
## 3) Building Incrementally
The fastest way to get a great app is to build in steps.
Do not describe everything in one giant message.
Start with the core, then add one layer at a time.
Recommended sequence:
1. Describe app goal and target users
2. Refine layout and page structure
3. Add authentication
4. Add database-backed features
5. Polish design and content
Example workflow for a booking app:
1. `Build a booking app for a local nail salon. Customers should view services, see available times, and book appointments.`
2. `Refine the layout: homepage with hero, services grid, and booking section. Keep it bright, friendly, and mobile-first.`
3. `Add login with Google so returning customers can manage upcoming bookings.`
4. `Store bookings in the database. Add an admin view to confirm, reschedule, or cancel appointments.`
5. `Polish the design with softer colors, more whitespace, clearer buttons, and better confirmation messages.`
After each step, test the app like a real user, then prompt for the next change.
## 4) Effective Techniques
These techniques usually improve results right away.
### Be specific about design
Say what you want to see.
Useful details include:
* Color style: warm, neutral, bold, minimal
* Layout: sidebar, top nav, card grid, split screen
* Typography feel: elegant, playful, clean, professional
* Density: spacious or compact
Example:
* `Use a clean layout with a left sidebar, soft gray background, white cards, and a modern professional feel. Keep text easy to scan.`
### Reference real sites
If you like a style, say so.
Examples:
* `Make the pricing section feel like Stripe's pricing page: clear tiers, strong hierarchy, easy comparison.`
* `Use a landing page flow similar to Notion: simple hero, social proof, then feature blocks.`
You are giving visual direction, not asking for an exact copy.
### Use component language
Name interface pieces directly.
Helpful words: header, hero, cards, sidebar, modal, tabs, table, grid, empty state, toast message.
Example:
* `Add a sticky header, a three-column card grid for listings, and a modal for creating new entries.`
### Mention user flows
Describe what happens when users act.
Prompt pattern:
`When a user clicks [X], they should see [Y], then be able to [Z].`
Examples:
* `When a user clicks 'Book now', they should see available time slots, then confirm details on one screen.`
* `When a user marks a deal as closed, they should see a success message and the deal should move to Closed automatically.`
### Use Discuss Mode first
Discuss Mode lets you plan in chat without making code changes.
Use it to brainstorm scope, compare ideas, set priorities, and draft better prompts.
Discuss Mode uses 0 credits, so it is a great place to think before building.
## 5) Common Mistakes to Avoid
### 1) Prompts that are too vague
Vague:
* `Make it better.`
* `Improve the UI.`
Better:
* `Improve readability by increasing text contrast, adding spacing between sections, and making primary buttons more prominent.`
### 2) Asking for too much at once
If one message includes too many changes, results get messy.
Better approach:
* Send one focused request
* Review result
* Send the next request
### 3) Not using versions when experimenting
When trying bold changes, create a safe checkpoint first.
If the result is not right, rollback and try a different direction.
Use Versions as your safety net so you can experiment freely.
### 4) Repeating "Fix with AI" without context
If something keeps failing, explain the problem clearly.
Helpful format:
* What you expected
* What actually happened
* Where it happened
* Any pattern you noticed
Example:
* `Expected: booking confirmation email sends after payment. Actual: payment succeeds but no email is sent. Happens on desktop and mobile.`
## 6) Power Tips
Use these habits to get stronger results with less effort.
### Plan first, build second
Start in Discuss Mode and ask Mocha to help define MVP scope, must-have features, and your first build prompt.
### Break complex apps into phases
Example phases:
1. Core pages and layout
2. Auth and user accounts
3. Data features and workflows
4. Integrations and automation
5. Final polish
### Describe your audience
Audience context shapes writing tone, layout choices, and onboarding clarity.
Example:
* `This app is for older adults who are not tech-savvy. Keep navigation simple, labels clear, and button text explicit.`
### Reference built-in features by name
Mocha supports:
* Google OAuth authentication
* Database features
* Analytics
* Email
* Hosting
* API integrations (like Stripe, Firecrawl, ElevenLabs)
* Image generation
* Custom domains
Example:
* `Add Google OAuth login, store customer records in the database, and send email confirmations after signup.`
### Use Direct Edit for quick visual tweaks
If the structure is right, use Direct Edit Mode for fast UI refinements.
Great for spacing, text edits, button labels, and alignment fixes.
Use prompts for larger structural changes, and Direct Edit for quick visual polish.
## Final Prompt Template
Copy and fill this in:
`Build a [type of app] for [audience] who need to [goal].`
`Core workflow: users should be able to [main actions].`
`Include these features first: [feature 1], [feature 2], [feature 3].`
`Design direction: [style], [layout], [color feel], [tone].`
`Important flow: when users [action], they should [result].`
`Start with an MVP, then we will iterate in phases.`
You do not need perfect prompts. Start clear, iterate quickly, and improve each round.
# Remove the Watermark
Source: https://docs.getmocha.com/guides/remove-watermark
How to disable the Mocha watermark on your published app
The Mocha watermark appears on free plans to help support our platform. If you're on a paid plan, you can remove it from your app.
Removing the watermark is a paid feature. New apps created on paid plans have the watermark disabled by default. However, if you created your app while on the free tier and then upgraded to a paid plan, you'll need to manually disable it.
## How to remove the watermark
Open your project settings in Mocha. You can find the Settings option in your project menu.
Look for the **"Show Watermark"** toggle in your settings and turn it off.
Click the **Save** button to apply your changes.
After saving, make sure to **publish your app** for the changes to take effect on your live site. The watermark will remain visible until you publish.
Don't forget to do both: **save your settings** and **publish your app**. Many people save but forget to publish, which means the watermark will still appear on your live site. Both steps are required!
## Why do I still see the watermark?
If you've upgraded to a paid plan but still see the watermark, it's likely because:
* You created the app while on the free tier (watermarks are enabled by default)
* You haven't disabled it in settings yet
* You saved your settings but haven't published your app
Follow the steps above to remove it. If you're on a paid plan and still having issues, reach out on our [Discord server](https://discord.gg/shDEGBSe2d) for help.
# Troubleshooting Errors
Source: https://docs.getmocha.com/guides/troubleshooting
Actionable steps to resolve issues when using Mocha
Building with Mocha gives you an AI pair-programmer that writes lots of code for you. That power comes with the occasional glitch: Code can be subtle to get right, and even AIs make mistakes which need to be fixed.
Our goal is to have Mocha fix everything for you, but our product is still not 100% perfect and sometimes you will need to help it out.
When something goes wrong, stay calm and follow the playbook below to get unstuck quickly.
## 5 Common Mistakes When Vibe Coding
Before diving into specific fixes, watch this video on the most common mistakes people make â and how to avoid them:
## Quick-Fix Checklist
A hard refresh will clear any transient UI glitches.
Click the restart button in the top-right corner.\
This forces a clean build and often resolves state-related errors.
Make sure you have a stable internet connectionâMocha runs partly in the cloud.
Mocha is build for the latest versions of Chrome, Edge, Safari and Firefox.
Press â B (or Ctrl + B on Windows) to toggle the realtime logs.\
Look for stack traces or build errorsâscreenshots go a long way when asking Mocha for help.
Even if you're not technical, the logs panel contains useful information you can use to share with Mocha support or with the AI (the AI can read it, just mention it).
## Craft a Targeted Prompt Before Hitting âFixâ
It's OK to try the "Fix with AI" button first, but if it doesn't work the first time, it's better to try to collect more information about the issue to help Mocha fix it more effectively.
1. What you expected to see
2. What you actually saw (include error text)
3. Any steps that reproduce the issue
Use [Discuss Mode](/basics/discuss-mode) to chat through the problem first; once Mocha explains the root cause, switch back to Build Mode and ask Mocha to 'fix what we just discussed'.
## Strategic Approaches
* **Restore a known-good version:** \[Version management]]\(/basics/versions) lets you roll back instantly. If youâve spent multiple credits without progress, restoring and trying again with a more specific prompt is often a better approach.
* **Iterate in small steps:** Commit or preview after each change so you know exactly which edit introduced the bug.
* **Watch your credits:** Endless âtry againâ loops can be costlyâchange tactics instead.
## Common Troubleshooting Areas
Troubleshooting generally falls into these categories:
* Use screenshots to explain visual bugs
* Prompt Mocha clearly with what is wrong with the UI
* Review your original instructions
* Break down complex requests
* Use examples to clarify intent
* Restore rather than building upon a bad version
* We're working on making these better!
* Check the logs panel for errors.
* If the AI can't fix it after a couple of attempts, contact support.
## Scenario-Specific Guides
Most blank pages are caused by a runtime exception in the UI, and you'll see an errors in the logs panel.
**Checklist**
1. Refresh the page to see if it resolves the issue.
2. Open the logs panel and look for âUnhandled Errorâ messages.
3. Check the browser console for React or Vite errors.
4. Revert the last commitâdid the page render again?
5. In Discuss Mode ask: âThe app renders blank because \. Please identify the component and suggest a fix.â
* See the [Troubleshooting Logins](/guides/troubleshooting-login) guide
* This is a silly mistake Mocha makes sometimes. We're working on it!
* Just say "All i see is a loader on the home page, check the home page component"
* We're working on making these better!
* Check the logs panel for errors.
* If the AI can't fix it after a couple of attempts, contact support.
* Remember: there are different databases for the sandbox and production. Do you need to seed the production database (add data to it)? If so, tell Mocha!
* Discuss Mode and Mocha currently doesn't have access to the production database, so it can't fix things there. This is for security reasons. You need to explain the issue to Mocha in the chat panel clearly.
## When to Contact Support
The quickest response you'll get is by going to our [Discord server](https://discord.gg/shDEGBSe2d) and asking for help there. The Mocha team is active there, and many community members will also help you out.
Contact Mocha support if you experience:
* Persistent error loops that can't be resolved
* Critical functionality failures
* Security concerns
* Platform-wide issues
Remember: Mocha is here to help. If you're stuck, don't hesitate to:
1. Use the Try to Fix button
2. Switch to Chat-Only Mode
3. Roll back to a working version
4. Contact support if needed
# Troubleshooting Login
Source: https://docs.getmocha.com/guides/troubleshooting-login
Help solving login-related issues while using Mocha
When using Mocha, some users are unable to login using the preview. The symptoms they experience are:
1. They successfully go through the login with Google flow
2. When they return back to Mocha, they are not logged in and are typically presented with the login screen again
While this type of scenario can happen for a few reasons, here we document one reason which the AI cannot help with.
## The problem
Mocha's authentication service uses cookies when logging in users. The preview where you interact with the app you're developing is considered a 'third party' by browsers.
Browsers block cookies in third-party contexts like the preview for some users. If the cookie is blocked by the browser then it will not be set.
If this happens, the app will not consider the user logged in.
To determine if this is happening to you, the browser will display a warning informing you third-party cookies have been blocked.
For example, in Google Chrome, there is an eye with a slash through it indicating this issue in the URL bar:
### Published apps
NOTE: this does NOT affect your app once published. This only affects logins in the preview as the preview is considered a "third-party" context.
## The solution
To fix this problem, you'll need to enable third-party cookies. In Chrome, click on the eye shown in the screen shot above.
Then, toggle the switch next to "Third-party cookies"
Refresh the page and try again. If third-party cookies were indeed the problem, then your app will now be working.
# Video Tutorials
Source: https://docs.getmocha.com/guides/video-tutorials
Learn Mocha through video tutorials and walkthroughs
## App Overview With Founder (13 minutes)
This comprehensive overview walks you through the core features and capabilities of Mocha, showing you how to build applications from idea to deployment.
### What you'll learn:
* How to get started with Mocha
* General overview of the platform and layout
* How to create a project
* How to make changes
* How to troubleshoot issues
* How to deploy your application
* How to use custom knowledge
* Best practices and tips
New to Mocha? This video is the perfect starting point to understand how the platform works and what you can build with it.
***
## More From Mocha
***
## Community Tutorials
Tutorials from our community creators on YouTube.
***
*More video tutorials coming soon! Have a specific topic you'd like to see covered? Let us know in our [Discord community](https://discord.gg/shDEGBSe2d).*
# Accepting Payments
Source: https://docs.getmocha.com/integrations/accepting-payments
How to accept payments on your app through Stripe
We will be building a payment hub for users to create and register for workshops or events that are hosted either online or on a physical location. The workshops will be able to accept payments from registered attendees which will be handled by Stripe.
## Why Stripe?
Stripe is an easy to use integration that gets you up and running and accepting payments in no time. You will be able to quickly set up a Stripe account that allows you to accept payments from all types of methods, including credit cards, debit cards, electronic wallets, and more.
To get started, head on over to [stripe.com](https://stripe.com) and sign up for an account.
## Start your app on Mocha
The foundational prompt matters. When you first create your app on Mocha, make sure your genisis prompt is clear and precise. We want to use exact language to touch on all of the important aspects of the build, so be sure to provide as much detail as possible about what you are trying to build. In this example, we will be using the following prompt:
```
Build a workshop booking and payment system for experts who want to sell online sessions.
As the workshop host, I want to:
- Create workshops with a title, description, date/time, duration, and price
- Set a maximum number of attendees
- See who has registered and paid
As an attendee, I want to:
- Browse available workshops
- Pay to register for a workshop
- Receive confirmation of my booking
- See my upcoming registered workshops
Use Stripe for payment processing. The checkout flow should be smooth â when someone clicks "Register", they pay through Stripe and get confirmed automatically.
Include proper webhook handling so registrations are only confirmed after successful payment. Show sold out status when workshops reach capacity.
```
Notice how this prompt includes:
* A clear description of the app's purpose and audience
* Specific features broken down by role
* Technical requirements (Stripe, webhook handling)
* Experience expectations (smooth checkout flow)
This level of detail helps Mocha understand exactly what you're building and sets a solid foundation for the rest of the development process.
Once you've submitted the initial prompt, you should be met with an input field asking you to add a few API keys from your Stripe account. We should be able to retrieve them from the Stripe dashboard.
## Setting up the Stripe API Key
During the build, you should see a prompt to add secrets for Stripe. You'll need:
* `STRIPE_SECRET_KEY`
* `STRIPE_WEBHOOK_SECRET`
If you need a walkthrough for adding secrets, click the walkthrough button and follow the instructions.
### How to get your `STRIPE_SECRET_KEY`
1. Visit [dashboard.stripe.com](https://dashboard.stripe.com/)
2. Click on the **Developers** menu in the bottom left corner
3. Click on the **API keys** option third from the bottom
4. There you will be able to create a new "Secret key" by clicking the **Create secret key** button
5. Copy the **Secret key** and paste it into the `STRIPE_SECRET_KEY` field in your Mocha app. The secret key should begin with the letters `sk_live_`.
Make sure it is the secret key, and not the publishable key. The publishable key starts with the letters `pk_live_` while the secret key starts with the letters `sk_live_`
## Configuring Webhooks
This is the most involved piece of the setup. You will be asked to provide a webhook secret but you must first look for the webhook URL in your Mocha app. In order for Stripe to access your webhook URL, you will need to publish your app to the public internet.
### Publish your app first
Pro plans will be able to publish their app to a custom subdomain. I've named mine `workshopstudio.mocha.app`. If you are on a free plan, your app will be published to a random `.mocha.app` subdomain. Pay attention to what your URL is, because we will be using it to set up our webhook in Stripe.
### Finding the webhook URL
Now go back to the Mocha chat log and find the part that mentions the webhook endpoint. It will look something like this:
Notice how the Mocha AI agent mentions the `/api/webhooks/stripe` endpoint. This is the URL that Stripe will use to send webhooks to your app.
Now take the published URL of your app and add the `/api/webhooks/stripe` endpoint to it. For example, if your app is published to `https://workshopstudio.mocha.app`, the full URL will be `https://workshopstudio.mocha.app/api/webhooks/stripe`. This is the URL that we will be using to set up our webhook in Stripe.
### Setting up the webhook in Stripe
In the Stripe Dashboard:
1. Go to **Developers â Webhooks**
2. Click **Add destination**
3. Select events: In my example, the Mocha AI agent wanted me to listen for `checkout.session.completed` events. You can listen for other events as well, but for this example, we will be using `checkout.session.completed`.
4. Set the endpoint URL to your Mocha app's webhook route (in my example, it is `https://workshopstudio.mocha.app/api/webhooks/stripe`)
5. Copy the **Signing secret** and paste it into the `STRIPE_WEBHOOK_SECRET` field in your Mocha app.
The webhook signing secret should begin with the letters `whsec_`.
## Testing Payments
Once you've set everything up correctly, payments should start appearing in your Stripe account from your Mocha app. Test this by using your live published Mocha app and sending payments to your Stripe account.
## Wrapping up
In this guide, we walked through the process of setting up a Mocha app that accepts payments through Stripe. We covered:
* Crafting a strong initial prompt
* Setting up Stripe API keys
* Configuring webhooks for payment confirmation
Stripe does deduct a small fee from each payment. This amounts to roughly 2.9% + \$0.30 per transaction but this may vary depending on your country and the type of payment method used.
You can see the full source code for the app we built in this guide by cloning the app in the [Workshop Payments Example App](https://workshopstudio.mocha.app/) at [https://workshopstudio.mocha.app](https://workshopstudio.mocha.app)
# Generating Images
Source: https://docs.getmocha.com/integrations/generating-images
How to integrate image generation features using Gemini Nano Banana Pro
In this how-to guide, we are going to step through the process of setting up a Mocha app that has image generation capabilities using Google's Gemini API. You'll learn how to create an app that generates professional product mockups, logos, or any other images from text descriptions.
This is a powerful feature that can greatly enhance your app's functionality. Using Gemini's image generation API, we're going to set up a practical app that generates product mockups for entrepreneurs and marketers to use in their pitch decks and marketing materials.
## What is Nano Banana Pro?
Google's Gemini API provides powerful image generation capabilities through models like Gemini 2.5 Flash (Nano Banana) and Gemini 3 Pro Preview (Nano Banana Pro). These models can generate high-quality, photorealistic images from text descriptions, making them perfect for:
* **Product mockups**: Create professional product shots for e-commerce and marketing
* **Logo design**: Generate logos with accurate text rendering
* **Commercial photography**: Studio-lit product photographs
* **Conceptual artwork**: Visualize ideas and concepts
Gemini image generation supports text-to-image, image editing, and multi-image composition. All generated images include SynthID watermarks for authenticity tracking.
For more information, visit [ai.google.dev](https://ai.google.dev/gemini-api/docs/image-generation).
## Starting with the Right Prompt
The initial prompt you give Mocha is crucial for getting your project started on the right track. When building an app that uses image generation, you need to be specific about:
* **What types of images you want to generate**: Clearly describe the image types and use cases
* **How the images should be used**: Explain how generated images fit into your app's functionality
* **Key features**: List the main features you want, including image storage, download capabilities, and style options
* **Technical requirements**: Mention any specific models or services you want to use (like Gemini Nano Banana Pro)
* **Design preferences**: Describe the UI/UX style you're aiming for
Here's the example prompt used to build the mockup generator app:
```
Create a product mockup generator app for entrepreneurs and marketers.
I want to describe a product idea and get professional-looking mockup images I can use in pitch decks and marketing materials.
Features needed:
- Text input where I describe my product (what it is, style preferences, setting/context)
- Generate multiple mockup variations from a single description
- Choose from different mockup styles (minimalist, lifestyle, studio shot, in-context)
- Save generated images to a gallery
- Download images in high resolution
- Ability to regenerate or refine with additional instructions
Use Gemini Nano Banana Pro for image generation. The UI should feel premium and professional since this is a tool for business users creating presentation materials.
```
Notice how this prompt includes:
* A clear description of the app's purpose and target users
* Specific features broken down into bullet points
* Technical requirements (Gemini Nano Banana Pro)
* Design preferences (premium and professional UI)
* Use case context (pitch decks and marketing materials)
This level of detail helps Mocha understand exactly what you're building and sets a solid foundation for the rest of the development process.
This example will show you how to get the image generation technology working and how to troubleshoot common issues that may arise during setup.
## Setting up the Gemini API Key
During the build, you should see a prompt to add a secret for the Gemini API Key. Click the walkthrough button if you need guidance on how to add this key.
To get your API key:
1. Visit [aistudio.google.com/app/apikey](https://aistudio.google.com/app/apikey)
2. Sign in with your Google account
3. Click "Create API Key" to generate a new key
4. Copy the API key
Paste this API key into the secret field in your Mocha app. The app will store it securely and use it to make requests to the Gemini API.
## Enabling Billing for Image Generation
**Important**: Unlike some other APIs, Gemini's image generation features require a billing account to be linked to your API key, even for free tier usage. After adding your API key, you may encounter quota errors when trying to generate images.
If you see an error indicating that the quota limit has been exceeded or that the API key doesn't have access to image generation, you'll need to enable billing:
1. Go to [ai.google.dev/usage](https://ai.google.dev/usage) to check your API usage and billing status
2. Link a billing account to your Google Cloud project (even if you stay within free tier limits)
3. Ensure your API key has access to the image generation models
Once your billing account is connected, image generation should work properly. You can still stay within the free tier limits, but having billing enabled is required for the feature to function.
## Testing Image Generation
Wait until the app finishes building its initial version. This may take several minutes to complete the first loop of implementations. When done, test it out by generating your first image with a descriptive prompt.
Try a prompt like:
```
A minimalist ceramic coffee mug on a clean white background with soft studio lighting. The mug has a modern design with subtle texture. Professional product photography style.
```
The app should generate a high-quality mockup image that you can view, save, and download.
## Debugging Image Generation Issues
If you encounter issues with image generation, here are common problems and solutions:
### Issue: Images not displaying correctly
You may find that generated images show as broken or display "invalid data". This usually indicates that the image data isn't being extracted correctly from the API response.
Ok I tried again after connecting my billing account and the image that it
generates has \
and the image
shows invalid data as a label, downloading it resulted in a "check internet
connection" in my downloads. Please make sure the image is correctly rendered
from the API. Add console logs to help with the debug process.
The AI can help debug these issues by:
1. Adding console logging to inspect the API response structure
2. Checking how the image data is extracted from the response
3. Verifying the base64 encoding and data URI formatting
I've added extensive logging to debug the image generation process. The logs
will show the full API response structure and help identify where the image
data is getting lost. Try generating another mockup and I'll be able to see
exactly what the API is returning.
Open the logs in the Mocha interface by pressing â B (or Ctrl + B on Windows) to see what the API is returning and help diagnose the issue.
### Issue: Quota exceeded errors
If you see quota errors, check:
1. Your billing account is properly linked (as mentioned above)
2. You haven't exceeded the free tier limits at [ai.google.dev/usage](https://ai.google.dev/usage)
3. Your API key has the correct permissions enabled
The app should display helpful error messages when quota issues occur, making it easier to diagnose what's wrong.
### Issue: Wrong model being used
You may need to specify which Gemini model to use. The chat log shows switching from `gemini-2.5-flash-preview-image` to `gemini-3-pro-image-preview` (also known as Nano Banana Pro) for better quality results.
Let's use the gemini-3-pro-image-preview model for image generation instead of
the current one.
Make sure your app is configured to use the model that best fits your needs. Nano Banana Pro generally provides higher quality images, while the Flash model is faster.
## Wrapping up
In this guide, we walked through the process of setting up a Mocha app that has image generation capabilities using Google's Gemini API. We covered:
* How to craft an effective initial prompt
* Setting up the Gemini API key
* The importance of enabling billing (even for free tier)
* Debugging common image generation issues
We hope this guide has been helpful in getting you started with image generation in Mocha.
You can see the full source code for the app we built in this guide by visiting the [MockupForge Example App](https://mockupgen.mocha.app/) at [https://mockupgen.mocha.app](https://mockupgen.mocha.app)
# Scraping Data
Source: https://docs.getmocha.com/integrations/scraping-data
How to curate data from online sources using Firecrawl's web crawling services
In this how-to guide, we are going to step through the process of setting up a Mocha app that has web crawling capabilities for you to scrape data from the web and take actions based on those web crawls.
This is a high leverage piece of functionality that can greatly increase the utility of your app. Using Firecrawl, we're going to set up a small pragmatic app that tracks the prices of products found online at stores like Amazon, Walmart, Target, etc.
## What is Firecrawl
Firecrawl is a powerful web scraping service that turns websites into LLM-ready data. It's an open-source platform designed to help developers extract clean, structured data from any website, including JavaScript-heavy and protected pages.
Firecrawl provides several core capabilities:
* **Scrape**: Extract data from individual web pages in formats like Markdown, JSON, or screenshots
* **Crawl**: Automatically discover and scrape all pages on a website
* **Search**: Search the web and get full content from results
* **Map**: Get a comprehensive view of a website's structure
Built with developers in mind, Firecrawl is fast, reliable, and handles the complexities of modern web scrapingâno proxy management or browser automation needed. It covers 96% of the web and delivers results quickly, making it perfect for powering AI applications and real-time data needs.
For more information, visit [firecrawl.dev](https://www.firecrawl.dev/).
## Starting with the Right Prompt
The initial prompt you give Mocha is crucial for getting your project started on the right track. When building an app that uses web scraping, you need to be specific about:
* **What data you want to collect**: Clearly describe what information you need from websites
* **How the data should be used**: Explain how the scraped data fits into your app's functionality
* **Key features**: List the main features you want, including any data storage or display requirements
* **Technical requirements**: Mention any specific services or tools you want to use (like Firecrawl)
Here's the example prompt used to build the competitor price tracker app:
```
Build me a competitor price tracker app.
I want to be able to add products I'm interested in tracking by pasting URLs from different shopping websites (Amazon, Walmart, Target, etc.). The app should scrape the current price from each URL and store it.
Features needed:
- Add a product by pasting a URL and giving it a name
- Display a list of all my tracked products with their current prices
- Show price history over time (when did the price change?)
- Highlight when a price drops below a threshold I set
- Ability to manually refresh prices or have them update on a schedule
Use FireCrawl for the web scraping. Keep the UI clean and simple â I want to see my products and prices at a glance.
```
Notice how this prompt includes:
* A clear description of the app's purpose
* Specific features broken down into bullet points
* Technical requirements (Firecrawl)
* Design preferences (clean and simple UI)
This level of detail helps Mocha understand exactly what you're building and sets a solid foundation for the rest of the development process.
This example will show you how to get the web crawling technology working and how to debug the outputs of that scrape so that the data is what you want and can be used for your app in its intended way.
## Setting up the Firecrawl API Key
During the build, you should be able to see a prompt to add a secret for the Firecrawl API Key. If you need a walkthrough for how to add this key, click the walkthrough button and follow the instructions.
By following the steps in the window that opens, you will be able to find your API key after logging in when you arrive at the Firecrawl dashboard.
Copy and paste this API key into the secret field in the Mocha app.
Once you've set up the Firecrawl API key, the app will be able to use it to fetch web data from different addresses that you provide to the app.
Wait until the app is finished building its initial version. This may take several minutes to finish the first loop of implementations. When done, test it out by adding a product and seeing if the app can scrape the price from the product page.
## Debugging the Data Crawler
You may find that the data you get from the web crawl doesn't match what you expected. This is because the web page is not structured in a way that is easy for the AI to understand. This is the point in the build where you need to debug the data being fetched from the web, and work with the AI to get the data you want.
Make direct and specific descriptions of what you are doing, what you should be seeing, and what you're actually seeing instead. Act as a quality assurance engineer, or a data detective, to help Mocha get to the bottom of the issue.
I just added a product to the app. The NVIDIA GeForce RTX 5080 which is on
sale for 1399.97 on amazon using the link [https://a.co/d/bDfMS1a](https://a.co/d/bDfMS1a) and yet, when
the product was added to the app, the price that was recognized was incorrect.
The app is currently showing 169.99 as the price of the product, even though
the price from amazon was 1399.97. Please debug the price discrepancy when
fetching the price so that we see the correct pricing when items are added to
the app.
In this example, we were seeing the wrong price getting populated into the app, so we asked the agent about it and the AI tries to fix the problem by creating its own solution:
I've updated the price scraping logic with two improvements:
1. **Better detection**: Now looks for specific price labels like "Price:", "Product Price:", "Total:", etc. that Amazon and other retailers use
2. **Fallback strategy**: If no labeled price is found, it takes the highest price on the page (the main product is usually the most expensive item, not accessories or related products)
3. **Debug logging**: Added console logs to help diagnose future issues
Debug logging: Added console logs to help diagnose future issues
Try adding the product again and it should capture the correct \$1399.97 price. The logs will show all prices found and which one was selected.
But this solution does not work. After testing it, the price is still incorrect. So I need to debug the problem further.
The total price it is finding now is actually \$2,198.96 because it is finding
the "Price:" pattern from the "Total price:" wording present in the
"Frequently Bought Together" section, which adds up 3 items frequently bought
together for a total price to display. We need to nail down the amazon price
scraping feature because amazon is going to be the most common price tracking
source that gets added to this app. We are able to see the actual price of the
item in several places on the page, but I need to know what the response from
Firecrawl looks like so that I can consistently identify the correct price
from the response. A simple pattern matching might work but we have to make
sure it is the correct pattern. I do not see anything in the console when I do
a refresh of the price, which is what I'm using to see the updated price of
the item that I added. Maybe we can add a console log to the refresh action so
that whenever a price is refreshed, we can see what we're dealing with in the
Firecrawl response.
The AI will often try to use the console logs to help debug the problem. If it doesn't do so, you can explicitly request this option to help with the process. Open the logs in the Mocha interface by pressing â B (or Ctrl + B on Windows). There you will see the logs that the AI is producing to help you with the fix.
All prices found: \[
169.99, 16.99, 5000, 1399.97, 1399.97,
1399.97, 1399.97, 1399.97, 1399.97, 169.99,
16.99, 169.99, 16.99, 5000, 16.99,
5000, 16.99, 5000, 1377.77, 1377.77,
1399.97, 1399.97, 1399.97, 1399.97, 1399.97,
469, 469, 329.99, 329.99, 2198.96,
2198.96, 1199.99, 1199.99, 999.97, 999.97,
1359, 1359, 1299.99, 1299.99, 349,
349, 1409.99, 1409.99, 999.9, 999.9,
1249.9, 1249.9, 8.99, 8.99, 1799,
1799, 21.99, 21.99, 2758.99, 2758.99
]
Here's the list of all prices found. Look at how frequently the correct price of 1399.97 appears in there? I think we can use the most frequently appearing price as the price instead of the pattern matching that we're using today, at least that's what it looks like will work for amazon links.
After finding the logs that the AI was producing, we were able to find a useful heuristic when identifying the correct price from an Amazon product page. We were able to notice that the correct price of the item was the one that showed up the most frequently in the list of prices found in the scrape response.
After implementing this method for finding the price of the item, we were able to get accurate pricing for items listed on Amazon, Target, and BestBuy. **BUT** not for Walmart.
Walmart had its own price scraping logic.
All prices found: \[
1659.99, 85, 1399.97,
59, 77, 1399.97,
1262.98, 1262, 1262.98,
150, 1262.98, 1262,
1262.98
]
Walmart link detected - using first price: \$1659.99
Extracted price: 1659.99
Walmart needed its own price scraping logic, because the most frequently appearing price wasn't the one that was being displayed for the product. Walmart product pages have a unique structure which repeatedly lists related products multiple times throughout the page, but only show the actual price of the product once at the top of the page.
After realizing this feature of the Walmart links, we needed to add a new rule to the price scraping logic that is exclusively going to be applied for Walmart product pages.
I'll update the price extraction to use different strategies based on the source. Walmart links will use the first price found, while Amazon and others will continue using the frequency-based approach.
Updated the price extraction logic. Now:
* **Walmart links use the first price found (\$1,659.99)**
* **Amazon and other sites use frequency analysis (most common price)**
After implementing this new rule, we were able to get accurate pricing for items listed on Walmart, as well as Amazon, Target, and BestBuy. It isn't perfect, and you're going to need to keep debugging for your specific use cases...
But that's the beauty of Mocha. You can keep debugging and iterating on the scraping logic in your app until it is perfect for your specific use case.
## Wrapping up
In this guide, we walked through the process of setting up a Mocha app that has web crawling capabilities for you to scrape data from the web and take actions based on those web crawls.
We also walked through the process of debugging the data crawler and getting the data you want.
We hope this guide has been helpful in getting you started with web scraping in Mocha.
You will be able to see the full source code for the app that we built in this guide by cloning the app in the [Firecrawl Example App](https://pricetracker.mocha.app/) located at [https://pricetracker.mocha.app](https://pricetracker.mocha.app)
# Using Voice AI
Source: https://docs.getmocha.com/integrations/using-voice-ai
How to generate realistic voice from text using ElevenLabs text-to-speech models
In this how-to guide, we are going to step through the process of setting up a Mocha app that generates podcast-style audio narrations using ElevenLabs text-to-speech models.
We'll build a blog-to-podcast converter that accepts a URL or raw text, lets users choose a voice style, previews the script, generates audio, and provides playback and downloads with a history of past runs.
## What is ElevenLabs?
ElevenLabs is a speech synthesis platform that offers high-quality, natural-sounding voices with configurable styles. It supports text-to-speech with multiple voices, making it a great fit for podcast narration, voiceovers, and audio content generation.
For more information, visit [elevenlabs.io](https://elevenlabs.io/).
## Starting with the Right Prompt
The initial prompt you give Mocha is crucial for getting your project started on the right track. When building an app that uses voice generation, you need to be specific about:
* **What text sources you accept**: URLs, pasted text, or both
* **Voice controls**: Styles, tone, and any voice options you want available
* **Audio output**: Playback, download format, and storage
* **UX expectations**: Progress indicators, previews, and history
* **Technical requirements**: The voice API you want to use (ElevenLabs)
Here's the example prompt used to build the blog-to-podcast converter:
```
Build a blog-to-podcast converter app.
I want to paste a blog post or article URL (or paste the text directly) and get back a podcast-style audio narration that I can download and publish.
Features needed:
- Input field for URL or raw text
- Option to select different voice styles (professional, casual, energetic, calm)
- Preview the text before generating audio
- Generate the audio narration using ElevenLabs
- Audio player to listen to the result
- Download button for the MP3 file
- History of previously generated podcasts
The UI should be straightforward â paste content, pick a voice, generate, download. Show a progress indicator while the audio is being generated since it might take a moment.
```
Notice how this prompt includes:
* A clear description of the app's purpose and user flow
* Specific features broken down into bullet points
* Technical requirements (ElevenLabs)
* UX expectations (progress indicator, simple flow)
This level of detail helps Mocha understand exactly what you're building and sets a solid foundation for the rest of the development process.
## Setting up the ElevenLabs API Key
During the build, you should see a prompt to add a secret for the ElevenLabs API key.
To get your `ELEVENLABS_API_KEY` key:
1. Visit [elevenlabs.io/app](https://elevenlabs.io/app)
2. Sign in or create an account
3. Open **Developers** and navigate to the **API keys** section.
4. Create a new API key by clicking the **Create API key** button.
5. We will be using the **Text to Speech** API key. It is more secure to restrict the key to only the features we will use.
Paste the key into the secret field in your Mocha app.
## Testing Voice Generation
Let's try the voice generation on a Mocha blog post: [Alternative Presentation Tools (PowerPoint)](https://blog.getmocha.com/alternative-presentation-tools-powerpoint/).
Clicking the "Extract" button is working perfectly. All of the blog's text got extracted from the URL. Now let's try to generate the podcast audio.
Looks like there is an issue with the app. Let's try to debug what went wrong.
## Debugging Voice Generation Issues
The first thing I'll do is explain to the AI exactly what I am doing and what I'm seeing. I try to give as much detail as possible. I also open the logs to see what is going on in the console.
I used the URL of the article to create the podcast. Using the blogpost located here: [https://blog.getmocha.com/alternative-presentation-tools-powerpoint/](https://blog.getmocha.com/alternative-presentation-tools-powerpoint/)
I was able to successfully extract the text perfectly, but when I clicked on the generate button with the default "professional" setting, I saw the error: Failed to generate audio and then I looked at the console and the server responded with a 500 from the API.
Please check if there is anything wrong with the code and fix any issues you find.
I send this message to Mocha and it starts to figure out what is going on. Unfortunately, during the testing phase of the build, we got flagged by the ElevenLabs API and we are not able to generate audio.
This usually happens when trying to generate audio from large amounts of text using the free tier of the ElevenLabs API. What we recommend when this happens is to upgrade to the paid tier if you need to generate audio from large amounts of text.
Their starter plan is only \$5 a month, and it gets us past this limit. As soon as I upgraded to the paid tier, we were able to generate all of the audio from this 26000+ character blog post successfully.
## Wrapping up
In this guide, we walked through the process of setting up a Mocha app that generates podcast-style audio narrations using ElevenLabs text-to-speech models. We covered:
* How to craft an effective initial prompt
* Setting up the ElevenLabs API key
* Debugging common voice generation issues
We hope this guide has been helpful in getting you started with voice generation in Mocha.
You can see the full source code for the app we built in this guide by visiting the [Podcasters Example App](https://podcasters.mocha.app/) at [https://podcasters.mocha.app](https://podcasters.mocha.app)
# Welcome
Source: https://docs.getmocha.com/welcome
Build beautiful and custom websites in minutes. No coding required.
**Mocha is shutting down on August 1, 2026.** Read the [shutdown announcement](https://getmocha.com/blog/mocha-shutdown) to learn how to migrate or export your apps.
## What is Mocha?
**Mocha** is an AI-powered app builder that allows you to create beautiful, custom websites using natural language.
You simply describe what you want in plain English (or your native language), and Mocha will generate it custom-tailored to your request. You can then keep making changes, improving it, adding features until it's ready to launch. Finally you can deploy it in one-click and share it with the world.
Mocha is different than traditional no-code website builders like Wix, Squarespace, and Webflow. It's powered by AI and actually writes code, which means the possibilities are endless, rather than using templates and having to learn a complicated interface.
Mocha is different than other AI powered website builders like lovable because it is fully integrated. It comes with built-in auth, database, backend, hosting. Because we vertically integrated it, it works better and is more reliable, you also don't need to connect and pay for multiple other services for auth, database, backend, hosting, etc.
Our design philosophy is that Mocha should be the single tool for you to build, launch, deploy and manage your app.
**Take a sip of coffee, and let Mocha wake up your ideas.** â
## Quick Start
Learn the basics of Mocha and how to build your first website.
Step by step guide to get started with Mocha going over key features.
Tips and tricks for getting the most out of Mocha.
Learn how to deploy your website to the public.