Skip to content

Inventivus v1.0.0

Choose a tag to compare

@Therealsboy8 Therealsboy8 released this 01 Sep 01:49
· 2 commits to main since this release
8fe0fd3

Inventivus

Engineering mission control — a local-first Windows desktop application for
engineering calculators, machine architectures, native app overlays, version
control, and a built-in AI assistant named Athena.

Inventivus is an Electron app. A React + TypeScript SPA runs in the renderer, a
Fastify + SQLite backend runs as a child process of the Electron main process, and
everything — projects, simulation history, git repos, encrypted credentials — stays
on the user's machine. There is no hosted application server. Your information is safe.


Repository layout

.
├── inventivus/          ← the actual product. Everything below this line is here.
├── memory/PRD.md        Original product requirements and backlog
├── backend/             Emergent scaffold (FastAPI "Hello World" + Mongo) — unused
├── frontend/            Emergent scaffold (CRA + shadcn/ui starter)      — unused
├── tests/               Empty pytest package left by the scaffold
└── test_result.md       Scaffold testing-protocol file

backend/, frontend/, and tests/ are leftovers from the project generator. They
are not wired into the desktop app and can be ignored (or deleted) — the Fastify
backend the app actually runs is inventivus/server/.


Quick start

Requires Node 20+ and Yarn 1.x.

cd inventivus
yarn install
yarn dev

yarn dev runs three things concurrently: the Vite dev server on :5173, a
TypeScript build of the Electron main + preload into dist-electron/, and Electron
itself — which spawns the Fastify backend on a free port.

Stack

Layer Tech
Shell Electron 43 (contextBridge IPC, no nodeIntegration)
Renderer React 18 · TypeScript · Vite 6 · Tailwind CSS
State Zustand (global) · TanStack Query (server)
Graph / canvas React Flow
Backend Fastify 5, spawned as a child process on launch
Storage SQLite via better-sqlite3 (WAL + FTS5 full-text search)
Version control isomorphic-git — real git repos per project
Collaboration Yjs + PartyKit (y-partykit)
Native interop koffi FFI for Win32 window tracking
AI Ollama · LM Studio · OpenAI-compatible · Anthropic
Payments Stripe Node SDK + Ed25519-signed licence tokens
Packaging electron-builder → Windows NSIS installer

What's in the app

  • Mission — dashboard and telemetry across projects.
  • Calculators — truss FEM, beam, buckling, and co-simulation, with sandboxed
    controller expressions and live charting.
  • Machines — visual architecture layout wired to simulation runs.
  • Integrations — register any executable (CAD tool, simulator, terminal),
    launch it, and park a frameless HUD window in front of it. The HUD is a genuine
    second window owned by the launched app, not a reparented overlay — see
    SETUP.md § "The HUD is not an overlay".
  • Version control — git plus entity-level history, mirrored to a workspace.
  • Athena — full-page chat and a floating dock, SSE-streamed from the local
    backend so API keys never reach the renderer.
  • Projects — CRUD, invites, join flow, status control, GitHub sign-in via
    device flow.
  • Global search — SQLite FTS5 behind a Ctrl/+K
    command palette.

Editions and the free/Pro split

Two builds ship from one codebase with a single branch taken:

  • Standard — free tier with feature gates (calculators, machines, HUD live help)
    and quantity caps (5 projects, 3 integrations).
  • Unlocked — same code, resolveEntitlement short-circuits to Pro.

Version control and collaboration are free on purpose: a lapsed subscription must
never appear to have eaten someone's work. Limits are enforced on creation only,
so a user who drops from Pro keeps everything they already have.

Pro is proved by an Ed25519-signed licence token minted by the issuer worker
after a Stripe webhook — never by a local database column. The app embeds only the
public key, so it can verify a licence but cannot mint one. Enforcement is
server-side: gated routes return 402 regardless of what the UI renders.


Building the installers

cd inventivus
yarn package:standard   # → release/standard/Inventivus-Setup-0.1.0.exe
yarn package:unlocked   # → release/unlocked/
yarn package:both       # build once, package twice
yarn package:dir        # unpacked build, faster for testing

Scripts reference

yarn dev                # Vite + Electron + live backend
yarn dev:unlocked       # same, with Pro entitlements
yarn build              # renderer + electron main + server
yarn lint               # tsc --noEmit && eslint
yarn start:server       # backend only, for debugging

yarn verify:editions    # assert standard/unlocked packages differ correctly
yarn verify:persistence # assert userData survives reinstall
yarn verify:webhooks    # sign synthetic Stripe events → SQLite
yarn verify:pathb       # polling-based subscription refresh
yarn verify:ai          # AI provider proxy round-trip

Unit tests are colocated as *.test.ts next to their subjects and run with Vitest
(vitest.config.ts).


Where data lives

Path Contents
<userData>/inventivus.db SQLite database (WAL)
<userData>/config.enc Stripe + AI credentials, AES-256-GCM
<userData>/.inventivus.key 32-byte key generated on first launch, 0600

<userData> is %APPDATA%/Inventivus/ on Windows,
~/Library/Application Support/Inventivus/ on macOS,
~/.config/Inventivus/ on Linux.


Further reading

Document Covers
inventivus/SETUP.md First-time setup, keys, HUD, licensing, pitfalls
inventivus/README.md Architecture and module-level reference
inventivus/issuer/README.md Deploying the licence issuer (~15 min)
memory/PRD.md Original requirements and backlog
FILE_OPERATIONS_FIX.md File open/save handling notes
VERIFICATION_CHECKLIST.md Manual pre-release checklist

License

Proprietary. © Inventivus. All rights reserved.