How rocketchat/apps.quickreplies works
Project type and purpose
• This is a Rocket.Chat “App” (plugin) written in TypeScript that implements a Quick Replies feature for customer-support agents. It plugs into the Rocket.Chat Apps Engine and adds slash-commands, modals, buttons, AI-powered suggestions, and persistent storage of canned responses.
File structure
• Root:
• QuickRepliesApp.ts – the entry point (App class registering commands & handlers)
• app.json – metadata for the Rocket.Chat Apps Engine
• src/commands – classes for slash-commands (/quick, /qs)
• src/handlers – event handlers for button clicks, block actions, view submissions, etc.
• src/config – global settings (language, AI toggles)
• src/definition – TypeScript interfaces for commands, handlers, UI elements, storage adapters
• src/lib – helper implementations (BlockBuilder, ElementBuilder, translation loader)
• src/modal – definitions of modal UIs (create/edit/list quick replies, AI reply modal)
• src/storage – concrete storage adapters wrapping Rocket.Chat persistence APIs (AIStorage, ReplyStorage, userPreferenceStorage, etc.)
• i18n & lib/Translation – JSON/TS files providing localized strings
• package.json, tsconfig.json – build and dependency config
Key insights from the README
• The App listens for /quick or /qs commands
• Agents can create, list, configure, and invoke quick replies
• AI integration is optional (via /quick ai)
• Placeholders in replies are replaced at send time
• Deployment is via rc-apps deploy to a Rocket.Chat Server
Elements
• External services: “Rocket.Chat Database”, “External AI Service”
• “/quick, /qs events →” to Commands
• “Modal opens ←” from UI-Kit to user
• “Persist & Retrieve →” from Handlers to Storage → Database
• “AI generate →” from Handler to External AI Service → back
• Green for Rocket.Chat core
• Blue for App internal modules
• Orange for external services