This is a Next.js project bootstrapped with create-next-app.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
Create/update .env.local:
TELEGRAM_BOT_TOKEN=your_botfather_token
WHATSAPP_AUTO_INIT=true
TELEGRAM_STANDUP_TIME=08:00
REMINDER_LLM_PROVIDER=openai-compatible
REMINDER_LLM_BASE_URL=https://api.openai.com/v1
REMINDER_LLM_MODEL=gpt-4.1-mini
REMINDER_LLM_API_KEY=your_api_key
# Optional: {"HTTP-Referer":"https://your-app.example","X-Title":"Recallect"}
REMINDER_LLM_HEADERS_JSON=
# Google birthday import (optional)
GOOGLE_CLIENT_ID=your_google_oauth_client_id
GOOGLE_CLIENT_SECRET=your_google_oauth_client_secret
# Optional, defaults to http://<host>/api/integrations/google/callback
# GOOGLE_OAUTH_REDIRECT_URI=https://your-host/api/integrations/google/callback
# Optional if provider=ollama (model must exist locally)
# REMINDER_LLM_PROVIDER=ollama
# REMINDER_LLM_BASE_URL=http://127.0.0.1:11434
# REMINDER_LLM_MODEL=llama3.1:8b
# Optional tuning
# AUTO_REMINDER_MIN_CONFIDENCE=0.72
# AUTO_REMINDER_RESOLUTION_MIN_CONFIDENCE=0.72
# REMINDER_LLM_MAX_TOKENS=512TELEGRAM_BOT_TOKENenables Telegram auto-connect on server boot.WHATSAPP_AUTO_INIT=truemakes the server auto-start WhatsApp on boot (session is reused fromdata/.wwebjs_authafter first QR scan).TELEGRAM_STANDUP_TIMEsets local daily standup send time inHH:MM(24h).REMINDER_LLM_*configures auto-generated reminder suggestions via@mariozechner/pi-aiand supports multiple providers, including OpenAI-compatible endpoints such as Ollama/vLLM.- If no
REMINDER_LLM_MODELis set, reminders still use deterministic follow-up rules. - New conversations can auto-resolve older pending reminders for the same contact when completion intent is detected (LLM-first with conservative rule fallback).
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETenable Google Contacts birthday import.
Fresh DB (empty, tables only):
mkdir -p data
npm ci
npm run db:pushRestore existing data from your current machine (optional):
# run from your current machine
scp /path/to/recallect/data/recallect.db <mac-mini-user>@<mac-mini-host>:/Users/<mac-mini-user>/www/recallect/data/recallect.dbThen on Mac mini, make sure schema is current:
cd /Users/<mac-mini-user>/www/recallect
npm run db:pushnpm run buildnpm run start:gatewayThis binds the app on 0.0.0.0:3000 so other devices can connect.
Create ~/Library/LaunchAgents/com.recallect.gateway.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.recallect.gateway</string>
<key>WorkingDirectory</key>
<string>/ABSOLUTE/PATH/TO/recallect</string>
<key>ProgramArguments</key>
<array>
<string>/bin/zsh</string>
<string>-lc</string>
<string>npm run start:gateway</string>
</array>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
<key>NODE_ENV</key>
<string>production</string>
</dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/recallect.out.log</string>
<key>StandardErrorPath</key>
<string>/tmp/recallect.err.log</string>
</dict>
</plist>Load it:
launchctl unload ~/Library/LaunchAgents/com.recallect.gateway.plist 2>/dev/null || true
launchctl load ~/Library/LaunchAgents/com.recallect.gateway.plist
launchctl start com.recallect.gatewayCheck status/logs:
launchctl list | rg recallect
tail -f /tmp/recallect.out.log /tmp/recallect.err.logOpen /whatsapp, scan QR once, then LocalAuth persists in data/.wwebjs_auth.
Prefer Tailscale over public port forwarding. Keep this app private; it has no built-in authentication.
- Install Tailscale on Mac mini and your other device.
- Open
http://<mac-mini-tailscale-ip>:3000.
You can manually run auto-reminder generation over existing conversations:
Dry run (default behavior, no DB writes):
curl -X POST http://localhost:3000/api/reminders/backfill \
-H "Content-Type: application/json" \
-d '{"limit":200}'Actually create reminders:
curl -X POST http://localhost:3000/api/reminders/backfill \
-H "Content-Type: application/json" \
-d '{"dryRun":false,"limit":200}'Optional filters:
contactId: only process one contact.fromTimestamp/toTimestamp: ISO timestamps to limit the date window.
Example with filters:
curl -X POST http://localhost:3000/api/reminders/backfill \
-H "Content-Type: application/json" \
-d '{"dryRun":false,"contactId":"<contact-id>","fromTimestamp":"2025-01-01T00:00:00.000Z"}'- In Google Cloud Console, create an OAuth client and set an authorized redirect URI:
http://localhost:3000/api/integrations/google/callback(local dev)
- Add
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETto.env.local. - Open
/reminders, clickConnect, thenImport birthdays.
Birthdays are matched to existing contacts by:
- exact email match first,
- then exact full-name match.
Imported birthdays are stored in important_dates with label="birthday" and recurring=true.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.