Web Deployment (Expo / PWA)
CHANGENTS.AI's web app is built with Expo Router and React Native Web, rendering as a responsive PWA. Deploy it anywhere that serves static files or Node.js.
Prerequisites
- Node.js 20+
- npm 10+ or yarn
Local Development
# Install dependencies
npm install
# Start the Expo dev server (web mode)
npx expo start --web
# App opens at http://localhost:8081Production Build
# Build the web bundle (outputs to dist/)
npx expo export --platform web
# Preview the production build locally
npx serve distThe dist/ folder is a standard static site — HTML, JS, CSS, and assets. Deploy it to any static host (Vercel, Netlify, S3 + CloudFront, Nginx).
Deploying to Vercel
# Install Vercel CLI
npm install -g vercel
# Deploy
vercel --prodOr connect your GitHub repository to Vercel for automatic deployments on every push to main.
Deploying to Netlify
# Install Netlify CLI
npm install -g netlify-cli
# Build and deploy
netlify deploy --prod --dir=distAdd a netlify.toml for SPA routing (Expo Router uses client-side routing):
[[redirects]]
from = "/*"
to = "/index.html"
status = 200Environment Variables for Web
The web build reads environment variables prefixed with EXPO_PUBLIC_ at build time:
EXPO_PUBLIC_API_URL=https://api.yourco.com \
EXPO_PUBLIC_GOOGLE_CLIENT_ID=your-google-client-id \
npx expo export --platform webSet these in your CI/CD pipeline or hosting platform's environment settings.
PWA Features
The web app:
- Installable — users can add it to their home screen / taskbar
- Push notifications — on supported browsers, once the VAPID keys are set (Push Notifications). The push service worker caches nothing; the app has no offline mode
- Responsive — adapts to mobile, tablet, and desktop viewport sizes
Backend Requirement
The web frontend requires the Express backend to be running (API calls to /api/...). For web-only deployments, ensure the backend is deployed and EXPO_PUBLIC_API_URL points to it.
See Railway Deployment or Docker Deployment for deploying the backend.