How the Flutter client communicates with Appwrite TablesDB, Auth, Functions, and Storage.
AppwriteConfig reads:
APPWRITE_ENDPOINTAPPWRITE_PROJECT_IDIt declares:
ponder_dbusers, content, saved_items, content_likes, fact_checks, user_fact_check_history, friendships, shares, threads, thread_messagesprofile_imagesfact_check, chat_write, like_syncMissing endpoint or project ID values throw a StateError.
appwrite_service.dart builds one Client and exposes SDK clients through providers:
Account for auth.Databases for legacy profile document paths still present in ProfileService.Functions for executing Appwrite Functions.Storage for profile image upload/delete.In debug builds, the Appwrite client calls setSelfSigned(status: true).
TablesService uses low-level Client.call against TablesDB REST paths. It converts list responses into AppwriteRowList with total and rows.
Supported operations:
listRows(tableId, queries, total, ttl)getRow(tableId, rowId, queries)createRow(tableId, rowId, data, permissions)updateRow(tableId, rowId, data, permissions)deleteRow(tableId, rowId)| Class | Backend access |
| — | — |
| AuthService | Appwrite Account email/password sessions and current user. |
| ProfileService | Legacy Databases document access for profile rows, TablesService for feed tuning, Storage for profile images. |
| SavedContentRepository | saved_items and content through TablesService. |
| FeedRepository | content through TablesService. |
| SearchRepository | content, fact_checks, saved_items, and hydrated content rows. |
| FactCheckRepository | fact_checks, user_fact_check_history, content, and Function fact_check. |
| FriendsService | friendships, users, shares, threads, thread_messages, and Function chat_write. |
| LikeService | content_likes, content, and Function like_sync. |
| PonderDataService | Shared older data access for content, saves, profiles, search, and fact checks. |
Flutter executes functions synchronously with xasync: false and ExecutionMethod.pOST.
FactCheckRepository sends:
{ "claim": "...", "userId": "..." }
FriendsService sends chat action payloads:
getOrCreateThreadpostMessageshareArticleLikeService sends:
{ "contentId": "...", "action": "increment" }
or:
{ "contentId": "...", "action": "decrement" }
The client and functions assign row permissions where row security matters:
ProfileService has feed-tuning fallbacks for missing feedPreferences, boostedTags, or suppressedTags fields. FriendsService and chat_write support both current typed chat rows and older legacy article-share encoding.