Infrastructure Improvements:
- Add Redis container to tools/proxy/docker-compose.yml with AOF persistence
- Migrate rate limiting from in-memory to Redis-based storage
- Add TTL-based daily quota reset (expires at midnight)
- Implement health checks for Redis and Proxy containers
Proxy Server Changes (tools/proxy/server.js):
- Add redis client with async connection handling
- Replace usageStore object with Redis GET/INCR/EXPIRE operations
- Add responseMimeType: 'application/json' to Gemini client config
(fixes Markdown response bug)
- Add comprehensive debug logging for JSON parsing issues
Flutter App Configuration:
- Change Secrets.useProxy defaultValue from false to true
- Development builds now use local Synology proxy by default
- Release builds can override with --dart-define=USE_PROXY=false
Documentation:
- Add REDIS_MIGRATION_GUIDE.md with step-by-step migration instructions
- Add tools/proxy/README.md with architecture overview
- Create .env.example template for secrets configuration
- Update PROJECT_TODO.md to mark H3 (Proxy永続化) as in progress
Dependencies:
- Add redis@^4.7.0 to package.json
This resolves the critical tech debt where rate limits reset on container restart.
Redis AOF persistence ensures quota tracking survives server reboots.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>