{"id":51878356,"url":"https://github.com/conanxin/warmwords-miniprogram","last_synced_at":"2026-07-25T08:30:43.504Z","repository":{"id":359795501,"uuid":"1247536530","full_name":"conanxin/warmwords-miniprogram","owner":"conanxin","description":"A WeChat Mini Program for parent-child vocabulary learning with AI vision recognition, multilingual flashcards, and TTS pronunciation.","archived":false,"fork":false,"pushed_at":"2026-06-06T04:22:40.000Z","size":192,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-06T06:12:27.364Z","etag":null,"topics":["ai","cloud-functions","flashcards","language-learning","parent-child-learning","tencent-cloud","tts","vision-language","wechat-miniprogram"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conanxin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":"docs/ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-23T12:55:59.000Z","updated_at":"2026-06-06T04:22:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/conanxin/warmwords-miniprogram","commit_stats":null,"previous_names":["conanxin/warmwords-miniprogram"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/conanxin/warmwords-miniprogram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conanxin%2Fwarmwords-miniprogram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conanxin%2Fwarmwords-miniprogram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conanxin%2Fwarmwords-miniprogram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conanxin%2Fwarmwords-miniprogram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conanxin","download_url":"https://codeload.github.com/conanxin/warmwords-miniprogram/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conanxin%2Fwarmwords-miniprogram/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35873752,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-25T02:00:06.922Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","cloud-functions","flashcards","language-learning","parent-child-learning","tencent-cloud","tts","vision-language","wechat-miniprogram"],"created_at":"2026-07-25T08:30:42.844Z","updated_at":"2026-07-25T08:30:43.488Z","avatar_url":"https://github.com/conanxin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WarmWords Mini Program（拍词贴）\n\n**A WeChat Mini Program for parent-child vocabulary learning with AI vision recognition, multilingual flashcards, and TTS pronunciation.**\n\n[English](#english) | [中文](#中文)\n\n---\n\n## English\n\n### What is WarmWords?\n\nWarmWords (拍词贴) is a WeChat Mini Program designed for parents and young children (ages 3–8) to learn everyday English vocabulary together. Take a photo of any object, and the AI will identify it and generate a beautiful multilingual flashcard — complete with English word, phonetic pronunciation, example sentence, and authentic TTS audio.\n\n### Features\n\n- **AI Vision Recognition** — Identify objects from photos (children's items, toys, fruits, animals, etc.)\n- **Multilingual Flashcards** — English, Chinese, Japanese, and Korean word cards with phonetics\n- **Example Sentences** — Age-appropriate English sentences for each word\n- **Child-Friendly Prompts** — Encouraging, simple language throughout\n- **Real TTS Pronunciation** — Authentic English pronunciation via Tencent Cloud TTS\n- **Graceful Fallback** — If TTS or network is unavailable, shows a friendly pronunciation hint modal\n- **Temporary Image Cleanup** — Photos are deleted from cloud storage after recognition\n- **Scheduled Cloud Cleanup** — Dry-run cleanup job cleans up old recognition input files\n- **Privacy \u0026 Safety** — No personal data collection; AI disclaimer displayed on results page\n\n### Architecture\n\n**Recognition Flow:**\n```\nWeChat Mini Program\n  → wx.cloud.uploadFile()\n  → recognizeObject cloud function\n  → AI Vision Provider\n  → normalized word card\n  → result page / sticker book / review page\n```\n\n**Pronunciation Flow:**\n```\nResult page \"🔊 Listen\" button\n  → tts cloud function\n  → Tencent Cloud TextToVoice API\n  → cloud storage (tts-audio/)\n  → getTempFileURL()\n  → InnerAudioContext playback\n```\n\n**Cloud Storage Cleanup:**\n```\nrecognition-inputs/   ← immediate delete after recognition\ncleanupRecognitionImages/   ← scheduled dry-run cleanup job\n```\n\n### Directory Structure\n\n```\nwarmwords-miniprogram/\n├── miniprogram/                    # WeChat Mini Program frontend\n│   ├── pages/\n│   │   └── result/                 # Result page (flashcard display)\n│   ├── components/                 # Reusable components\n│   └── utils/\n│       ├── audio.js               # TTS playback + fallback\n│       ├── cloudImage.js          # Cloud image upload + delete\n│       ├── mockVision.js          # Local mock for offline dev\n│       └── storage.js             # Sticker book storage\n├── cloudfunctions/\n│   ├── recognizeObject/           # AI vision recognition cloud function\n│   ├── tts/                        # Tencent Cloud TTS cloud function\n│   └── cleanupRecognitionImages/  # Scheduled cleanup cloud function\n├── scripts/                        # Local validation \u0026 test scripts\n│   ├── validate_structure.js       # Project structure checks\n│   ├── audit_miniprogram_static.js # Security audit\n│   ├── test_tts_integration_static.js\n│   ├── test_tts_response_parse_static.js\n│   └── test_provider_readiness.js\n└── docs/                           # Architecture \u0026 design docs\n    ├── AI_PROVIDER_INTEGRATION.md\n    ├── PRIVACY.md\n    ├── PHASE_5E_TTS_INTEGRATION_PLAN.md\n    ├── WECHAT_RELEASE_PRECHECKLIST.md\n    └── VERSION_0_1_SUBMISSION_PACKAGE.md\n```\n\n### Quick Start\n\n#### Prerequisites\n\n- [WeChat Developer Tools](https://developers.weixin.qq.com/miniprogram/en/dev/devtools/download.html)\n- WeChat account with Mini Program capability\n- Node.js ≥ 16 (for local scripts)\n\n#### 1. Clone the repository\n\n```bash\ngit clone https://github.com/conanxin/warmwords-miniprogram.git\ncd warmwords-miniprogram\n```\n\n#### 2. Open in WeChat Developer Tools\n\n1. Open WeChat Developer Tools\n2. Click \"Import Project\"\n3. Select the project root directory\n4. Set AppID in `project.config.json` (or create a new project)\n5. Enable Cloud Development in the project settings\n\n#### 3. Deploy cloud functions\n\nIn WeChat Developer Tools → Cloud Development:\n\n```bash\n# Upload each cloud function\nRight-click cloudfunctions/recognizeObject → \"Upload Cloud Function\"\nRight-click cloudfunctions/tts → \"Upload Cloud Function\"\nRight-click cloudfunctions/cleanupRecognitionImages → \"Upload Cloud Function\"\n```\n\n#### 4. Configure environment variables\n\n**recognizeObject cloud function env vars:**\n- `AI_PROVIDER_BASE_URL` — Your vision API endpoint\n- `AI_PROVIDER_API_KEY` — Your vision API key\n- `AI_PROVIDER_MODEL` — Vision model name\n\n**tts cloud function env vars:**\n- `TTS_SECRET_ID` — Tencent Cloud SecretId\n- `TTS_SECRET_KEY` — Tencent Cloud SecretKey\n- `TTS_REGION` — Region (default: `ap-guangzhou`)\n- `TTS_VOICE_TYPE` — Voice type (default: `101001`)\n- `TTS_CODEC` — Audio codec (default: `mp3`)\n- `TTS_SAMPLE_RATE` — Sample rate (default: `16000`)\n\n\u003e **Note:** WeChat cloud functions do NOT support `QCLOUD_`, `SCF_`, or `TENCENTCLOUD_` environment variable prefixes. Use the plain names (e.g., `TTS_SECRET_ID`) as shown above.\n\n\u003e **Note:** See `.env.example` for placeholder environment variable names. Do not put real values in this file.\n\n#### 5. Configure AI Vision Provider\n\nSee `docs/AI_PROVIDER_INTEGRATION.md` for detailed setup instructions.\n\n#### 6. Configure Tencent Cloud TTS\n\n1. Go to [Tencent Cloud Console → TTS](https://console.tencentcloud.com/tts)\n2. Enable Text-to-Speech service\n3. Go to [CAM Console](https://console.tencentcloud.com/cam/cam-overview) → Users → Create Sub-user\n4. Grant `QcloudTTSFullAccess` policy\n5. Create an access key (SecretId + SecretKey)\n6. Configure in tts cloud function environment variables\n7. Check your resource pack / billing settings\n\n#### 7. Run local validation\n\n```bash\nnode scripts/validate_structure.js\nnode scripts/audit_miniprogram_static.js\nfind miniprogram cloudfunctions scripts -name \"*.js\" -type f -print0 | xargs -0 -n1 node -c\nnode scripts/test_tts_integration_static.js\nnode scripts/test_tts_response_parse_static.js\n```\n\n### Privacy \u0026 Safety\n\n- **No sensitive data collection** — WarmWords does not collect children's names, school, home address, or ID numbers\n- **Photos used only for recognition** — Images are deleted from cloud storage after processing\n- **AI disclaimer** — Results page clearly states AI recognition may be inaccurate\n- **No API keys stored in frontend** — All credentials are in cloud function environment variables\n- **Recommended** — Parents should accompany children during use\n- **Do NOT commit real secrets to GitHub** — Use `.env.example` as a template\n\n### Testing\n\n```bash\n# Structure validation\nnode scripts/validate_structure.js\n\n# Security audit\nnode scripts/audit_miniprogram_static.js\n\n# Provider readiness check (needs network)\nnode scripts/test_provider_readiness.js\n\n# TTS integration tests\nnode scripts/test_tts_integration_static.js\nnode scripts/test_tts_response_parse_static.js\n\n# Syntax check all JS files\nfind miniprogram cloudfunctions scripts -name \"*.js\" -type f -print0 | xargs -0 -n1 node -c\n```\n\n### Security Reminders\n\n- **Never commit real `.env` files or environment variables** to GitHub\n- **Never commit `project.private.config.json`** (contains real AppID)\n- **Never commit full cloud file IDs** (`cloud://...`) in code or documentation\n- All credentials managed via **WeChat cloud function environment variables** — never hardcode\n- If you accidentally commit a secret, **revoke and rotate immediately**\n\n### Open Source Release\n\n- **GitHub Release:** [v0.1.0](https://github.com/conanxin/warmwords-miniprogram/releases/tag/v0.1.0)\n- **Release Notes:** [docs/RELEASE_NOTES_v0.1.0.md](./docs/RELEASE_NOTES_v0.1.0.md)\n- **Maintainer Notes:** [docs/OPEN_SOURCE_MAINTAINER_NOTES.md](./docs/OPEN_SOURCE_MAINTAINER_NOTES.md)\n\n\u003e **Note:** Some internal development docs (`docs/PHASE_3*/`, `docs/PHASE_4*/`, `docs/PHASE_5*/`) may be simplified or reorganized in future releases.\n\n### Roadmap\n\n**v0.1 (current)** — Core release\n- Photo recognition with AI flashcard generation\n- Multilingual word cards (EN/ZH/JA/KO)\n- TTS pronunciation\n- Sticker book (save \u0026 review)\n- Temporary image cleanup\n\n**v0.2** — Enhanced experience\n- TTS audio cleanup job (scheduled deletion of old tts-audio/ files)\n- Multiple TTS voice options\n- Mistake book (review missed words)\n- Word card editing\n- Parent dashboard\n\n**v0.3** — Expanded learning\n- Offline vocabulary fallback\n- Graded vocabulary levels\n- Learning statistics\n- Export word cards\n- Multi-child profiles (privacy-aware design required)\n\n**Future ideas**\n- Notebook / printable flashcard export\n- Theme packs\n- Multi-modal story generation from word cards\n- Local model / private deployment exploration\n\n### License\n\nMIT License — see [LICENSE](./LICENSE)\n\n---\n\n## 中文\n\n### 项目简介\n\n拍词贴（WarmWords）是一款面向亲子英语启蒙的微信小程序。拍照即可识别日常物品，生成中英日韩多语言词卡，支持真人发音，适合 3–8 岁儿童和家长一起学习。\n\n### 主要功能\n\n- AI 图像识别 — 识别照片中的物品（儿童用品、玩具、水果、动物等）\n- 多语言词卡 — 英文单词、音标、例句，中日韩语参考翻译\n- 儿童友好提示 — 简洁鼓励的语言\n- 真实 TTS 发音 — 腾讯云语音合成\n- 离线友好 — 无网络/TTS 不可用时显示\"跟孩子一起读\"的友好提示\n- 临时图片清理 — 识别后删除云存储临时文件\n- 定时清理任务 — 自动清理过期识别文件\n- 隐私保护 — 不采集敏感个人信息\n\n### 技术架构\n\n识别流程：小程序 → `wx.cloud.uploadFile()` → `recognizeObject` 云函数 → AI 视觉 API → 词卡结果\n\n发音流程：结果页\"听发音\" → `tts` 云函数 → 腾讯云 TextToVoice → 云存储 → `InnerAudioContext` 播放\n\n清理流程：`recognition-inputs/` 临时图片即时删除 + 定时 `cleanupRecognitionImages` 任务\n\n详细架构见 `docs/ARCHITECTURE.md`。\n\n### 快速开始\n\n1. 用微信开发者工具导入项目根目录\n2. 配置 `project.config.json` 中的 AppID\n3. 部署云函数 `recognizeObject` / `tts` / `cleanupRecognitionImages`\n4. 配置各云函数环境变量（见上方英文版步骤 4）\n5. 运行本地验证脚本（见上方英文版 Testing 部分）\n\n### License\n\nMIT License — see [LICENSE](./LICENSE)\n\n### 安全提示\n\n- **不要把真实 .env 文件或环境变量提交到 GitHub**\n- **不要提交 `project.private.config.json`**（含真实 AppID）\n- **不要在代码或文档中提交完整 cloud file ID**（`cloud://...`）\n- 所有凭证通过微信云函数环境变量管理，不要硬编码\n- 如果误提交了密钥，**立即吊销并重新生成**\n\n### 开源发布\n\n- **GitHub Release:** [v0.1.0](https://github.com/conanxin/warmwords-miniprogram/releases/tag/v0.1.0)\n- **Release Notes:** [docs/RELEASE_NOTES_v0.1.0.md](./docs/RELEASE_NOTES_v0.1.0.md)\n- **Maintainer Notes:** [docs/OPEN_SOURCE_MAINTAINER_NOTES.md](./docs/OPEN_SOURCE_MAINTAINER_NOTES.md)\n- **Development Handoff Guide:** [docs/DEVELOPMENT_HANDOFF.md](./docs/DEVELOPMENT_HANDOFF.md) — 在另一台机器上从 GitHub clone 并继续开发\n\n\u003e **注意：** `docs/PHASE_3*/`、`docs/PHASE_4*/`、`docs/PHASE_5*/` 为开发阶段记录，后续版本可能简化或重新组织。\n\n### 免责声明\n\nAI 识别和翻译结果仅供参考，可能存在误差，建议家长陪同使用。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconanxin%2Fwarmwords-miniprogram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconanxin%2Fwarmwords-miniprogram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconanxin%2Fwarmwords-miniprogram/lists"}