Parascope allows users to define complex engineering models using a visual graph interface, where nodes represent parameters, mathematical functions, or entire nested calculation sheets.
- Visual Graph Editor: Intuitive node-based interface built with Rete.js for defining complex engineering logic.
- Python-Powered Calculations: Secure backend execution engine runs Python code with support for
numpy,scipy, andnetworkx. - Nested Sheets: Create reusable calculation modules (sheets) and import them into other sheets as single nodes, enabling modular system design.
- Advanced Trade Studies: Perform parameter sweeps and visualize results with interactive Line, Bar, Scatter, and Timeline charts.
- AI Assistance: Generate function logic from natural language using Google Gemini, OpenAI, or AWS Bedrock.
- Version Control: Create immutable snapshots of calculation sheets and manage default versions for reliable sharing and design stabilization.
- Offline Execution: Export sheets as standalone Python scripts that can be run offline using the
parascope-runtimepackage. - Secure Runtime: Sandboxed execution environment using
RestrictedPythonwith configurable module allow-lists. - High Performance: Optimized worker pool with module preloading and non-blocking architecture for responsive UI interactions.
- Real-time Evaluation: Instant feedback on calculation results as you modify the graph.
- Engineering Examples: Comes pre-seeded with examples like the Tsiolkovsky Rocket Equation, Aerodynamic Drag, and SSTO Feasibility checks.
- Framework: React 19 + TypeScript + Vite
- Graph Library: Rete.js 2.0 (Classic Preset) + elkjs (Auto-layout)
- Visualization: Apache ECharts (2D/3D Charts)
- Styling: CSS Modules, Lucide React (Icons)
- Math Rendering: KaTeX
- Node.js: >= 24
- Package Manager: pnpm
- Framework: FastAPI (Python 3.12)
- Execution: RestrictedPython (Secure Sandbox)
- Scientific Stack: NumPy, SciPy, NetworkX
- AI Integration: google-genai, openai, boto3
- Database: PostgreSQL + asyncpg
- ORM: SQLAlchemy + Alembic
- Runtime: Docker / Docker Compose
- Package Manager: uv
The easiest way to run Parascope is using Docker Compose.
-
Clone the repository:
git clone https://github.com/tokoro10g/parascope.git cd parascope -
Configure the environment: Create a
.envfile from the example.cp .env.example .env
-
Start the application:
docker compose up --build
-
Access the application:
- Frontend: Open http://localhost:3000 in your browser.
- Backend API Docs: Open http://localhost:8000/docs.
For production environments, Parascope provides a optimized Docker configuration using Nginx to serve the frontend and proxy requests to the backend.
docker compose -f docker-compose.prod.yml up --build -dThis configuration:
- Uses a multi-stage build for the frontend to produce a lightweight static bundle.
- Serves the frontend via Nginx on port 80.
- Proxies API requests internally from Nginx to the backend service.
- Runs the backend in a production-optimized mode without hot-reloading.
Parascope allows you to export your calculation sheets as standalone Python scripts. These scripts can be run offline without the Parascope server by using the parascope-runtime package.
- Export the script: Use the "Generate Script" feature in the Parascope UI.
- Install the runtime:
pip install ./packages/parascope-runtime
- Run your script:
python your_exported_script.py
The generated code includes all necessary logic, including nested sheets, which are reconstructed as Python classes.
parascope/
βββ .github/ # CI/CD workflows
βββ backend/ # FastAPI application
β βββ src/
β β βββ api/ # API Routes
β β βββ core/ # Execution engine & config
β β βββ models/ # Database models
β β βββ schemas/ # Pydantic schemas
β βββ tests/ # Pytest suite
βββ frontend/ # React application
β βββ src/
β β βββ core/ # API clients, Rete logic, and contexts
β β βββ features/ # Domain-specific components and hooks
β β βββ pages/ # Route-level page components
β β βββ components/ # Shared UI primitives
β β βββ styles/ # Global CSS and themes
β βββ vite.config.ts # Configured with `@/` path aliases
βββ e2e/ # Playwright end-to-end tests
βββ packages/
β βββ parascope-runtime/ # Standalone package for offline execution
βββ docker-compose.yml # Dev orchestration
βββ docker-compose.prod.yml # Production orchestration
βββ docker-compose.test.yml # Backend test orchestration
βββ docker-compose.e2e.yml # E2E test orchestration
The application is configured via environment variables defined in a .env file. You can copy .env.example to .env to get started.
Parascope uses strict linting and formatting to maintain code quality.
We use Ruff for linting, import sorting, and formatting.
cd backend
# Check for linting issues and import sorting
uv run ruff check .
# Automatically fix linting issues and sort imports
uv run ruff check --fix .
# Format the code
uv run ruff format .We use Biome for linting and formatting.
cd frontend
# Check for linting and formatting issues
pnpm lint
# Automatically fix issues and format the code
pnpm formatBackend unit tests are containerized and run in an isolated environment using a separate database.
To run the backend tests:
docker compose -f docker-compose.test.yml up --build --abort-on-container-exitThis will:
- Build a test-specific backend image.
- Start a transient PostgreSQL instance (
db-test) in memory. - Execute all tests under
backend/tests/. - Automatically shut down and clean up all containers upon completion.
E2E tests use Playwright to verify the full application stack.
To run the E2E tests:
docker compose -f docker-compose.e2e.yml up --build --abort-on-container-exit --exit-code-from e2e-runnerTo run a specific test file:
PLAYWRIGHT_ARGS="tests/connection-drop-menu.spec.ts" docker compose -f docker-compose.e2e.yml up --build --abort-on-container-exit --exit-code-from e2e-runnerTo record videos of the test execution (saved in e2e/test-results/):
docker compose -f docker-compose.e2e.yml run -e VIDEO=on e2e-runnerThis will run the tests in a completely isolated Docker project, allowing you to run them even while the main development server is active.
On the first run, the database is automatically seeded with:
- Engineering Examples: Material Selection (LUT usage), Aerodynamic Drag (nested logic), and SSTO Feasibility.
- Modular Library: Reusable components for Aerospace, Fluids, Mechanics, and more, ready to be imported into new sheets.
To reset the database to these defaults, clear the sheets table or restart the backend with a fresh volume.