A small demonstration that a PhreshOS Program can write, build, and run another Program inside the System: two files, a Start button, and the app opens beside it.
It is not the way to develop PhreshOS apps. Apps are developed in any editor,
with the phresh command line: phresh create, then phresh dev. See
Project commands.
Programs · Communication · Source
The IDE holds one app of two files: server.ts, a Server Endpoint that runs as
a Node.js worker, and client.tsx, a Client Endpoint written with React and
React UI. Each file is saved as it is typed.
Start builds both files with esbuild and creates the app in the System, then opens its window beside the IDE. Restart builds it again and puts it in the same place; Stop ends it. The app lives within the IDE: one IDE Server, shared by every IDE window, runs it, and that Server ends once the last IDE window closes, which ends the app with it.
While the code is written, TypeScript completes it, underlines what is wrong, and describes what the pointer rests on, from the declarations of every library the app may import.
Creating the app is the System-wide all permission: a Program's definition
grants it what it declares.
phresh install ide --runInstallation brings the bundler and the libraries the app imports beside the IDE's Server, at the versions the IDE was built with.
bun install --frozen-lockfile
bun run verify
bun run startverify checks the types and builds both Endpoints and the declarations the
editor knows. Package a release with bun run pack.
- PhreshOS System owns Endpoint execution and the Desktop Window hosting the IDE and the app.
@phreshos/coreowns the Program, Endpoint, and communication contracts.@phreshos/clientand@phreshos/serverprovide the IDE's runtime boundaries, and the app's.@phreshos/react-uidraws the IDE and the app.
Licensed under the MIT License. Copyright © 2026 Zohayr SLILEH.