This project provides a web-based interface for interacting with a Spark cluster and visualizing results.
- Python 3.9+ (recommended: Python 3.11)
- Node.js 18+ (recommended: Node.js 18.19.0 LTS)
- npm 9+
.
├── backend/ # FastAPI backend
│ ├── main.py # Main application entry
│ └── requirements.txt
└── frontend/ # React.js frontend
├── src/
│ └── App.jsx
└── package.json
-
Create a Python virtual environment:
cd backend python -m venv venv # On Windows .\venv\Scripts\activate # On Unix/MacOS source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the backend server:
uvicorn main:app --reload
The backend will be available at http://localhost:8000
-
Install dependencies:
cd frontend npm install -
Start the development server:
npm start
The frontend will be available at http://localhost:3000
- FastAPI backend with WebSocket support
- React.js frontend with data visualization capabilities
- Real-time data updates using WebSocket
- Cross-Origin Resource Sharing (CORS) enabled
- The backend uses FastAPI with Uvicorn for high performance
- Frontend visualization is handled by Plotly.js
- WebSocket support is included for real-time data updates
- CORS is configured to allow frontend-backend communication