dchat

command module
v2.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2025 License: MIT Imports: 22 Imported by: 0

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:

  1. Automatic Discovery - Finds peers via IPFS bootstrap nodes
  2. NAT Traversal - Works behind routers and firewalls
  3. Encrypted Transport - All connections are secure
  4. Gossip Protocol - Messages spread efficiently across the network
  5. 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
  1. Choisir option 1 : Créer un nouveau compte
  2. Entrer votre nom d'utilisateur (3-20 caractères, sans espaces)
Se connecter
  1. Choisir option 2 : Se connecter
  2. 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:8080 ou 203.45.67.89:8080
  • Taper done pour terminer
3. Envoyer des messages
  • Taper votre message et appuyer sur Entrée
  • Taper /quit pour quitter le chat

🌐 Connexions Internet

Pour chatter avec quelqu'un à l'autre bout du monde :

⚠️ IMPORTANT : Configuration réseau nécessaire

  1. Ouvrir le port dans votre routeur/firewall (port forwarding)
  2. Connaître votre IP publique : curl ifconfig.me
  3. 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

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL