This is a gRPC chat service using the following stack:
- Python gRPC server
- React/TS frontend
- DaisyUI Components
- Connect and disconnect users
- Send and receive messages in real-time
- Supports multiple separate conversations
- Allows users to talk to each other
- Conversations can be cached for a limited time or completely ephemeral--deleting after both users disconnect
- Allow for multiple connections and keep them all separate
- Have subscriptions run until disconnected
- Remove group chats
- Remove auto-assign to open rooms
- Route web requests through Envoy proxy
- Change server gRPC channel to be secure; only allow Envoy to connect
- Flesh out front-end gRPC client; add logging + error handling
- Local storage
- Handle timeouts
- Relieve server threads when conversation is gone
- Debug disconnects
-
Clone the repository:
git clone https://github.com/ndoniyor/ephemeral-chat
-
Navigate to the project directory:
cd ephemeral-chat -
Install the required dependencies:
conda env create -f environment.yml
-
Run the server:
python src/serve.py
The server will start listening for connections on
localhost:11912. -
Run the client(s):
python src/connect.py
The server provides the following gRPC methods:
Connect(ChatUser) -> ChatUserConnected: Connect a user to the chat server.Disconnect(ChatUser) -> ChatUserConnected: Disconnect a user from the chat server.SendMessage(Message) -> Empty: Sends a message to the serverSubscribeMessages(ChatUser) -> stream Message: Subscribe a user to receive messages.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.