Open Science usesDocumentation 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.
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.
python3 on your PATH if you want the built-in notebook kernel to execute code during your development sessions.
Setup
Clone the repository
Clone the Open Science repository from GitHub and change into the project directory:
Install dependencies
Install all Node.js dependencies with npm:
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.Start the development server
Launch the app in development mode:
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.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 standardelectron-vite three-process layout, with shared types extracted into a dedicated layer:
| Directory | Description |
|---|---|
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
| Script | Description |
|---|---|
npm run dev | Start the hot-reload development build and open the Electron window |
npm run build | Run typecheck, then produce a production build with electron-vite |
npm run typecheck | TypeScript type check for both the Node (main/preload) and web (renderer) tsconfigs |
npm run lint | Run ESLint across the entire codebase |
npm run test | Run the Vitest unit test suite |
npm run format | Run Prettier in write mode — formats all files in place |
npm start | Preview 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:
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.