-
.envfile created infrontend/directory - LLM API key added (OPENAI_API_KEY or ANTHROPIC_API_KEY)
-
.envis in.gitignore - Dependencies installed (
npm install) - Dev server runs successfully (
npm run dev) - AI agent appears and responds to messages
- Production
.envconfigured on hosting platform - API keys set as server-side environment variables
- No
PUBLIC_prefix on API keys - Supabase credentials configured
- Flow network configuration set
- API keys NOT in git history
- API keys NOT in client bundle (check build output)
- API keys NOT in browser DevTools/Network tab
- API keys NOT in any public environment variables
-
.envfile is gitignored -
.env.examplehas no real keys
- No hardcoded secrets in code
- All sensitive data uses environment variables
- Server-side API endpoint validates inputs
- Error messages don't leak sensitive info
- Logs don't contain API keys or secrets
- Agent button appears on all pages
- Agent opens/closes correctly
- Messages send successfully
- Responses received from AI
- Loading states display properly
- Error handling works (test with invalid API key)
- Context updates on DAO pages
- Context clears when leaving DAO pages
- Desktop layout works
- Tablet layout works
- Mobile layout works
- Keyboard navigation functional
- Screen reader accessible
- Animations smooth
- No visual glitches
- Agent knows about current DAO (on project pages)
- Agent provides relevant answers
- Agent handles long conversations
- Agent recovers from errors gracefully
- Multiple users can use agent simultaneously
- Bundle size acceptable
- No memory leaks in chat component
- Smooth scrolling in message history
- Fast initial load time
- Responsive UI interactions
- API endpoint responds quickly (<2s)
- Error handling doesn't hang
- Concurrent requests handled properly
- No server crashes under load
- Using cost-effective LLM model
- Token limits set appropriately (1000 max)
- No unnecessary API calls
- Consider implementing rate limiting
- README.md updated with AI agent info
- Setup instructions clear and complete
- Troubleshooting guide available
- Example questions provided
- Architecture documented
- API endpoints documented
- Component usage documented
- Security practices documented
- Code comments added
- Error logging configured
- Failed API calls tracked
- User errors captured
- Server errors logged
- Agent usage metrics (optional)
- Popular questions tracked (optional)
- User engagement measured (optional)
- API cost monitoring set up
- User messages not stored permanently (unless specified)
- Privacy policy updated (if needed)
- GDPR compliance considered (if applicable)
- Data retention policy defined
- AI usage disclosed to users
- Limitations clearly stated
- No liability for AI advice
- Users encouraged to verify on-chain
-
Verify API Keys
# Should return nothing git log -p | grep -i "sk-" git log -p | grep -i "api_key" # Should show .env is ignored git check-ignore frontend/.env
-
Check Client Bundle
# Build the app npm run build # Search for API keys in build output grep -r "sk-" .svelte-kit/output grep -r "OPENAI_API_KEY" .svelte-kit/output grep -r "ANTHROPIC_API_KEY" .svelte-kit/output # Should return no results
-
Verify Environment Variables
# In production environment, verify: echo $OPENAI_API_KEY # Should show key echo $PUBLIC_OPENAI_API_KEY # Should be empty
-
Test in Production
- Open browser DevTools
- Go to Network tab
- Send a message to agent
- Verify request to
/api/dao-agenthas NO API key - Verify response has NO API key
- Monitor error rates
- Check API costs
- Verify user engagement
- Watch for security issues
- Check performance metrics
- Review user feedback
- Analyze popular questions
- Check cost trends
- Monitor error patterns
- Optimize based on data
- Weekly cost review
- Monthly security audit
- Quarterly feature updates
- Regular dependency updates
- Continuous monitoring
-
Immediate Actions
- Revoke compromised API key immediately
- Generate new API key
- Update production environment variables
- Restart application
- Monitor for unauthorized usage
-
Investigation
- Check git history for leaks
- Review access logs
- Identify how key was exposed
- Document incident
- Implement preventive measures
-
Prevention
- Review security practices
- Update team training
- Enhance monitoring
- Add additional safeguards
-
Immediate Actions
- Check usage dashboard
- Identify unusual patterns
- Implement rate limiting
- Set spending alerts
- Consider temporary shutdown
-
Investigation
- Review recent changes
- Check for abuse
- Analyze user behavior
- Identify optimization opportunities
# Pull latest code
git pull origin main
# Install dependencies
cd frontend
npm install
# Run tests (if available)
npm test
# Build for production
npm run build
# Verify build
ls -la .svelte-kit/outputOn your hosting platform (Vercel, Netlify, etc.):
# Set environment variables (server-side only)
OPENAI_API_KEY=sk-your-production-key
SUPABASE_SERVICE_KEY=your-supabase-key
PUBLIC_SUPABASE_URL=your-supabase-url
PUBLIC_FLOW_NETWORK=mainnet# Deploy to production
npm run deploy
# or use your platform's deployment command- Visit production URL
- Test AI agent functionality
- Verify no API keys in browser
- Check error tracking
- Monitor initial usage
## Deployment: [Date]
### Changes
- List of changes deployed
### Environment
- Platform: [Vercel/Netlify/etc]
- Node version: [version]
- Dependencies updated: [yes/no]
### Verification
- [ ] AI agent working
- [ ] No security issues
- [ ] Performance acceptable
- [ ] Error tracking active
### Issues
- List any issues encountered
### Rollback Plan
- How to rollback if needed
### Next Steps
- Any follow-up actions needed- All API keys are server-side only
- No secrets in git history
-
.envis gitignored - Production environment variables set
- AI agent tested in production
- Error tracking configured
- Monitoring set up
- Documentation complete
- Rate limiting implemented
- Cost alerts configured
- User feedback mechanism ready
- Support documentation available
- Team trained on new feature
- Analytics tracking
- A/B testing ready
- Feature flags configured
- Gradual rollout plan
Once all critical and important items are checked:
- Deploy to production
- Monitor closely for first 24 hours
- Gather user feedback
- Iterate and improve
Remember: Security first, always! π
Last updated: [Date]