| layout | default |
|---|---|
| title | Chapter 7: Deployment and Distribution |
| nav_order | 7 |
| parent | Bolt.diy Tutorial |
Welcome to Chapter 7: Deployment and Distribution. In this part of bolt.diy Tutorial: Build and Operate an Open Source AI App Builder, you will build an intuitive mental model first, then move into concrete implementation details and practical production tradeoffs.
bolt.diy supports multiple delivery targets. This chapter helps you select the right one for your audience, constraints, and operational maturity.
Project documentation and scripts indicate support for:
- web deployment paths (for example Vercel, Netlify, GitHub Pages style workflows)
- containerized self-hosted runtime
- desktop distribution via Electron build flow
| Target | Best For | Strengths | Tradeoffs |
|---|---|---|---|
| managed web hosting | internal demos and broad access | fastest sharing and iteration | tighter platform/runtime constraints |
| self-hosted Docker | security-conscious teams | runtime control and network policy alignment | higher ops overhead |
| desktop (Electron) | local-first users | local environment and offline-friendly workflows | update and packaging complexity |
Before shipping any target:
- pin provider defaults and fallbacks
- enforce environment-specific secret injection
- run smoke tests for generation + diff + validation loop
- document rollback command path
Use explicit config partitions:
dev: broad experimentation, low blast radiusstage: production-like configuration for final validationprod: locked policies, guarded credentials, audit logging
Never reuse dev credentials in production.
A container baseline reduces machine drift and supports policy controls:
- versioned image build
- fixed runtime dependencies
- predictable startup scripts
- easier infra handoff to platform teams
- image pinned by digest/tag
- runtime env vars validated at startup
- health endpoint or smoke check available
- logs exported to central collector
Choose this when onboarding speed matters most.
Minimum controls:
- CI-gated deployment
- secret configuration in hosting platform
- environment-specific base URLs and provider settings
- rollback to prior release artifact
Electron workflows are useful for local-first operator experience.
Controls to add:
- signed artifact strategy where applicable
- update channel policy (stable/beta)
- runtime permission and secure storage review
- crash and telemetry visibility (privacy-aware)
1) Cut release branch
2) Run docs + tests + smoke checks
3) Build target artifact (web/container/desktop)
4) Deploy to stage
5) Validate task loop end-to-end
6) Promote to production
7) Monitor for regressions and rollback triggers
For each target, define rollback before first production launch:
- web: previous deployment alias
- container: previous image tag + config set
- desktop: prior stable version and update channel fallback
You now have a deployment framework that aligns target choice with:
- team maturity
- compliance and control needs
- operational cost and complexity
Next: Chapter 8: Production Operations
The LogEntry interface in app/utils/debugLogger.ts handles a key part of this chapter's functionality:
systemInfo: SystemInfo;
appInfo: AppInfo;
logs: LogEntry[];
errors: ErrorEntry[];
networkRequests: NetworkEntry[];
performance: PerformanceEntry;
state: StateEntry;
userActions: UserActionEntry[];
terminalLogs: TerminalEntry[];
}
export interface SystemInfo {
platform: string;
userAgent: string;
screenResolution: string;
viewportSize: string;
isMobile: boolean;
timezone: string;
language: string;
cookiesEnabled: boolean;
localStorageEnabled: boolean;
sessionStorageEnabled: boolean;
}
export interface AppInfo {
version: string;
buildTime: string;
currentModel: string;
currentProvider: string;
projectType: string;
workbenchView: string;
hasActivePreview: boolean;This interface is important because it defines how bolt.diy Tutorial: Build and Operate an Open Source AI App Builder implements the patterns covered in this chapter.
The ErrorEntry interface in app/utils/debugLogger.ts handles a key part of this chapter's functionality:
appInfo: AppInfo;
logs: LogEntry[];
errors: ErrorEntry[];
networkRequests: NetworkEntry[];
performance: PerformanceEntry;
state: StateEntry;
userActions: UserActionEntry[];
terminalLogs: TerminalEntry[];
}
export interface SystemInfo {
platform: string;
userAgent: string;
screenResolution: string;
viewportSize: string;
isMobile: boolean;
timezone: string;
language: string;
cookiesEnabled: boolean;
localStorageEnabled: boolean;
sessionStorageEnabled: boolean;
}
export interface AppInfo {
version: string;
buildTime: string;
currentModel: string;
currentProvider: string;
projectType: string;
workbenchView: string;
hasActivePreview: boolean;
unsavedFiles: number;This interface is important because it defines how bolt.diy Tutorial: Build and Operate an Open Source AI App Builder implements the patterns covered in this chapter.
The NetworkEntry interface in app/utils/debugLogger.ts handles a key part of this chapter's functionality:
logs: LogEntry[];
errors: ErrorEntry[];
networkRequests: NetworkEntry[];
performance: PerformanceEntry;
state: StateEntry;
userActions: UserActionEntry[];
terminalLogs: TerminalEntry[];
}
export interface SystemInfo {
platform: string;
userAgent: string;
screenResolution: string;
viewportSize: string;
isMobile: boolean;
timezone: string;
language: string;
cookiesEnabled: boolean;
localStorageEnabled: boolean;
sessionStorageEnabled: boolean;
}
export interface AppInfo {
version: string;
buildTime: string;
currentModel: string;
currentProvider: string;
projectType: string;
workbenchView: string;
hasActivePreview: boolean;
unsavedFiles: number;
workbenchState?: {This interface is important because it defines how bolt.diy Tutorial: Build and Operate an Open Source AI App Builder implements the patterns covered in this chapter.
The PerformanceEntry interface in app/utils/debugLogger.ts handles a key part of this chapter's functionality:
errors: ErrorEntry[];
networkRequests: NetworkEntry[];
performance: PerformanceEntry;
state: StateEntry;
userActions: UserActionEntry[];
terminalLogs: TerminalEntry[];
}
export interface SystemInfo {
platform: string;
userAgent: string;
screenResolution: string;
viewportSize: string;
isMobile: boolean;
timezone: string;
language: string;
cookiesEnabled: boolean;
localStorageEnabled: boolean;
sessionStorageEnabled: boolean;
}
export interface AppInfo {
version: string;
buildTime: string;
currentModel: string;
currentProvider: string;
projectType: string;
workbenchView: string;
hasActivePreview: boolean;
unsavedFiles: number;
workbenchState?: {
currentView: string;This interface is important because it defines how bolt.diy Tutorial: Build and Operate an Open Source AI App Builder implements the patterns covered in this chapter.
flowchart TD
A[LogEntry]
B[ErrorEntry]
C[NetworkEntry]
D[PerformanceEntry]
E[StateEntry]
A --> B
B --> C
C --> D
D --> E