I recently built a system that lets you send and receive Discord messages directly inside a Chrome Extension — without needing to switch to the Discord app. It uses Node.js + Discord.js for backend handling, and Ngrok for exposing local servers. The frontend handles real-time updates, read/unread message logic, and scroll-triggered UI behavior.
Currently, I run a local Node server to handle Discord bot events and webhooks.
My next goal:
- Move the backend logic fully into the Chrome Extension,
or - Connect to a cloud-hosted server (e.g., Firebase Functions, AWS Lambda, etc.)
to eliminate the need to runnode server.js
every time.
My goal is to make this feel fully integrated and lightweight — no terminal needed.
Project Overview
- UI built with
popup.html
,popup.js
, andstyles.css
- Server logic isolated in
/server/server.js
and exposed via Ngrok - Uses webhook + bot combo for 2-way messaging
My Question
Is there a best-practice way to embed backend-like logic into a Chrome Extension (e.g., using Service Workers or background scripts)?
Or, what are efficient cloud deployment strategies (serverless, free-tier friendly) you recommend for low-latency Discord integrations?