See demo website: sample-chat.onrender.com/
This is a simple chat application demonstration built using Python with the aiohttp framework and HTML/CSS/JavaScript. The application allows real-time communication between users through WebSockets.
- Real-time messaging between connected users
- Responsive web design
- Customizable styling with Tailwind CSS
- Docker containerization for easy deployment
- Python 3.12+
- Node.js and npm
- Docker
- Clone the repository:
git clone https://github.com/yourusername/chat-application.git cd chat-application
- Install dependencies:
2.1 Python packages
- via pip:
pip install -r requirements.txt
- via poetry
poetry install
2.2 CSS framework:
npm install -D tailwindcss
- Build static assets:
npx tailwindcss -i ./src/input.css -o ./src/output.css
Alternatively (linux users) you can use the build.sh file to set up this application.
Run the application using Python:
python app.py
Open a browser and navigate to http://localhost:8080.
Build the Docker image:
docker build -t chat-app .
Run the Docker container:
docker run -d -p 8081:8080 chat-app
Access the application at http://localhost:8081.
- Open the chat application in two separate tabs/windows/devices.
- Type messages in one window and see them appear in both.
- Test sending and receiving messages between clients.
Contributions are welcome! Please feel free to submit issues or pull requests.
This project is licensed under the MIT License - see the LICENSE.md file for details.
