Docker & Server Deployment
Relevant source files
The following files were used as context for generating this wiki page:
The Driveway Estimator Pro deployment architecture is designed for a cross-platform environment, supporting a web application and native mobile clients (iOS and Android). The backend is a Node.js Express server utilizing tRPC for type-safe communication, while the frontend is built with React 19. Production deployment for the web environment utilizes Manus built-in hosting, while mobile distribution is handled via Capacitor for native wrapping.
Sources: README.md:33-51, MOBILE_BUILD.md:1-5
Infrastructure & Environment Overview
The system architecture follows a traditional client-server model with additional cloud services for AI and storage. The backend connects to a MySQL/TiDB database using Drizzle ORM and utilizes S3 for persistent image storage.
High-Level Deployment Architecture
The following diagram illustrates the relationship between the deployment targets and the central backend infrastructure.
The diagram shows how various client platforms interact with the central Express server and its associated storage and AI services.
Sources: README.md:46-63, todo.md:12-22
Web Server Deployment
The web application is deployed using Manus built-in hosting. The project structure contains both a standalone client and a Next.js version for specific deployment scenarios.
Server Configuration
The Express server initializes the database connection lazily to allow local tooling to run without an active database connection. It relies on a DATABASE_URL environment variable to connect to the MySQL/TiDB instance.
// server/db.ts:14-22
export async function getDb() {
if (!_db && process.env.DATABASE_URL) {
try {
_db = drizzle(process.env.DATABASE_URL);
} catch (error) {
console.warn("[Database] Failed to connect:", error);
_db = null;
}
}
return _db;
}
Sources: server/db.ts:14-22, README.md:154-155
Build Scripts
The application uses pnpm for package management. Standard deployment scripts are provided in the package configuration.
| Script | Command | Purpose |
|---|---|---|
dev | next dev | Local development server |
build | next build | Production build for web assets |
start | next start | Start the production server |
Sources: easy-asphalt/package.json:5-9, README.md:118-121
Mobile Deployment (Capacitor)
Mobile deployment utilizes Capacitor to wrap the React web assets into native iOS and Android projects. This requires a two-step process: building the web assets and syncing them to the native platforms.
Native Build Workflow
The native build process requires platform-specific tools: Xcode for iOS and Android Studio for Android.
This flow represents the transition from web source code to native distributable packages.
Sources: MOBILE_BUILD.md:42-80
Native Requirements & Distribution
| Platform | Requirements | Distribution Method |
|---|---|---|
| iOS | Xcode 14+, macOS, CocoaPods | TestFlight, Ad Hoc, App Store |
| Android | Android Studio, JDK 11+, SDK 28+ | APK Sideloading, Google Play Console |
Sources: MOBILE_BUILD.md:8-18, MOBILE_BUILD.md:86-103
Environment Configuration
Production readiness requires the configuration of several critical environment variables across database, authentication, and external API categories.
| Variable | Description | Source |
|---|---|---|
DATABASE_URL | MySQL/TiDB connection string | README.md:183 |
JWT_SECRET | Secret key for token signing | README.md:186 |
VITE_APP_ID | OAuth application identifier | README.md:187 |
BUILT_IN_FORGE_API_KEY | API key for AI services | README.md:191 |
S3_STORAGE | Mentioned as required for photo processing | todo.md:52 |
Sources: README.md:181-205, todo.md:52
Deployment & Production Readiness Checklist
Based on the project roadmap, the following steps are required for a successful production deployment:
- Database Migrations: Create and apply Drizzle migrations to the production TiDB/MySQL instance.
- Service Integration: Replace mock services (Pricing, Email) with real production providers like SendGrid or AWS SES.
- Permissions Configuration: Ensure
Info.plist(iOS) andAndroidManifest.xml(Android) have the correctNSCameraUsageDescriptionandACCESS_FINE_LOCATIONpermissions. - Static Assets: Ensure S3 buckets are configured for public-read access for shared project photos.
Sources: todo.md:3-10, todo.md:61-70, MOBILE_BUILD.md:118-132
The deployment of Driveway Estimator Pro is centralized around a Node.js backend that serves both a modern React web interface and native mobile shells. By leveraging Capacitor and Manus hosting, the project maintains a single codebase while targeting multiple distribution channels. Significant emphasis is placed on environment variable security and the transition from mock to production-grade third-party services.