How smabbashussain/inklink works
InkLink is a collaborative whiteboard product with a Flutter client, Firebase callable backend, and Socket.IO relay. Its principal documented workflow is clients synchronizing board activity through the relay, with version history reconstructed and reverted from live and archived operations; callable functions handle access, collaboration, and AI-related operations. The supplied tree omits the Flutter source, and the relay excerpt is partial, so client internals and several runtime connections are represented only where the README or shown references support them.
Main entry points: functions/index.js Callable dispatcher · src/index.js Socket relay · notification_sender.js Notification sender · timeline.js History timeline
Components 24
Realtime collaboration
- Socket relay
server/src/index.js - Board chat
server/src/index.js - Voice signaling
server/src/index.js
History and recovery
- History relay handlers
server/src/index.js - State reconstruction
server/src/history/reconstruct.js - History timeline
server/src/history/timeline.js - Revert engine
server/src/history/revert.js - Change descriptions
server/src/history/describe.js
Callable backend
- Callable dispatcher
functions/index.js - Board access
functions/src/boards - Workspace access
functions/src/workspaces - Friend relations
functions/src/friends - Board invitations
functions/src/invitations - Notifications
functions/src/notifications - AI image tools
functions/src/ai - Profile and accounts
functions/src/profile
Shared infrastructure
- Redis sync buffer
functions/src/utils/redis.js - Firestore
- History archive
server/src/history/r2.js - Firebase Admin
functions/server/firebase-admin.js - Firestore paths
functions/src/utils/firestore_paths.js - Notification sender
functions/src/utils/notification_sender.js - R2 history utility
functions/src/utils/r2_history.js
Other components
- Collaborators
Connections 37
- Collaborators → Socket relay: syncs boards
- Collaborators → Callable dispatcher: requests operations
- Socket relay → Redis sync buffer: buffers sync
- Socket relay → Firestore: reads board state
server/src/index.js - Socket relay → Board chat: relays chat
server/src/index.js - Socket relay → Voice signaling: signals calls
server/src/index.js - Socket relay → History relay handlers: routes history
server/src/index.js - History relay handlers → State reconstruction: reconstructs state
server/src/index.js - History relay handlers → History timeline: builds timeline
server/src/index.js - History relay handlers → Revert engine: applies reverts
server/src/index.js - History relay handlers → History archive: archives operations
server/src/index.js - State reconstruction → History archive: loads archived blocks
server/src/history/reconstruct.js - History timeline → State reconstruction: replays operations
server/src/history/timeline.js - History timeline → Revert engine: uses revert logic
server/src/history/timeline.js - History timeline → Change descriptions: describes changes
server/src/history/timeline.js - Revert engine → State reconstruction: replays state
server/src/history/revert.js - Revert engine → History archive: reads archived ops
server/src/history/revert.js - Callable dispatcher → Board access: loads handlers
functions/index.js - Callable dispatcher → Workspace access: loads handlers
functions/index.js - Callable dispatcher → Friend relations: loads handlers
functions/index.js - Callable dispatcher → Board invitations: loads handlers
functions/index.js - Callable dispatcher → Notifications: loads handlers
functions/index.js - Callable dispatcher → AI image tools: loads handlers
functions/index.js - Callable dispatcher → Profile and accounts: loads handlers
functions/index.js - Friend relations → Firebase Admin: uses Firebase
functions/src/friends/accept_friend_request.js - Friend relations → Firestore paths: uses path constants
functions/src/friends/accept_friend_request.js - Friend relations → Notification sender: sends notifications
functions/src/friends/accept_friend_request.js - Board access → Notification sender: sends notifications
functions/src/boards/respond_to_board_access_request.js - Board access → Redis sync buffer: updates board cache
functions/src/boards/respond_to_board_access_request.js - Board invitations → Notification sender: sends notifications
functions/src/invitations/accept_board_invite.js - Notifications → Notification sender: sends notifications
functions/src/notifications/send_board_invite.js - Notification sender → Firebase Admin: sends push
functions/src/utils/notification_sender.js - Notification sender → Firestore paths: uses path constants
functions/src/utils/notification_sender.js - Profile and accounts → R2 history utility: purges archived data
functions/src/profile/delete_user_account.js - Profile and accounts → Redis sync buffer: clears board state
functions/src/profile/delete_user_account.js - Profile and accounts → Firestore paths: uses path constants
functions/src/profile/delete_user_account.js - AI image tools → R2 history utility: stores generated images