Skip to main content
ANODIZE
All insights

Platform deployment guides

Deploy a Bolt.new App Without Carrying Prototype Risk Into Production

A framework-aware production guide for Bolt.new applications, from exporting and auditing the source through secure deployment, testing, monitoring, and recovery.

15 minute readBy Anodize Labs

This independent guide is not sponsored by or affiliated with the platform named in the title.

Bolt.new can generate and run a substantial web application in a browser-based development environment, but the preview is not a production architecture. The generated project may be a static single-page app, a server-rendered application, or a frontend connected directly to hosted services. The right deployment design depends on what the repository actually contains.

Start by making the source reproducible outside the generation session. Then review the trust boundaries: which code executes in a visitor's browser, which code runs on a server, who owns the data, and where privileged credentials are used. This prevents a polished preview from hiding direct database access, weak authorization, or an integration key embedded in the bundle.

The durable objective is a deployment that another engineer can build, observe, recover, and change without relying on chat history or a particular platform interface. The sequence below applies whether the final runtime is a static host, a serverless platform, a container service, or a combination of managed services.

/01

Export a reproducible project and identify its runtime

Sync or export the complete project into an organization-owned Git repository. From a clean clone, use the package manager indicated by the lockfile, run the production build, and start the built application. Do not silently regenerate the lockfile during deployment. Pin a supported runtime version and ensure that generated files required at runtime are either committed intentionally or produced by a documented build step.

Inspect the framework configuration and network calls before choosing a host. A static frontend cannot safely hold private credentials or execute trusted business logic. A framework with server routes or actions needs a compatible server runtime. Background workers, long-running connections, filesystem writes, and scheduled jobs may need separate infrastructure. Choose hosting from these requirements rather than from the preview's behavior.

  • Inventory public routes, API endpoints, server functions, jobs, database clients, and third-party SDKs.
  • Confirm that deep links, asset paths, and client-side routing work in the production build.
  • Record runtime, package manager, install command, build command, output, and health check in the repository.

/02

Audit generated code before connecting production accounts

Read the code paths that create users, alter data, charge money, send messages, upload files, and call AI services. Generated code often optimizes for a successful demonstration and may omit retries, permission checks, schema validation, or failure handling. Remove dependencies and routes that are no longer used, review package licenses and advisories, and replace unmaintained libraries where they sit on a critical path.

Search both source and Git history for secrets. A secret removed in the latest commit is still compromised if it was ever published or shared. Rotate it at the provider and remove it from history where appropriate. Also inspect browser bundles and network requests: environment variable naming conventions vary by framework, and values marked as public are normally visible to every user.

  • Validate untrusted input at server boundaries with explicit schemas and size limits.
  • Avoid rendering unsanitized user HTML or constructing database queries from raw input.
  • Set timeouts and bounded retries for external calls, and present useful failure states to users.

/03

Separate environments and move privilege to the server

Create separate development, preview, and production projects for the database, auth provider, storage, and other integrations. Store their values in environment-scoped deployment settings, not committed files. Include an env example file with names and documentation, and validate variables during build or server startup. Limit production access to the people and automation that need it.

Proxy privileged operations through authenticated server code. The server should derive the current user from a verified session, enforce role and resource ownership, and use private credentials only after authorization succeeds. Do not rely on a disabled control, a client route guard, or a user ID supplied in JSON. If a service supports direct browser access, configure its row, document, or object policies as though its public endpoint will be called manually, because it will be.

  • Allow only exact production origins and callback URLs rather than broad wildcards.
  • Use least-privilege credentials for each function instead of one administrator token everywhere.
  • Protect high-cost endpoints with quotas, rate limits, and abuse monitoring.

/04

Harden data changes, authentication, and asynchronous work

Represent schema changes as versioned migrations and apply them through a controlled release process. Add database constraints for invariants that must survive concurrent requests. Use transactions for related writes, idempotency for operations that may be retried, and indexes based on the production query paths. Test migrations on representative data and estimate locks or rewrite time before applying them to a busy database.

Review the complete authentication lifecycle: account creation, verification, sign-in, sign-out, expiration, password reset, invitation, account linking, and deletion. Make administrative roles explicit and auditable. For webhooks and background work, verify signatures, deduplicate events, persist job state, retry with limits, and route permanently failing work to an inspectable queue instead of dropping it silently.

  • Keep database and storage resources private unless public access is an explicit product requirement.
  • Prevent cross-account access with negative authorization tests, not only successful happy-path tests.
  • Define what happens when email, payment, AI, or data providers are slow or unavailable.

/05

Build a deployment pipeline with release evidence

Configure continuous integration to install from the lockfile and run linting, type checks, tests, and a production build. Add focused integration or end-to-end coverage for the primary workflow and high-risk boundaries. Preview deployments are valuable for review, but they should use isolated non-production data and credentials. Treat logs and build artifacts as potentially sensitive.

Promote a reviewed commit to production and attach the commit identifier to the release. Run migrations as a deliberate step and use backward-compatible changes so old and new application versions can overlap safely. Smoke-test the public domain after release, including authentication callbacks and one read and write path. For a significant change, use a limited rollout or feature flag and define the condition that will stop the launch.

  • Require human approval for production when a release includes risky schema, auth, or billing changes.
  • Keep previews from indexing in search engines or sending real customer notifications.
  • Make release checklists short, repeatable, owned, and linked to evidence.

/06

Monitor user outcomes and rehearse recovery

Capture frontend exceptions, server errors, latency, database health, job failures, and integration failures with environment and release tags. Redact authorization headers, cookies, tokens, and sensitive fields before telemetry leaves the application. Create alerts around sustained user impact, and maintain a small dashboard for sign-in success, core workflow success, error rate, and resource pressure.

Enable provider-supported database backups and point-in-time recovery, and protect uploaded files according to their value and retention needs. Test a restore into an isolated project and verify record counts and application behavior. For code, keep immutable release references and a one-command or well-documented redeployment path. For schema incidents, prefer forward-compatible repairs; know exactly when point-in-time restoration is justified and what newer writes it would discard.

  • Document recovery objectives and escalation contacts for every critical service.
  • Keep status communication separate from technical debugging during an incident.
  • Review costs and limits for compute, bandwidth, database connections, storage, email, and external APIs.

Frequently asked

Questions about this topic.

Which host should I use for a Bolt.new app?

Choose based on the exported project's runtime requirements. A static app can use static hosting, while server routes need a compatible server or serverless runtime. Jobs, persistent connections, or specialized compute may require separate services. Confirm framework support, limits, regional needs, and rollback capability before deciding.

Can environment variables hide an API key in frontend code?

No. Variables included in a browser bundle can be inspected by users regardless of the variable name or build tool. Put private keys in server-only code and expose a narrow authenticated endpoint. Only use browser keys that the provider explicitly considers public and that are constrained appropriately.

How much testing does a generated app need before launch?

Test according to risk, not code origin. At minimum, automate the core journey and authorization boundaries, run a production build in CI, and manually rehearse account recovery, integration failure, migration, deployment, and rollback. Billing, sensitive data, and multi-tenant access warrant deeper coverage.

Have a product to ship?

Need senior engineering to take the next step?

Book an intro call