Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
14c7a5c
feat: MVP collaborative movie booking (fixtures, flows, worker scaffo…
jamespheffernan Aug 13, 2025
141a705
fix(web): avoid importing native Stripe provider on web; lazy-require…
jamespheffernan Aug 13, 2025
5a54b99
feat(web): add CheckoutWeb.tsx
jamespheffernan Aug 13, 2025
c1f6c09
feat(web): add Money component used by CheckoutWeb
jamespheffernan Aug 13, 2025
af78a40
fix(server): remove Stripe apiVersion to use account default (TS type…
jamespheffernan Aug 13, 2025
a2df99a
chore: restore clean project state after file corruption
jamespheffernan Sep 3, 2025
926382b
feat(web): add Netlify configuration for Expo web deployment
jamespheffernan Sep 3, 2025
5b1454c
feat(config): configure CORS and environment variables for Netlify
jamespheffernan Sep 3, 2025
18f5d93
docs: add Netlify deployment guide and update implementation status
jamespheffernan Sep 3, 2025
d2401e6
chore: finalize web deployment implementation status
jamespheffernan Sep 3, 2025
92105da
fix: force rebuild without Stripe apiVersion
jamespheffernan Sep 5, 2025
05f85b4
fix: resolve duplicate imports and syntax errors in CheckoutWeb (#3)
jamespheffernan Sep 5, 2025
2c28654
docs: update implementation plan to reflect PR merge completion
jamespheffernan Sep 5, 2025
285176d
feat: merge MVP collaborative movie booking implementation into main
jamespheffernan Sep 5, 2025
4f0d68b
chore: regenerate package-lock.json after merge
jamespheffernan Sep 5, 2025
e9e40d0
docs: update scratchpad with merge completion and lessons learned
jamespheffernan Sep 5, 2025
a71a391
fix: update Stripe API version to 2025-07-30.basil for compatibility …
jamespheffernan Sep 5, 2025
97d47fc
docs: add lesson learned about Stripe API version compatibility
jamespheffernan Sep 5, 2025
84eb987
fix: add .js extensions to ES module imports for Node.js compatibility
jamespheffernan Sep 5, 2025
983615d
docs: add lesson about ES module import extensions requirement
jamespheffernan Sep 5, 2025
4e9a917
fix: make Redis optional for production deployment
jamespheffernan Sep 5, 2025
4242ec2
docs: update env.example to clarify Redis is optional
jamespheffernan Sep 5, 2025
579fd04
fix: configure frontend to use production API URL
jamespheffernan Sep 5, 2025
68504ed
docs: add comprehensive deployment guide
jamespheffernan Sep 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 113 additions & 0 deletions DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# SilverScreen Deployment Guide

## Current Deployments

### Frontend (Netlify)
- **URL**: Your Netlify URL (e.g., https://your-app.netlify.app)
- **Auto-deploy**: Triggered on push to `main` branch
- **Build command**: `npx expo export --platform web`
- **Environment**: Production API URL is set in `netlify.toml`

### Backend API (Render)
- **URL**: https://silverscreen-1.onrender.com
- **Auto-deploy**: Triggered on push to `main` branch
- **Service type**: Web Service
- **Build command**: `npm ci && npx playwright install chromium && npm run build`
- **Start command**: `npm start`

## Environment Variables

### Frontend (Netlify)
Set in `netlify.toml`:
```toml
EXPO_PUBLIC_API_BASE_URL = "https://silverscreen-1.onrender.com"
EXPO_PUBLIC_STRIPE_PUBLISHABLE_KEY = "pk_test_..." # Optional, for Stripe
```

### Backend (Render)
Set in Render dashboard:
```bash
# Optional - if not set, uses in-memory storage and synchronous processing
POSTGRES_URL=postgresql://...
REDIS_URL=redis://...

# Stripe (optional for test mode)
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...

# Server configuration
PORT=3001 # Render sets this automatically
LOG_LEVEL=info

# Scraping configuration
TARGET_CITY=NYC
SCRAPE_SOURCE=fixtures # Use 'live' for real scraping
```

## Local Development

### Frontend
```bash
cd app
npm install
npm start # Starts Expo development server
# Press 'w' for web
```

### Backend
```bash
cd server
npm install
npm run build
npm start # Starts on port 3001
```

### Environment Files
- Copy `app/env.example` to `app/.env.local` for frontend
- Copy `server/env.example` to `server/.env` for backend

## Testing the Deployment

### API Health Check
```bash
curl https://silverscreen-1.onrender.com/metrics
```

### Get Shows
```bash
curl "https://silverscreen-1.onrender.com/shows?city=NYC&date=2025-08-14"
```

### Frontend
Visit your Netlify URL and verify:
1. Shows load on the browse screen
2. Can select seats on the seat map
3. Checkout flow works (test mode)

## Troubleshooting

### CORS Issues
- The API allows all origins by default for MVP
- To restrict, set `ALLOWED_ORIGINS` env var on Render

### Redis Connection Errors
- Redis is optional - the app works without it
- Purchase jobs run synchronously without Redis
- To use Redis, set `REDIS_URL` on Render

### Module Not Found Errors
- Ensure all imports have `.js` extensions
- TypeScript compiles to ES modules which require extensions

### Stripe API Version Errors
- Current version: `2025-07-30.basil`
- Update in `server/src/api/checkout.ts` if needed

## Deployment Checklist

- [ ] Push code to `main` branch
- [ ] Wait for Render build to complete (~3-5 minutes)
- [ ] Verify API at https://silverscreen-1.onrender.com/metrics
- [ ] Wait for Netlify build to complete (~2-3 minutes)
- [ ] Test frontend functionality
- [ ] Check logs for any errors
7 changes: 7 additions & 0 deletions app/env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# API Configuration
# For local development, use localhost
# For production (Netlify), set this in netlify.toml or Netlify environment variables
EXPO_PUBLIC_API_BASE_URL=http://localhost:3001

# Stripe Publishable Key (test mode)
EXPO_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_your_key_here
5 changes: 5 additions & 0 deletions app/metro.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const { getDefaultConfig } = require('expo/metro-config');

const config = getDefaultConfig(__dirname);

module.exports = config;
Loading