Commit Graph

13 Commits

Author SHA1 Message Date
Ponshu Developer cd57171670 fix: strengthen AI label recognition prompt and repo cleanup
Made-with: Cursor
2026-04-11 15:46:44 +09:00
Ponshu Developer 5311241fe5 feat: ライセンス検証をVPSエンドポイントへ移行
- secrets.dart: posimaiBaseUrl を追加 (https://api.soar-enrich.com)
- license_service.dart: 検証URLをproxyから /api/ponshu/license/validate へ変更
  + LicenseStatus.trialExpired 参照バグを修正
  + _cachedTrialInfo 残骸変数参照を削除
- proxy/server.js: /license/validate と /admin/license/revoke を削除
  (ライセンス管理はPostgreSQL + VPS server.js が担当)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 00:16:52 +09:00
Ponshu Developer d47bb201ac feat: ライセンス管理システムを追加(Pro機能解放型)
- LicenseService / LicenseProvider / LicenseScreen を追加
- main_screen.dart: isProVersion(ビルド時)→ isProProvider(ランタイム)に変更
  ライセンスキー購入後にARスキャン・Analytics・Instagram支援が解放される
- home_screen.dart: 不要なTrialStatusBannerを削除(AI解析は常時無制限)
- proxy/server.js: トライアル回数制限・Stripe/Resendコードを削除(整理)
- proxy/package.json: stripe/resend依存を削除
- .github/workflows/ios_build.yml: iOS CI追加
- scripts/deploy_android.ps1: Android配布スクリプト追加

AI解析(1日50回)はLite版でも制限なし
Proライセンス購入でARスキャン・Analytics・Instagram支援を解放

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 00:05:53 +09:00
Ponshu Developer 44f88ff04b fix(proxy): Bind express to 0.0.0.0 and update healthcheck 2026-02-21 23:35:36 +09:00
Ponshu Developer 10f772942a feat: Implement Redis persistence for Synology Proxy rate limiting
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>
2026-02-21 19:35:59 +09:00
Ponshu Developer 3502694d89 feat: Add Bearer Token authentication to AI Proxy and disable CORS
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 11:34:00 +09:00
Ponshu Developer d89b6917fa feat: v1.0.16 brushup + Synology Proxy integration
- fix: Replace hardcoded colors with AppColors theme
- refactor: Extract SakePhotoEditModal and SakeMbtiStampSection
- feat: Add taste chart manual editing feature
- test: Add unit tests for SakeItem and AnalysisCacheService (14 tests)
- feat: Add Synology AI Proxy server (Node.js/Docker)
- chore: Make useProxy configurable via dart-define
- chore: Add .apk/.aab/.ipa to .gitignore
- docs: Add proxy setup guide and project roadmap

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 00:13:12 +09:00
Ponshu Developer 21833e4e75 feat: Code quality improvements (v1.0-full-with-qr)
 Improvements:
- Replace print() with debugPrint() (7 instances)
- Migrate withOpacity to withValues (9 instances)
- Remove unused imports (2 files)
- Fix BuildContext async gaps with mounted checks
- Remove unused local variables

📊 Analysis Results:
- Flutter analyzer: 57 → 46 issues (-11)
- Security audit: Passed 
- Code quality: Production ready 

🎯 Purpose:
Complete snapshot before QR feature removal.
This is the last version with full QR functionality.

🤖 Generated with Claude Code & Antigravity

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-30 00:54:22 +09:00
Ponshu Developer 6507ab9596 feat: enhance AI spec extraction 2026-01-16 00:53:44 +09:00
Ponshu Developer a5353a9b50 feat(infra): Add AI Proxy Server for Rate Limiting & API Key Protection
## 概要
Gemini APIへのリクエストを中継するプロキシサーバーを実装。
アプリにAPIキーを埋め込まず、Synology上で安全に管理。

## 主な機能
- デバイスID認証(SHA256ハッシュ)
- レート制限(1デバイスあたり1日10回)
- 使用状況のログ記録(JSON形式)
- 30日以上前のデータ自動削除

## 技術スタック
- Python 3.11 + FastAPI
- Docker Container(既存のGitea環境に追加)
- ポート8080で公開

## ファイル構成
- tools/synology/ai-proxy/server.py - プロキシサーバー本体
- tools/synology/ai-proxy/requirements.txt - Python依存関係
- tools/synology/docker-compose.yml - ai-proxyサービス追加
- tools/synology/.env.example - 環境変数テンプレート
- tools/synology/DEPLOYMENT_GUIDE.md - デプロイ手順書

## セキュリティ
- .env ファイルは.gitignoreで除外(APIキー保護)
- 環境変数でAPIキー管理(コードに埋め込まない)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-15 22:50:23 +09:00
Ponshu Developer 3841cbb907 feat(infra): Setup Synology AI Factory (Gitea + MCP) 2026-01-14 00:48:04 +09:00
Ponshu Developer 191e334d0d v1.2: Map Tab Tile Map, Sommelier Enhancements, APK Optimization (111MB) 2026-01-13 10:16:00 +09:00
Ponshu Developer c948164d39 Add Synology docker-compose setup for Gitea+MCP 2026-01-11 17:34:20 +09:00