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 is a self-contained desktop application that requires minimal external configuration. Almost everything — database file paths, session directories, artifact stores — is resolved programmatically at runtime based on the operating system’s standard app data directories. The only area that requires manual configuration is the Prisma CLI toolchain used during development for database migrations and schema generation.

Environment Variables

A single .env file at the project root is used exclusively during development. It is not shipped in the packaged application.
VariableRequiredDescription
DATABASE_URLDev onlySQLite file path for the Prisma CLI (file:./dev.db). Used by prisma generate, prisma migrate, and prisma studionot by the running application.
The DATABASE_URL value in .env is only consumed by Prisma CLI tooling (migrations, code generation, Prisma Studio). The running application never reads this variable — it supplies the SQLite file path programmatically at startup via storage-root.ts, placing the database under the OS app data directory. Editing .env has no effect on a packaged or running build.

App Identity

These fields are sourced from package.json and electron-builder.yml and are embedded in every packaged build.
FieldValue
App nameOpen Science
Bundle IDcom.aipoch.open-science
Version0.1.0
Authoraipoch
LicenseApache-2.0
Homepagehttps://www.aipoch.com/open-science

Build Configuration

Open Science uses electron-builder for packaging and distribution, configured in electron-builder.yml. The build produces platform-native installers for all three major desktop operating systems.

macOS

  • Artifact format: DMG (filename pattern: ${name}-${version}.dmg)
  • Signing: ad-hoc signed via the afterPack hook at build/adhoc-sign.cjs — no Apple Developer ID is required
  • Notarization: disabled (notarize: false)
  • Entitlements: build/entitlements.mac.plist (applied via entitlementsInherit)
  • CFBundleName / CFBundleDisplayName: Open Science
Because macOS builds are ad-hoc signed and not notarized, Gatekeeper may show a “damaged” warning when you open a downloaded DMG. This is a quarantine flag, not actual corruption. To open the app anyway, right-click the application in Finder and choose Open, then confirm. You only need to do this once.

Windows

  • Installer format: NSIS (filename pattern: ${name}-${version}-setup.exe)
  • Executable name: open-science
  • Desktop shortcut: created automatically during install
  • Uninstall display name: Open Science

Linux

  • Target formats: AppImage, snap, deb
  • Artifact filename pattern: ${name}-${version}.${ext}
  • Maintainer: aipoch
  • Category: Utility

Distribution

Releases are published to GitHub Releases using electron-builder’s built-in GitHub publisher:
publish:
  provider: github
  owner: aipoch
  repo: open-science
Auto-update is handled by electron-updater at runtime, which checks GitHub Releases for new versions.

Prisma Configuration

Open Science uses Prisma with a SQLite datasource to manage its Project and ProjectPreviewState tables. The Prisma setup has a few packaging-specific details worth understanding.

Why Prisma is shipped as extraResources

The Prisma generated client (node_modules/.prisma) and @prisma/client are excluded from the asar archive and shipped as extraResources instead:
# electron-builder.yml (excerpt)
files:
  - '!node_modules/@prisma/client{,/**/*}'
  - '!node_modules/.prisma{,/**/*}'

extraResources:
  - from: node_modules/.prisma
    to: node_modules/.prisma
  - from: node_modules/@prisma/client
    to: node_modules/@prisma/client
This is required because Prisma loads a native query engine (.dylib.node on macOS) by file path, which cannot be executed from inside an asar archive. Shipping both packages under Contents/Resources/node_modules/ lets Node’s standard directory walk find them at runtime without any path patching.

Development setup

The Prisma client is generated automatically when you install dependencies:
npm install   # runs postinstall → prisma generate && electron-builder install-app-deps
To apply schema changes during development:
npx prisma migrate dev
The DATABASE_URL in .env points the CLI at a local dev.db file for this purpose. The packaged app creates its own schema at runtime using CREATE TABLE IF NOT EXISTS DDL directly, without the Prisma migration engine.

Build docs developers (and LLMs) love