A lightweight, embeddable messaging module for group negotiations and temporary conversations. Built with Node.js and Svelte 5 for easy integration into any application.
- 🏠 Room Management - Create and join chat rooms
- 💬 Real-time Messaging - Instant communication with Socket.IO
- 🤝 Group Negotiation - Built-in voting system for group decisions
- 👥 User Presence - See who's online in each room
- 📱 Responsive Design - Works on desktop and mobile
- 🔧 Easy Integration - Simple component-based architecture
- Node.js 16+
- npm or yarn
-
Install dependencies:
npm run install-all
-
Start development server:
npm run dev
-
Open your browser: Navigate to
http://localhost:5173
import MessagingModule from "./lib/MessagingModule.svelte";
let config = {
serverUrl: "http://your-server.com",
username: "user123",
theme: "modern",
};
function handleClose() {
// Handle module close
}<MessagingModule {config} onClose={handleClose} />| Option | Type | Default | Description |
|---|---|---|---|
serverUrl |
string | http://localhost:3000 |
Backend server URL |
username |
string | Required | User display name |
theme |
string | modern |
UI theme |
├── server/ # Node.js backend
│ └── index.js # Socket.IO server
├── client/ # Svelte 5 frontend
│ ├── src/
│ │ ├── lib/ # Reusable components
│ │ │ ├── MessagingModule.svelte # Main module
│ │ │ ├── RoomList.svelte # Room browser
│ │ │ ├── CreateRoom.svelte # Room creation
│ │ │ └── ChatRoom.svelte # Chat interface
│ │ ├── App.svelte # Demo application
│ │ └── main.js # Entry point
│ └── package.json
└── package.json # Main project config
GET /api/rooms- List all roomsPOST /api/rooms- Create new roomGET /api/health- Server health check
join-room- Join a chat roomsend-message- Send a messagestart-negotiation- Start group negotiationvote- Cast vote on negotiation
message-history- Historical messagesnew-message- New message receiveduser-joined/left- User presence updatesnegotiation-started- Negotiation initiatedvote-cast- Vote registerednegotiation-completed- Negotiation finished
- Project Management - Team decision making
- Community Forums - Group discussions
- Customer Support - Temporary help channels
- Event Planning - Collaborative organization
- E-commerce - Buyer-seller negotiations
# Install all dependencies (server + client)
npm run install-all
# Development mode (both server and client)
npm run dev
# Server only (development)
npm run server:dev
# Client only (development)
npm run client:dev
# Build for production
npm run build
# Start production server
npm start-
Build the client:
npm run build
-
Set environment variables:
export PORT=3000 export NODE_ENV=production
-
Start the server:
npm start
- Input validation on all user messages
- Rate limiting for message sending
- Room size limitations
- No persistent data storage (temporary conversations)
The components use CSS custom properties that can be overridden:
.messaging-container {
--primary-color: #667eea;
--secondary-color: #764ba2;
--background-color: white;
--text-color: #333;
}Extend functionality by modifying the Svelte components in client/src/lib/.
See Competitive Strategy for how this project aligns with Twilio and Africa's Talking (feature parity and patterns) and our edge as an open source, embeddable, self-hosted messaging platform.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - feel free to use in your projects!
- Check the browser console for error messages
- Ensure server is running on the correct port
- Verify Socket.IO connection in network tab
- Test with multiple browser tabs for full functionality
Built with ❤️ using Node.js and Svelte 5