Skip to content

Installation & Setup

Dhruv Haldar edited this page Jun 5, 2026 · 2 revisions

You have two options: Download a pre-built binary (easiest) or build from source using the automated installer.

Option 1: Build from Source (Automated)

Clone the repository and run the installer script. This will automatically check for and attempt to install dependencies (Python, Node.js, pnpm), build the frontend, and start the app.

Windows
# 1. One-time setup and build
.\install.ps1

# 2. Run the application
.\run.ps1

Warning

If you get an error stating that "cannot be loaded because running scripts is disabled on this system", run the script with the bypass flag: powershell -ExecutionPolicy Bypass -File .\install.ps1

Linux / macOS
git clone https://github.com/dhruvhaldar/FOAMFlask
cd FOAMFlask
chmod +x install.sh
./install.sh

Tip

After running the automated installer, if the uv command is not recognized, you may need to restart your terminal or add the local bin directory to your PATH:

  • Windows: $env:USERPROFILE\.local\bin
  • Linux/macOS: ~/.local/bin

Option 2: Manual Installation (Developers)

If you prefer to manage the environment yourself:

  1. Install Prerequisites: Python 3.12+, Node.js 20+, pnpm 8+, and Docker.
  2. Install Frontend:
    pnpm install
    pnpm run build
  3. Install Backend:
    uv sync

Stage 2 : Run FOAMFlask (Frontend and Backend)

Windows

# Run the application after installation
.\run.ps1

Linux / macOS

uv run python -m app 2>&1 | tee app.log
pkill -f "uv run python -m app"; sleep 1; uv run python -m app > app_output.log 2>&1 &

Prerequisites: List required software (e.g., Python 3.x, OpenFOAM 2506 compatibility, Node.js if relevant for future frontend work).

Virtual Environment Setup: The detailed Linux and Windows instructions for venv creation and activation.

Dependency Installation: Installing requirements.txt.

Setting up OpenFOAM Root: How the application links to the local OpenFOAM installation.

Clone this wiki locally