UDPChat-AI is a secure, real-time chat system that uses a custom UDP-based protocol enhanced with modern cryptography. It supports secure messaging, user sessions, and AI-generated responses through a modular three-part architecture:
client/ → Frontend React app (chat interface)
connector/ → Node.js bridge (WebSocket ↔ UDP)
server/ → Python backend (UDP server + AI logic)
deploy/ → Terraform + Helm + scripts for AKS deploys
- Secure Messaging: All communication uses AES-GCM encryption over a custom UDP protocol.
- AI-Powered Chat: Optionally allows AI-generated responses using OpenAI or Ollama backends.
- Session Management: RSA handshake with AES session key, fingerprint verification, and session resumption.
- Chat Rooms: Join, create, and chat in rooms with live member lists and message history.
- Bridged Access: WebSocket-to-UDP bridge enables frontend to communicate with the backend securely.
- Server (Python)
- Connector (Node.js)
- Client (React)
- Terraform
- Deploy Scripts
- GitHub Actions
- Helm Charts
- Dockerfiles
- Kubernetes Manifests
To run the project, you need to set up three components: the server (Python), the connector (Node.js), and the client (React). Each component has its own directory with a README file for detailed instructions. Before running the project, ensure you have python3, Node.js, and npm installed on your system. You can check if you have them installed by running:
python3 --version
node --version
npm --versionIf you don't have them installed, you can download and install them from their official websites:
The server is built using Python and requires a few dependencies. You can set up the server by following these steps:
- Navigate to the
serverdirectory. - Create a virtual environment and activate it:
cd server python3 -m venv venv # Create a virtual environment source venv/bin/activate # Activate the virtual environment
- Install the required dependencies:
pip install -r requirements.txt
- Create a
.envfile based on the.env.samplefile and set your OpenAI key or local Ollama setup. - Initialize the database:
python main.py init_db
- Start the server:
python main.py start
The connector is a Node.js application that acts as a bridge between the WebSocket frontend and the UDP server. To set it up, follow these steps:
- Navigate to the
connectordirectory. - Install the required dependencies:
cd connector npm install - Create a
.envfile based on the.env.samplefile and set your server's IP address and port. - Start the connector:
npm run dev
The client is a React application that provides the chat interface. To set it up, follow these steps:
- Navigate to the
clientdirectory. - Install the required dependencies:
cd client npm install - Create a
.envfile based on the.env.samplefile and set your connector's WebSocket URL. - Start the client:
npm run dev- Open your browser and navigate to the client URL to access the chat interface.
Andrej Kudriavcev
Licensed under the MIT License.