feat: enhance Appwrite integration and chat functionality

- Added support for encrypted coach chats with a new `coach_chats` collection in the Appwrite database.
- Updated `.env.example` to include `OLLAMA_API_KEY`, `OLLAMA_MODEL`, and `APPWRITE_API_KEY` for server-side configurations.
- Introduced a setup script in `package.json` for initializing Appwrite database tables.
- Enhanced the Vite configuration to proxy requests to the Ollama API.
- Updated the main application structure to accommodate new chat features and improved theme management.
- Refined CSS styles for better UI consistency and added new components for chat functionality.
This commit is contained in:
Ned Halksworth
2026-05-22 22:39:38 +01:00
committed by Ned
parent bd3e970286
commit 08372febfe
12 changed files with 1845 additions and 388 deletions
+13
View File
@@ -2,8 +2,21 @@ VITE_APPWRITE_ENDPOINT=https://fra.cloud.appwrite.io/v1
VITE_APPWRITE_PROJECT_ID=6a0752ee001fb2ef7138
VITE_APPWRITE_DATABASE_ID=redbull_tracker
VITE_APPWRITE_COLLECTION_ID=intake_entries
VITE_APPWRITE_CHAT_COLLECTION_ID=coach_chats
# Optional. Leave blank in local dev so the app uses the current Vite origin,
# including fallback ports like http://127.0.0.1:5174.
VITE_APPWRITE_OAUTH_SUCCESS_URL=
VITE_APPWRITE_OAUTH_FAILURE_URL=
# Server-only. Do not prefix with VITE_ or it will be exposed to the browser.
OLLAMA_API_KEY=
OLLAMA_MODEL=deepseek-v4-pro:cloud
VITE_OLLAMA_PROXY_URL=/api/ollama-chat
# Server/admin only. Never prefix with VITE_. Needed only for npm run setup:appwrite.
APPWRITE_API_KEY=
# Appwrite chat table columns needed for encrypted coach chats:
# userId, encryptedTitle, encryptedMessages, titleIv, messagesIv, salt, updatedAt as strings
# version as integer. Enable row security and Users -> Create at table level.