Prerequisites
Before you begin, ensure you have:- Python 3.10 or 3.11 (recommended for best compatibility)
- pip package manager
- Terminal access (macOS/Linux) or PowerShell (Windows)
Quick Start
The fastest way to get started is using the automated run scripts included in the project.Install dependencies
Flask>=3.0,<4.0- Web server frameworkzeroc-ice>=3.7,<3.8- ZeroC Ice RPC middleware
Open the web interface
Navigate to http://localhost:5000 in your browser.
Your First Conversion
Let’s convert 100°C to Fahrenheit:Available Conversion Categories
Temperature
Units: Celsius (°C), Fahrenheit (°F), Kelvin (K)Example: 0°C → 32°F
Length
Units: Meters (m), Kilometers (km), Miles (mi), Feet (ft)Example: 1 mi → 1.609 km
Weight
Units: Kilograms (kg), Pounds (lb), Grams (g)Example: 70 kg → 154.324 lb
Velocity
Units: km/h (kmh), mph (mph), m/s (ms)Example: 120 kmh → 74.565 mph
Testing the API Directly
The Flask server exposes REST endpoints you can test with curl:Convert Units
Get Available Units
Check Server Status
Using the Terminal Client
Test the ICE server directly without the web interface:The client directly invokes the ICE server methods defined in
backend/Conversor.ice and implemented in backend/server.py:27-129.Features to Explore
Swap Units
Click the swap button () to instantly exchange source and destination units.Conversion History
Your last 5 conversions appear in the Recientes section. Click any history item to reload that conversion.Theme Switching
Choose between Auto, Dark, and Light themes in the top-right selector.Remote Access (Optional)
If you answereds when running the script, ngrok creates a public URL:
Stopping the Application
PressCtrl+C in the terminal where you ran the script. The cleanup handler automatically stops both servers:
Troubleshooting
Port 10000 or 5000 already in use
Port 10000 or 5000 already in use
Check what’s using the ports:Kill the process or change ports using environment variables (see Installation guide).
Web interface shows 'Error (sin conexión)'
Web interface shows 'Error (sin conexión)'
The Flask server can’t reach the ICE server. Verify:
- ICE server is running:
ps aux | grep server.py - Port 10000 is listening
- Both servers started successfully
zeroc-ice installation fails
zeroc-ice installation fails
Ensure you’re using Python 3.10 or 3.11:Create a fresh virtual environment and try again.
Frontend changes don't appear
Frontend changes don't appear
Hard refresh your browser:
- Windows:
Ctrl+F5 - macOS:
Cmd+Shift+R
Next Steps
Installation
Detailed setup guide with manual control and configuration options
Architecture
Learn how ZeroC Ice RPC connects the backend and frontend
API Reference
Complete endpoint documentation with examples
Development
Modify the ICE interface and regenerate stubs