Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/aipoch/open-science/llms.txt

Use this file to discover all available pages before exploring further.

Open Science uses electron-vite to power a fast hot-reload development workflow across both the Electron main process and the React renderer simultaneously. Changes to the UI reflect instantly in the running app, and changes to main-process code trigger an automatic restart — no manual rebuild step required during day-to-day development.

Prerequisites

Make sure the following tools are installed before you begin:
  • Node.js (LTS)nodejs.org. The LTS release is recommended; any LTS version should work.
  • npm — bundled with Node.js; no separate installation needed.
  • Git — to clone the repository.
Optionally, install python3 on your PATH if you want the built-in notebook kernel to execute code during your development sessions.

Setup

1

Clone the repository

Clone the Open Science repository from GitHub and change into the project directory:
git clone https://github.com/aipoch/open-science.git
cd open-science
2

Install dependencies

Install all Node.js dependencies with npm:
npm install
The postinstall script runs automatically after npm install completes. It executes two setup steps back-to-back: prisma generate (which generates the Prisma client for the local SQLite project database) and electron-builder install-app-deps (which downloads the correct native Electron binaries for your platform). This step may take a minute or two on a cold install — that’s expected.
3

Start the development server

Launch the app in development mode:
npm run dev
electron-vite builds the main and preload bundles, starts the renderer dev server on localhost:5173, and opens the Open Science desktop window automatically. Both the main process and the renderer support hot-reload — UI changes appear instantly, and main-process changes trigger a fast restart.
Press F12 inside the running app to open the Chromium DevTools panel for the renderer. This gives you the full React DevTools experience, network inspection, and console access — exactly the same workflow as debugging a web app in Chrome.
Development data is isolated under ~/.open-science-project, so your dev sessions never touch a production install’s data (which lives under ~/.open-science).

Project Structure

Open Science follows the standard electron-vite three-process layout, with shared types extracted into a dedicated layer:
DirectoryDescription
src/main/Electron main process: ACP runtime, session persistence, artifacts, notebook, projects, and IPC handlers
src/preload/Preload bridge that exposes a typed window.api surface to the renderer
src/renderer/React UI — pages, components, and Zustand stores
src/shared/Shared TypeScript types and helpers used across the main process and renderer
prisma/Prisma schema for the SQLite project database
build/Electron-builder resources and platform signing hooks (including the macOS ad-hoc signing script)
resources/App icons and static assets bundled into the packaged application

Available npm Scripts

ScriptDescription
npm run devStart the hot-reload development build and open the Electron window
npm run buildRun typecheck, then produce a production build with electron-vite
npm run typecheckTypeScript type check for both the Node (main/preload) and web (renderer) tsconfigs
npm run lintRun ESLint across the entire codebase
npm run testRun the Vitest unit test suite
npm run formatRun Prettier in write mode — formats all files in place
npm startPreview the last production build with electron-vite preview

Environment Variables

The repository ships a .env.example file at the project root. Copy it to .env if you need to run Prisma CLI commands (such as prisma migrate dev or prisma studio) directly:
cp .env.example .env
The only variable defined is DATABASE_URL, which points the Prisma CLI at a local dev.db file. You do not need this variable to run the app — at runtime, Open Science supplies the SQLite path programmatically under the storage root, bypassing the .env file entirely.
Before every commit, run npm run typecheck && npm run test to catch type errors and broken tests before they reach CI. Combined with npm run lint and npm run format, these four commands are the full required check suite — see Contributing Overview for details.

Build docs developers (and LLMs) love