Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
Markdown
DP1 Feed Deployment Checklist #
✅ Pre-Deployment (Completed) #
📋 Deployment Steps (To Do) #
Step 1: Authenticate with Cloudflare #
Alternative (API Token):
set -x CLOUDFLARE_API_TOKEN "YOUR_CLOUDFLARE_API_KEY_HERE"
set -x CLOUDFLARE_EMAIL "me@jas.life"
wrangler whoami
Step 2: Create Cloudflare Resources #
Created namespace with title "aesthetic-feed-DP1_PLAYLISTS" ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Step 3: Update Configuration #
Step 4: Generate and Set Secrets #
set api_secret (openssl rand -hex 32) echo "Save this API Secret: $api_secret" echo $api_secret | wrangler secret put API_SECRET --env productionnpm run jwt:generate-keyscat private-key.txt | wrangler secret put ED25519_PRIVATE_KEY --env productionecho "your-issuer" | wrangler secret put JWT_ISSUER --env production echo "your-audience" | wrangler secret put JWT_AUDIENCE --env production
Step 5: Test Locally (Optional but Recommended) #
Step 6: Deploy to Production #
Step 7: Configure Custom Domain #
Step 8: Verify Deployment #
curl https://feed.aesthetic.computer/api/v1/health{ "status": "healthy", "timestamp": "2024-10-06T...", "version": "1.0.0" }curl https://feed.aesthetic.computer/api/v1curl -X POST https://feed.aesthetic.computer/api/v1/playlists \ -H "Authorization: Bearer YOUR_API_SECRET" \ -H "Content-Type: application/json" \ -d '{ "dpVersion": "1.0.0", "title": "test-playlist", "items": [{ "source": "https://aesthetic.computer/prompt", "duration": 300, "license": "open" }] }'
Step 9: Monitor & Verify #
Step 10: Documentation & Integration #
🔍 Verification Commands #
Run these after deployment to verify everything:
# Check DNS resolution
dig feed.aesthetic.computer
# Test API health
curl https://feed.aesthetic.computer/api/v1/health
# List playlists (should return empty array initially)
curl https://feed.aesthetic.computer/api/v1/playlists
# Check worker logs
cd /workspaces/aesthetic-computer/feed/dp1-feed
wrangler tail --env production
# List secrets (verify they're set)
wrangler secret list --env production
# Check deployments
wrangler deployments list --env production
📊 Success Criteria #
🚨 Common Issues & Solutions #
Issue: "Worker not found" #
Solution: Wait 1-2 minutes after deployment, DNS needs to propagate
Issue: "Unauthorized" when creating playlist #
Solution: Verify API_SECRET is set correctly:
wrangler secret list --env production
Issue: "KV namespace not found" #
Solution: Check namespace IDs in wrangler.toml match created namespaces
Issue: Custom domain not working #
Solution:
- Check domain is added in Cloudflare dashboard
- Verify DNS record was created automatically
- Wait up to 5 minutes for propagation
Issue: "Module not found" error #
Solution:
- Ensure dependencies are installed:
npm install - Try:
npm run worker:buildto verify TypeScript compiles
📝 Important Notes #
- API Secret: Save it securely - you can't retrieve it later
- Ed25519 Keys: Keep private key secure, back up both keys
- KV Namespace IDs: Must match in wrangler.toml
- DNS Propagation: Can take 2-5 minutes
- CORS: Configured to allow requests from aesthetic.computer
- Rate Limits: Default Cloudflare Worker limits apply
🎯 Quick Reference #
Key Files #
dp1-feed/wrangler.toml- Configurationdp1-feed/worker.ts- Entry pointdp1-feed/app.ts- Main logic
Key Commands #
npm run feed:setup # One-time setup
npm run feed:deploy # Deploy to production
npm run feed:dev # Local development
npm run feed:logs # Watch logs
npm run feed:test # Run tests
Key URLs #
- API: https://feed.aesthetic.computer/api/v1
- Dashboard: https://dash.cloudflare.com/
- DNS: https://dash.cloudflare.com/.../dns/records
⏱️ Estimated Time #
- Total Setup Time: 10-15 minutes
- Step 1 (Auth): 1-2 minutes
- Step 2 (Resources): 2-3 minutes
- Step 3 (Config): 1 minute
- Step 4 (Secrets): 2-3 minutes
- Step 5 (Test): 2 minutes (optional)
- Step 6 (Deploy): 1-2 minutes
- Step 7 (Domain): 1-2 minutes
- Step 8 (Verify): 2-3 minutes
Ready to deploy? Start with Step 1! 🚀
Need help? See DP1-FEED-SETUP.md for detailed instructions.