Skip to content
Back to the app

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 ​

bash
# Install dependencies
npm install

# Start the Expo dev server (web mode)
npx expo start --web

# App opens at http://localhost:8081

Production Build ​

bash
# Build the web bundle (outputs to dist/)
npx expo export --platform web

# Preview the production build locally
npx serve dist

The 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 ​

bash
# Install Vercel CLI
npm install -g vercel

# Deploy
vercel --prod

Or connect your GitHub repository to Vercel for automatic deployments on every push to main.


Deploying to Netlify ​

bash
# Install Netlify CLI
npm install -g netlify-cli

# Build and deploy
netlify deploy --prod --dir=dist

Add a netlify.toml for SPA routing (Expo Router uses client-side routing):

toml
[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

Environment Variables for Web ​

The web build reads environment variables prefixed with EXPO_PUBLIC_ at build time:

bash
EXPO_PUBLIC_API_URL=https://api.yourco.com \
EXPO_PUBLIC_GOOGLE_CLIENT_ID=your-google-client-id \
npx expo export --platform web

Set 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.


What's Next? ​

Served from this deployment. No page view leaves it.