My_IRC is a modern IRC-style chat application inspired by xat.com, built with a Node.js/Express backend, React frontend, and packaged as a desktop app using Electron. It offers real-time messaging, channel management, private messages, IRC commands, emoji support, and a nostalgic design with grey tabs and a background2.gif backdrop. Data is stored in memory, and the backend runs separately from the frontend and Electron app.
- Authentication: Users set a username and receive a random emoji (e.g., 😺).
- Channels: Create (
/create), join (/join), leave (/leave), and delete (/delete) channels, with auto-deletion of inactive channels after 5 minutes. - Messaging: Send public messages in channels and private messages (
/msg) to specific users. - IRC Commands: Supports
/nick,/list,/users,/msgfor user and channel management. - Notifications: Red asterisk (*) on tabs indicates unread messages.
- Design: xat.com-inspired UI with grey tabs, white messages on
background2.gif, and an emoji picker. - Desktop App: Electron integration for a cross-platform desktop experience (Windows, macOS, Linux).
my_irc/
├── index.js # Backend (Node.js, Express, Socket.IO)
├── main.js # Electron configuration
├── package.json # Backend and Electron dependencies
├── client/
│ ├── src/
│ │ ├── App.js # React frontend
│ │ ├── App.css # xat.com-inspired styles
│ ├── public/
│ │ ├── background2.gif # Background image
│ ├── package.json # Frontend dependencies
- Node.js (v16 or higher)
- npm (v8 or higher)
- A modern web browser for testing the web version
- Windows, macOS, or Linux for the desktop app
-
Clone the Repository:
git clone https://github.com/nmap-p4ris/myirc cd my_irc -
Install Backend Dependencies:
npm install
-
Install Frontend Dependencies:
cd client npm install -
Verify Assets:
- Ensure
background2.gifis inclient/public/. - Optionally, add a
favicon.icoinclient/public/for the Electron app icon.
- Ensure
Run the backend, frontend, and Electron app in separate terminals.
-
Start the Backend (runs on
http://localhost:3001):cd my_irc npm start -
Start the Frontend (runs on
http://localhost:3000):cd my_irc/client npm start -
Start the Electron App:
cd my_irc npm run electron
-
Build the Frontend (optional, for static build):
cd my_irc/client npm run build- Update
main.jsto load the static build:win.loadFile(path.join(__dirname, "client/build/index.html"));
- Update
-
Package the App:
cd my_irc npm run dist- Generates executables in
my_irc/dist/(e.g.,My_IRC.exefor Windows).
- Generates executables in
-
Run the Executable:
- Start the backend (
npm start). - Run the generated executable (e.g.,
dist/My_IRC.exe).
- Start the backend (
- Sign In: Enter a username to join the default channel (
General) with a random emoji. - Channels: Use
/create <channel>,/join <channel>,/leave <channel>, or/delete <channel>to manage channels, or use the UI (dropdown, buttons, tab close). - Messaging: Send public messages in channels or private messages via
/msg <username> <message>or the private message section. - Notifications: Tabs with unread messages show a red asterisk (*).
- Emojis: Use the emoji picker (😊 button) to add emojis to messages.
- Commands: Try
/nick <newname>,/list,/users <channel>for additional functionality.
- Electron Window Blank:
- Ensure the frontend is running (
localhost:3000). - Check the console:
npm run electron -- --enable-logging.
- Ensure the frontend is running (
- Socket.IO Connection Issues:
- Verify the backend is running (
localhost:3001).
- Verify the backend is running (
- Background Image:
- Confirm
background2.gifis inclient/public/orclient/build/static/media(for static build).
- Confirm
- Packaging Issues:
- Ensure
client/buildexists for static builds. - Verify
electron-builderis installed (npm install electron-builder --save-dev).
- Ensure
- Add desktop notifications for new messages.
- Implement password-based authentication.
- Customize the Electron window (e.g., remove menu bar, add custom icon).
- Bundle the backend into the Electron app for a standalone experience.
Paduraru Stefan-Paris