This project is a backend application that powers a real-time terminal interface using Django and Django Channels. The primary purpose is to allow users to interact with a terminal via WebSocket communication, which can be used in various scenarios like remote command execution or real-time monitoring.
- Real-Time WebSocket Communication: Provides real-time interaction capabilities using Django Channels and WebSockets.
- Scalable and Efficient: Handles multiple users and terminal sessions concurrently with minimal latency.
- Extensible Backend: Can be easily integrated with different frontends or expanded to include additional functionality.
- Django: A robust Python web framework that simplifies the development of complex web applications.
- Django Channels: Extends Django to handle asynchronous protocols such as WebSockets, enabling real-time features.
- Daphne: An ASGI server used to serve your Django Channels application.
- Django Test Framework: For creating and running tests within the Django ecosystem.
- Python 3.10+
-
Clone the Repository:
git clone https://github.com/xSerioUsx78/real-time-terminal.git cd realtime-terminal-backend -
Set Up a Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install Dependencies:
pip install -r requirements.txt
-
Configure Environment Variables:
Create a
.envfile in the project src folder and add the necessary environment variables:SECRET_KEY=your-secret-key SSH_HOST=your-host SSH_USER=your-user SSH_PASS=your-pass SSH_PORT=your-port
-
Apply Migrations:
python manage.py migrate
-
Start the Development Server:
python manage.py runserver
To run tests and ensure everything is working as expected:
python manage.py test