bagsy/QUICK_START.md

223 lines
4.5 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ShopList Quick Start - Deployment in 4 Steps
## For the Impatient
### 1️⃣ Deploy Backend (45 min)
```bash
bun run deploy
# Follow the interactive wizard
# Answer questions about environment, region, secrets
# Wizard automatically deploys to AWS
```
### 2️⃣ Deploy iOS (20 min)
```bash
bun run build:ios
# Builds and uploads to TestFlight
# You submit for review in App Store Connect (1-2 days)
# Family gets email invite
# They tap link → Install
```
### 3️⃣ Deploy Android (20 min)
```bash
bun run build:android
# Generates APK file
# Download and share link with family
# Family taps link → Install
```
### 4️⃣ Start Using!
- Family signs in
- Creates shared household
- Real-time sync works automatically
- Changes appear instantly on all devices
---
## What Gets Created
### Backend (AWS)
```
┌─────────────────────────────┐
│ ShopList API (Lambda) │
│ ↓ │
│ PostgreSQL Database │
│ ↓ │
│ Redis Cache │
│ ↓ │
│ CloudWatch Logs │
└─────────────────────────────┘
Cost: ~$65-100/month
```
### Frontend
```
iOS: TestFlight → Family installs → Auto-updates
Android: APK download → Sideload → Manual updates
```
---
## The One Command You Need
```bash
bun run deploy
```
This wizard will:
1. Check prerequisites (AWS, Docker, etc.)
2. Ask for configuration (environment, region, secrets)
3. Generate environment files
4. Deploy to AWS automatically
5. Give you API URL
6. Show next steps for iOS/Android
That's it!
---
## Verify It Works
```bash
# After backend deploys, test:
curl https://your-api-url/api/health
# Real-time sync test (needs wscat):
npm install -g wscat
wscat -c wss://your-api-url/api/ws?userId=test&householdId=test
```
---
## Send to Family
### iOS
```
Email subject: "ShopList - Install on iPhone"
Click link and tap "Install":
[TestFlight Link from App Store Connect]
```
### Android
```
Email: "ShopList - Download for Android"
Download and install:
[APK Download Link]
Settings → Security → Unknown sources ON
Tap APK file → Install
```
---
## Troubleshooting Quick Fixes
| Problem | Fix |
| --------------------------- | ------------------------------------ |
| "AWS credentials not found" | Run `aws configure` |
| "Build failed" | Run `bun install` first |
| "Can't install iOS" | Check Apple ID is correct |
| "Can't install Android" | Enable "Unknown sources" in Settings |
| "Sync not working" | Check EXPO_PUBLIC_API_URL is set |
| "Database error" | Check security groups allow 5432 |
---
## What Happens Next
**Day 1:**
- Backend running on AWS
- Family starts installing from TestFlight/APK
**Day 2-3:**
- iOS TestFlight build approved by Apple
- Family gets automatic update notification
**Day 3+:**
- Everyone using real-time shopping list
- Changes sync instantly
- All data on your server
---
## Important Reminders
✅ **Backend:** Keep `.deployment/secrets.json` safe
✅ **Mobile:** Use TestFlight for iOS (easier than App Store)
✅ **Updates:** New code changes = new build = new APK/TestFlight
✅ **Costs:** ~$100/month for family use on AWS
✅ **Backups:** AWS automatically backs up database
---
## Files You'll Need
After `bun run deploy` completes:
```
.deployment/
├── config.json ← Your deployment config
├── outputs.txt ← AWS output (API URLs, etc.)
├── CHECKLIST.md ← Full checklist
└── secrets.json ← Keep safe!
apps/api/
└── .env.production ← Backend secrets
apps/mobile/
└── .env.production ← Mobile settings
```
---
## Next Steps After Deployment
1. Test with family member #1
2. Get feedback
3. Fix any issues
4. Roll out to everyone
5. Enjoy! 🎉
---
## Questions?
Read full guides:
- `DEPLOYMENT_CHECKLIST.md` - Complete step-by-step
- `docs/iOS_SIDELOADING_GUIDE.md` - iOS details
- `docs/WEBSOCKET_SYNC.md` - Real-time sync info
- `DEPLOYMENT_GUIDE.md` - Architecture overview
---
## One Last Thing
```bash
# Before running deploy, make sure you're ready:
✅ AWS account created
✅ AWS credentials configured
✅ GitHub repo initialized
✅ Node/bun installed
# Then:
bun run deploy
# And you're done! 🚀
```