README
¶
💬 dChat - Global P2P Chat
Author: Mahamed Muse
Project: dChat
GitHub: dchat
Date: August 2025
🌍 Chat with Anyone in the World Instantly!
dChat is a zero-setup, peer-to-peer chat application that connects you to a global network of users. No servers, no registration, no configuration needed!
✨ Key Features
- 🌍 Global Network - Connect to users worldwide instantly
- 🚀 Zero Setup - No ports to open, no IP addresses to share
- 🏠 Chat Rooms - Create and join topic-based rooms
- 📨 Private Messages - Secure 1-on-1 conversations
- 🔒 Fully Encrypted - All communications are secure
- 🚫 No Servers - Completely decentralized
- 🌐 International - Full UTF-8 support + emojis
- ⚡ NAT Traversal - Works behind firewalls automatically
🚀 Quick Start (30 seconds)
One-Line Install
Linux/macOS:
curl -sSL https://raw.githubusercontent.com/musem23/dchat/main/install.sh | bash
Windows PowerShell:
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/musem23/dchat/main/install-windows.ps1" -UseBasicParsing | Invoke-Expression
With Go (all platforms):
go install github.com/musem23/dchat/v2@latest
Launch Global Chat
dchat -p2p
That's it! You're now connected to users worldwide! 🌍
💬 How to Use
Global Chat
- Just type and press Enter to send messages to everyone
- Your messages reach users worldwide instantly
Private Messages
/dm username Hey there!
Chat Rooms
/create MyRoom Welcome to my room! # Create a room
/join TechTalk # Join existing room
/room TechTalk # Switch to room
Other Commands
/users # See who's online
/rooms # List your rooms
/help # Full command list
/quit # Exit
�️ How It Works
dChat uses libp2p technology (the same used by IPFS) to create a global, decentralized network:
- Automatic Discovery - Finds peers via IPFS bootstrap nodes
- NAT Traversal - Works behind routers and firewalls
- Encrypted Transport - All connections are secure
- Gossip Protocol - Messages spread efficiently across the network
- No Central Authority - Fully peer-to-peer
Network Architecture
🌍 Global P2P Network
├── 🖥️ You (anywhere in the world)
├── � Other dChat users (worldwide)
├── 📡 IPFS Bootstrap Nodes (discovery)
└── 🔒 Encrypted Connections (secure)
Windows (PowerShell)
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/musem23/dchat/main/install.ps1" -UseBasicParsing | Invoke-Expression
🛠️ Autres Méthodes
Via Go (Développeurs)
go install github.com/musem23/dchat/v2@latest
Via NPM (Utilisateurs Node.js)
npx dchat-install
Via Docker
docker run -it -p 8080:8080 musem23/dchat:latest
Via Homebrew (macOS)
brew tap musem23/dchat
brew install dchat
📖 Guide d'installation complet
Option 3 : Compilation manuelle
git clone https://github.com/musem23/dchat.git
cd dchat
go build -o dchat
./dchat -cli
👤 Première utilisation
Créer un compte
- Choisir option 1 : Créer un nouveau compte
- Entrer votre nom d'utilisateur (3-20 caractères, sans espaces)
Se connecter
- Choisir option 2 : Se connecter
- Entrer votre nom d'utilisateur
💬 Démarrer une conversation
1. Démarrer le chat
- Choisir option 1 : Démarrer le chat
- Entrer un port (ex: 8080) - Le programme écoute maintenant sur toutes les interfaces
2. Se connecter à un autre utilisateur
- Répondre y pour se connecter à d'autres nœuds
- Entrer l'adresse du destinataire :
- Local :
localhost:8081 - Même réseau :
192.168.1.10:8081 - Internet :
mon-ami.example.com:8080ou203.45.67.89:8080
- Local :
- Taper done pour terminer
3. Envoyer des messages
- Taper votre message et appuyer sur Entrée
- Taper
/quitpour quitter le chat
🌐 Connexions Internet
Pour chatter avec quelqu'un à l'autre bout du monde :
⚠️ IMPORTANT : Configuration réseau nécessaire
- Ouvrir le port dans votre routeur/firewall (port forwarding)
- Connaître votre IP publique :
curl ifconfig.me - Partager votre adresse :
VOTRE_IP_PUBLIQUE:8080
Exemple complet Internet
Alice (France) :
./dchat cli
# 1. Créer compte "alice"
# 2. Port 8080
# 3. IP publique: 203.45.67.89
# 4. Partager: 203.45.67.89:8080
Bob (Japon) :
./dchat cli
# 1. Créer compte "bob"
# 2. Port 8081
# 3. Se connecter à Alice: 203.45.67.89:8080
📋 Exemple local (même réseau)
Utilisateur 1 :
./dchat cli
# 1. Créer compte "alice"
# 2. Port 8080
Utilisateur 2 :
./dchat cli
# 1. Créer compte "bob"
# 2. Port 8081
# 3. Se connecter à Alice: localhost:8080
⚡ Autres fonctions
- Option 2 : Gérer mes contacts
- Option 3 : Voir tous les utilisateurs
- Option 4 : Mon profil
- Option 5 : Se déconnecter
Prêt à chatter mondialement ! 🌍🎉
Documentation
¶
There is no documentation for this package.
Click to show internal directories.
Click to hide internal directories.