Deployment
This guide covers deploying all parts of your stack: mobile app, web app, and backend.
Mobile App
We use EAS Build (Expo Application Services) for building and deploying your mobile app.
Prerequisites
- Install EAS CLI:
npm install -g eas-cli - Log in to your Expo account:
eas login
Building
To build your app for production:
eas build --profile productionSubmitting
To submit your app to the stores:
eas submit --profile productionWeb App
The web app is a standard Next.js application that can be deployed to any hosting platform that supports Node.js or static exports.
Vercel (Recommended)
Vercel is the easiest option for Next.js apps:
# Install Vercel CLI
npm install -g vercel
# Deploy
vercel deployOr connect your Git repository for automatic deployments.
Netlify
For Netlify deployment, add the Next.js plugin:
[[plugins]]
package = "@netlify/plugin-nextjs"SSR Required
Next.js App Router uses Server Components. Do not configure Netlify for static file serving or SPA-style redirects.
Docker
Build and run the web app in a container:
# Build the image
docker build -t my-app-web ./web
# Run the container
docker run -p 3000:3000 my-app-webNode.js Hosting
For any Node.js hosting (Railway, Render, AWS, etc.):
cd web
bun run build
bun startProduction Environment Variables
Update environment variables for production:
NEXT_PUBLIC_APP_URL=https://yourdomain.com
BACKEND_URL=https://api.yourdomain.comBackend
The backend can be deployed to any Node.js hosting platform.
Recommended Platforms
- Railway - Simple Git-based deployments
- Render - Free tier available
- Heroku - Classic PaaS option
- AWS/GCP/Azure - Enterprise-grade
- Your own VPS - Full control
Configuration
Configure environment variables from .env.example:
DATABASE_URL="postgresql://user:password@host:5432/mydb"
REDIS_URL="redis://host:6379"
CORS_ORIGINS="https://yourdomain.com,https://www.yourdomain.com"
JWT_SECRET="your-production-secret"CORS Configuration
Make sure CORS_ORIGINS includes all your frontend URLs (both web and any mobile deep link origins).