feat(miniapp): scaffold WeChat mini program MVP

This commit is contained in:
john
2026-07-11 08:46:08 +08:00
parent 32fb2cdeaf
commit 9e5a59b7d9
29 changed files with 948 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
# TKMind WeChat Mini Program
This directory contains the native WeChat Mini Program client. It is intentionally isolated from the H5/backend code so development can proceed without changing existing services.
## Current MVP
- Native WeChat login entry via `wx.login`.
- H5 account/password login fallback through `/auth/login`.
- Chat submission through `/api/agent/runs`.
- Agent run polling through `/api/agent/runs/:runId`.
- Session detail refresh through `/api/sessions/:sessionId`.
- Session list through `/api/sessions`.
- MindSpace page list through `/api/mindspace/v1/pages`.
- Page preview through Mini Program `web-view`.
## Backend Assumptions
The H5 APIs are reused as-is. Native Mini Program login posts the `wx.login` code to `MINIAPP_LOGIN_PATH` in `utils/config.js`; the current default is `/auth/wechat-miniapp/login`. If that backend endpoint is not available yet, use the account/password login fallback during local development.
## Isolation Rule
Mini Program work should stay inside `miniapp/`. Do not modify backend, H5, Memory, MindSpace, or production release files for this MVP unless explicitly approved.