This project is a Flask-based web application that provides a simple user interface to run and monitor a background controller process. The controller process is executed in a separate thread and its output is streamed in real time to the UI using Server-Sent Events (SSE).
- Start Controller Process: Launch the controller process with a single click. The process runs in the background.
- Live Log Streaming: View real-time logs generated by the controller process.
- Responsive UI: The interface uses CSS for styling and is mobile-friendly.
-
Clone the Repository:
git clone <repository_url> cd AlignmentSystemUI
-
Create and Activate a Virtual Environment (optional but recommended):
python -m venv .venv .venv\Scripts\activate # On Windows source .venv/bin/activate # On macOS/Linux
-
Install Dependencies:
This project requires Flask. Install it using pip:
pip install flask
-
Start the Flask Application:
Run the application by executing the following command in your terminal:
python app.py
-
Access the UI:
Open your web browser and navigate to
http://127.0.0.1:5000/to view the main page.
Click the Start controller button on the home page to run the controller process.
In the controller view page, click Show Logs to view live output from the process.
- The main Flask application (
app.py) uses threading to runcontroller.pyas a background process. - The output of the controller process is collected and stored in a shared log buffer.
- An SSE (Server-Sent Events) endpoint (
/stream) streams the log data to the browser, where client-side JavaScript updates the log view in real time.
- Virtual Environment Issues: Make sure you have activated the virtual environment if you are using one.
This project is provided as-is, without any warranty. You are free to modify and distribute it for your own use.
- Developed using Flask.
- Styled with a custom CSS file.
Happy coding!