|
| 1 | +# Temoa Web GUI |
| 2 | + |
| 3 | +A modern web-based interface for the Temoa (Tools for Energy Model Optimization and Analysis) Energy System Model. |
| 4 | + |
| 5 | +## Philosophy |
| 6 | + |
| 7 | +The Temoa Web GUI is designed with a hybrid architecture: |
| 8 | +- **Local Backend**: Computational heavy lifting and model execution occur on your local machine via a Python backend. This ensures you maintain full control over your data and compute resources. |
| 9 | +- **Shared Interface**: A high-performance web-hosted frontend provides a consistent, rich user experience across different platforms while communicating with your local backend. |
| 10 | + |
| 11 | +## Key Features |
| 12 | + |
| 13 | +- **Intuitive Model Configuration**: Easily set up Temoa runs with a user-friendly interface. |
| 14 | +- **Real-time Progress Monitoring**: Track model execution through streaming logs and status updates. |
| 15 | +- **Interactive Results Visualization**: Explore model outputs with integrated network maps and data tables. |
| 16 | +- **Database Exploration**: Built-in integration with Datasette for inspection of SQLite results. |
| 17 | + |
| 18 | +## Prerequisites |
| 19 | + |
| 20 | +- **Python 3.12+** |
| 21 | +- **uv** (high-performance Python package manager, recommended) |
| 22 | +- **Node.js & npm** (only required for the development path) |
| 23 | + |
| 24 | +## Getting Started |
| 25 | + |
| 26 | +There are two primary ways to set up and run the Temoa Web GUI. |
| 27 | + |
| 28 | +### Option 1: Standalone Runner (Simplest) |
| 29 | + |
| 30 | +Use this method if you simply want to run the GUI for your own modeling work. |
| 31 | + |
| 32 | +1. **Run directly from GitHub**: |
| 33 | + ```bash |
| 34 | + uv run https://raw.githubusercontent.com/TemoaProject/temoa-web-gui/main/temoa_runner.py |
| 35 | + ``` |
| 36 | +2. **Alternatively, run locally**: |
| 37 | + Download [temoa_runner.py](temoa_runner.py) and run: |
| 38 | + ```bash |
| 39 | + uv run temoa_runner.py |
| 40 | + ``` |
| 41 | + The script automatically manages its own dependencies, downloads necessary assets, and launches both the API backend and the Datasette results explorer. |
| 42 | +3. **Access the GUI**: Open [https://interface.temoaproject.org/](https://interface.temoaproject.org/) in your web browser to interact with your local backend. |
| 43 | + |
| 44 | + |
| 45 | +### Option 2: Development Path |
| 46 | + |
| 47 | +Use this method if you intend to contribute to the project or customize the frontend. |
| 48 | + |
| 49 | +1. **Clone the Repository**: |
| 50 | + ```bash |
| 51 | + git clone https://github.com/TemoaProject/temoa-web-gui.git |
| 52 | + cd temoa-web-gui |
| 53 | + ``` |
| 54 | +2. **Setup Backend**: |
| 55 | + ```bash |
| 56 | + uv sync |
| 57 | + ``` |
| 58 | +3. **Setup Frontend**: |
| 59 | + ```bash |
| 60 | + cd frontend |
| 61 | + npm install |
| 62 | + ``` |
| 63 | +4. **Run Everything**: |
| 64 | + Use the provided convenience script from the project root: |
| 65 | + ```bash |
| 66 | + ./run.sh |
| 67 | + ``` |
| 68 | + |
| 69 | +## Project Structure |
| 70 | + |
| 71 | +- `backend/`: FastAPI application handling model execution and data management. |
| 72 | +- `frontend/`: Vite-powered React application (interface). |
| 73 | +- `temoa_runner.py`: A single-file entry point that acts as a standalone backend + API launcher. |
| 74 | +- `assets/`: Default databases and configuration templates. |
| 75 | +- `output/`: Default directory for model run results and log files. |
| 76 | + |
| 77 | +## License |
| 78 | + |
| 79 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
0 commit comments