This project simulates a 3D printer environment where mock 3D printers generate random data. The real-time data is sent via WebSockets using Python Flask, and a static HTML page with JavaScript consumes and renders the data dynamically.
- Mock 3D Printer class generating random printer data.
- Real-time data transmission through WebSockets.
- HTML and JavaScript frontend for dynamic data rendering.
- Docker Compose for easy deployment.
- Docker and Docker Compose installed.
- Python and virtual environment for local development.
-
Clone the repository:
git clonehttps://github.com/turgaysozen/3d-printer-Simulator cd 3d-printer-simulator
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the Flask application:
python server.py
The application will be accessible at
http://localhost:5000/3d-printer-simulation
.
-
Build and run the Docker containers:
docker-compose up --build
The application will be accessible at
http://localhost:5000/3d-printer-simulation
.
- Visit
http://localhost:5000/3d-printer-simulation
to view the 3D printer simulator dashboard. - Real-time data will be updated and rendered dynamically on the page.