{"id":36967736,"url":"https://github.com/winston-wwzhen/our-memory","last_synced_at":"2026-01-13T20:41:39.983Z","repository":{"id":326717566,"uuid":"1104674165","full_name":"winston-wwzhen/our-memory","owner":"winston-wwzhen","description":"一款专为情侣和热爱生活的个人打造的 AI 互动纪念册。 在这里，你们可以完成每日的趣味挑战，通过 AI 魔法将照片变成唯美的二次元画作，并永久珍藏在云端时光轴中。","archived":false,"fork":false,"pushed_at":"2025-12-20T07:11:01.000Z","size":15448,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-20T19:35:45.052Z","etag":null,"topics":["ai-art","couple-app","wechat-miniprogram"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/winston-wwzhen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"roadmap.txt","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-26T14:29:44.000Z","updated_at":"2025-12-20T07:11:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/winston-wwzhen/our-memory","commit_stats":null,"previous_names":["winston-wwzhen/our-memory"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/winston-wwzhen/our-memory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winston-wwzhen%2Four-memory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winston-wwzhen%2Four-memory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winston-wwzhen%2Four-memory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winston-wwzhen%2Four-memory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/winston-wwzhen","download_url":"https://codeload.github.com/winston-wwzhen/our-memory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winston-wwzhen%2Four-memory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-art","couple-app","wechat-miniprogram"],"created_at":"2026-01-13T20:41:39.367Z","updated_at":"2026-01-13T20:41:39.973Z","avatar_url":"https://github.com/winston-wwzhen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"200\" src=\"./miniprogram/images/default-avatar.png\" alt=\"Logo\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003e我们的纪念册 (Our Memory)\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/WeChat-MiniProgram-green\" alt=\"WeChat\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/CloudBase-Serverless-blue\" alt=\"CloudBase\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"#\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-orange\" alt=\"License\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003e💖 一个集萌宠养成、情侣资源、实用工具于一体的私密二人空间\u003c/strong\u003e\u003cbr\u003e\n  \u003ci\u003e不仅是记录，更是连接。从日活运营的角度打造的高粘性情侣小程序。\u003c/i\u003e\n\u003c/p\u003e\n\n## 📖 项目简介 (Introduction)\n\n**“我们的纪念册”** 不仅仅是一个照片存储工具，它是一套完整的情侣/密友互动解决方案。基于微信小程序原生开发，采用 **微信云开发 (WeChat CloudBase)** 架构，无需自建服务器，低成本、高并发。\n\n本项目深度融合了**用户留存（Retention）**与**互动（Engagement）**机制，通过虚拟宠物、每日任务、精选情头等高频功能，让用户不仅仅是在“存照片”，而是在“玩生活”。\n\n## ✨ 核心功能亮点 (Features)\n\n基于最新的代码迭代，本项目包含以下核心模块：\n\n### 1. 🐣 情感维系系统 (Engagement)\n* **云端萌宠 (Virtual Pet)**: `pages/pet`\n    * 内置宠物养成系统，支持喂食、心情交互、旅行。\n    * *运营价值*：通过“喂食”机制极大提升用户的**DAU（日活）**和回访率。\n* **默契问答 (Couple Quiz)**: `pages/quiz`\n    * 两人同答一题，测试默契度。\n    * *运营价值*：增强用户互动深度，制造话题。\n* **时光胶囊 (Time Capsule)**: `pages/capsule`\n    * 写给未来的信，设定开启时间。\n    * *运营价值*：锁定用户长远留存预期。\n\n### 2. 🎨 资源与个性化 (Resources)\n* **情侣头像库 (Matching Avatars)**: `pages/avatar_list`\n    * 海量精选情侣头像，支持预览与保存。\n    * *运营价值*：**高频刚需功能**。头像的定期更新是吸引用户反复打开小程序的天然钩子（Hook），极易在社交圈产生传播。\n\n### 3. 💌 互动权益体系 (Incentive)\n* **恋爱兑换券 (Love Coupons)**: `pages/coupons`\n    * 自定义兑换券（如“按摩券”、“洗碗券”），支持核销状态管理。\n    * *运营价值*：将线下互动数字化，增加打开频次。\n* **每日任务 (Daily Missions)**: `cloudfunctions/get_daily_mission`\n    * 完成任务获取积分/道具。\n\n### 4. 🛠 实用工具与记录 (Utility \u0026 Memory)\n* **旅行足迹 (Travel Map)**: `pages/travel_map`\n    * 可视化记录两人的旅行打卡地，点亮中国地图。\n* **纪念日提醒 (Anniversary)**: `pages/index`\n    * 首页置顶重要纪念日倒数/正数。\n* **云相册 \u0026 留言板**: `pages/message_board`\n    * 影像记录与拍立得风格的留言互动区。\n\n---\n\n## 🏗 技术栈 (Tech Stack)\n\n* **前端**: 微信小程序原生 (WXML, WXSS, JavaScript)\n* **后端**: 微信云开发 (Cloud Functions) - Node.js\n* **数据库**: 云数据库 (NoSQL JSON Database)\n* **存储**: 云存储 (COS)\n* **AI能力**: 集成基础图像处理能力 (`cloudfunctions/process_anime`)\n\n---\n\n## 💾 数据库集合说明 (Database Schema)\n\n本项目使用云开发数据库（NoSQL），以下是完整的集合清单及其用途：\n\n### 1. 👤 用户与系统 (User \u0026 System)\n| 集合名称 | 描述 | 关键字段示例 |\n| :--- | :--- | :--- |\n| **`users`** | **核心用户表**。存储用户基础信息、绑定关系、资产余额、VIP状态及每日限额。 | `_openid`, `partner_id`, `water_count` (爱意), `rose_balance` (玫瑰), `vip_expire_date`, `extra_quota` (永久额度) |\n| **`vip_codes`** | **兑换码配置表**。用于存储VIP或资源兑换码。 | `code`, `days`, `usage_limit`, `used_users`, `is_active` |\n| **`app_config`** | **全局配置表**。用于控制全局开关（如审核模式、维护状态）。 | `key`, `value` (e.g., `SHOW_VIP_EXCHANGE`) |\n| **`logs`** | **日志与时光轴表**。存储所有关键操作日志，也是**相册/时光轴**的数据源。 | `type` ('daily_check_in', 'bind'), `imageFileID`, `content`, `style` (AI风格) |\n\n### 2. 🐣 宠物与旅行 (Pet \u0026 Travel)\n| 集合名称 | 描述 | 关键字段示例 |\n| :--- | :--- | :--- |\n| **`pets`** | **宠物状态表**。存储宠物的各项属性、所属关系。 | `owners` (数组), `mood_value`, `energy_level`, `food_inventory`, `state` ('idle'/'traveling') |\n| **`destinations`** | **目的地配置表**。定义旅行地点的属性（静态数据）。 | `id`, `name`, `min_travel_time`, `food_consumption`, `possible_rewards` |\n| **`travel_records`** | **旅行记录表**。记录每一次旅行的详细数据。 | `pet_id`, `destination_id`, `start_time`, `actual_return_time`, `rewards_summary` |\n| **`postcards`** | **明信片/特产表**。存储用户在旅行中获得的纪念品。 | `owners`, `travel_id`, `image_url`, `composition` (合成参数) |\n| **`gardens`** | **(旧) 花园表**。旧版本遗留数据，目前用于迁移脚本。 | *Legacy Data* |\n\n### 3. 💌 社交与互动 (Social \u0026 Interaction)\n| 集合名称 | 描述 | 关键字段示例 |\n| :--- | :--- | :--- |\n| **`capsules`** | **时光胶囊表**。存储埋藏的胶囊信息。 | `to_openid`, `openDate`, `content`, `status` (0:未开启, 1:已开启) |\n| **`messages`** | **留言板表**。存储便签墙的消息。 | `content`, `color`, `rotate`, `isLiked` |\n| **`coupons`** | **恋爱兑换券表**。存储用户持有或使用的权益券。 | `templateId`, `title`, `cost`, `status` (0:未使用, 1:核销中, 2:已使用) |\n| **`quiz_rounds`** | **问答对局表**。存储每一轮默契问答的进度和结果。 | `owners`, `round_seq`, `questions`, `answers_a`, `answers_b`, `is_finished` |\n| **`daily_picks`** | **每日任务快照表**。用于固定当天的每日任务，确保所有人看到的一样。 | `_id` (日期字符串), `task` |\n\n### 4. 🎨 内容与资源库 (Content Libraries)\n| 集合名称 | 描述 | 关键字段示例 |\n| :--- | :--- | :--- |\n| **`avatar_sets`** | **情侣头像库**。存储成套的情侣头像数据。 | `title`, `category`, `boy_img`, `girl_img`, `downloads`, `is_vip` |\n| **`task_pool`** | **任务题库**。每日任务的备选池。 | `title`, `description`, `difficulty`, `icon` |\n| **`quiz_pool`** | **问答题库**。默契问答的题目池。 | `title`, `options`, `type`, `is_person` (是否区分人物) |\n| **`egg_configs`** | **彩蛋配置表**。定义成就/彩蛋的触发条件和奖励。 | `_id` (彩蛋ID), `title`, `bonus`, `type` |\n| **`user_eggs`** | **用户成就记录表**。记录用户已触发的彩蛋。 | `_openid`, `egg_id`, `unlocked_at` |\n\n---\n\n## 🚀 快速部署 (Quick Start)\n\n作为一套 Serverless 架构的项目，你可以在10分钟内完成部署。\n\n### 1. 准备工作\n* 注册微信小程序账号。\n* 下载并安装 [微信开发者工具](https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html)。\n\n### 2. 导入项目\n1.  打开微信开发者工具，导入本项目根目录。\n2.  修改 `project.config.json` 中的 `appid` 为你自己的 AppID。\n\n### 3. 环境配置 (Environment Setup)\n1.  点击开发者工具上的 **“云开发”** 按钮，开通云开发环境。\n2.  复制你的 **环境ID (Env ID)**。\n3.  打开 `miniprogram/envList.js` (如果不存在请创建)，配置你的环境ID：\n    ```javascript\n    const envList = [{\"envId\":\"你的环境ID\",\"alias\":\"prod\"}]\n    const isMac = false\n    module.exports = {\n      envList,\n      isMac\n    }\n    ```\n\n### 4. 部署云函数 (Deploy Backend)\n本项目核心逻辑依赖云函数，请务必执行以下操作：\n1.  在开发者工具文件列表中，右键点击 `cloudfunctions` 文件夹。\n2.  选择当前环境。\n3.  **核心步骤**：依次右键点击以下文件夹，选择 **“上传并部署：云端安装依赖”**：\n    * `init_app_config` (初始化配置)\n    * `init_db` (数据库初始化)\n    * `init_avatar_data` (头像数据初始化) \u003cspan style=\"color:red\"\u003e\u003csup\u003eIMPORTANT\u003c/sup\u003e\u003c/span\u003e\n    * `init_destinations` (旅行地点初始化)\n    * `init_task_pool` (任务/问答/彩蛋池初始化)\n    * `user_center` (用户中心核心业务)\n    * `get_daily_mission` (任务系统)\n    * *以及其他所有云函数文件夹...*\n\n### 5. 数据库初始化 (Database Init)\n为了让小程序跑起来，你需要初始化数据库集合：\n1.  在云函数部署完成后，建议先调用一次 `init_db` 云函数创建所有基础表。\n2.  **数据导入**：务必依次调用以下云函数以加载初始数据：\n    * `init_avatar_data` (加载情头数据)\n    * `init_destinations` (加载旅行地点)\n    * `init_task_pool` (加载任务、问答和彩蛋配置)\n\n---\n\n## 📂 目录结构说明 (Directory Structure)\n\n```text\nour-memory/\n├── cloudfunctions/        # 云函数\n│   ├── init_db/           # 数据库结构初始化\n│   ├── init_avatar_data/  # 头像数据初始化\n│   ├── init_destinations/ # 旅行地点初始化\n│   ├── init_task_pool/    # 任务/问答/彩蛋池初始化\n│   ├── user_center/       # 核心业务逻辑 (Auth, Pet, Market, etc.)\n│   └── ...\n├── miniprogram/           # 小程序前端\n│   ├── pages/             \n│   │   ├── index/         # 首页\n│   │   ├── pet/           # 萌宠养成\n│   │   ├── avatar_list/   # [NEW] 情侣头像列表\n│   │   ├── avatar_detail/ # [NEW] 头像详情页\n│   │   ├── coupons/       # 恋爱兑换券\n│   │   ├── travel_map/    # 旅行地图\n│   │   └── ...\n│   └── envList.js         # 环境配置\n└── project.config.json    # 项目配置文件\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinston-wwzhen%2Four-memory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinston-wwzhen%2Four-memory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinston-wwzhen%2Four-memory/lists"}