Open-source self-hosted WeChat Mini Program for one cohabiting couple. The first supported deployment target is Docker Compose on Orange Pi.
apps/api: Fastify API, SQLite database, setup flow, health checks.apps/miniprogram: WeChat Mini Program source.packages/shared: Shared TypeScript contracts.
From the repository root:
corepack pnpm install
corepack pnpm local:readyThe API will be available at:
http://127.0.0.1:3000
Open the Mini Program project in WeChat DevTools:
apps/miniprogram
The Mini Program defaults to http://127.0.0.1:3000 in local development. Use the Settings page if you need to switch to a LAN IP.
local:ready also generates the JavaScript files used by WeChat DevTools from the TypeScript sources. If you only changed Mini Program code later, rerun:
corepack pnpm --filter @couple-life/miniprogram buildTo stop the local API:
corepack pnpm local:stoppnpm install
pnpm test
pnpm typecheck
pnpm dev:apiTo reset the local SQLite database with readable demo data:
corepack pnpm --filter @couple-life/api seed:demoWith the API running, verify the local V1 walkthrough:
corepack pnpm verify:localAPI data routes are open by default for local development. Set API_TOKEN in
deployment environments to require x-couple-api-token or
Authorization: Bearer <token> on /api/* requests.
The API defaults to local-only assistant summaries. To enable a model provider, configure:
LLM_PROVIDER=openai-compatible
LLM_BASE_URL=https://api.openai.com/v1
LLM_API_KEY=your-key
LLM_MODEL=gpt-4o-mini
LLM_REQUEST_TIMEOUT_MS=60000For Ollama:
LLM_PROVIDER=ollama
OLLAMA_BASE_URL=http://127.0.0.1:11434
LLM_MODEL=qwen2.5:7bThe Mini Program AI page and Settings page show /api/assistant/status, so you can confirm whether the current backend is using local summaries, an OpenAI-compatible endpoint, or Ollama without exposing the API key.
Copy deploy/env.example to deploy/.env, edit the values, then run:
docker compose --env-file deploy/.env -f deploy/docker-compose.yml up -d