An open-source, self-hosted system for apps built with web technologies.
The README introduces PhreshOS with a screenshot of the Desktop, how to try it, and what the System does; contributing and security notes match the current workflow
zohayrslileh8b9db732ad02
diff --git a/.github/desktop.jpg b/.github/desktop.jpgnew file mode 100644index 0000000..3da6c0cBinary files /dev/null and b/.github/desktop.jpg differdiff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 122f7f4..724544d 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -1,33 +1,46 @@# Contributing-The system repository owns the authoritative PhreshOS runtime: server state,-the desktop that represents it, owner-local gateway, persistence boundaries,-and Process management.+This repository is the PhreshOS System: the service that runs Programs, their+Processes and Endpoints, authentication, permissions, storage, and the Desktop+that shows them.-## Development+## Setup-Install the pinned toolchain and verify the repository:+You need [Bun](https://bun.sh) 1.3 and Node.js 24.15 or newer.```shbun install --frozen-lockfile+bun run dev+```++`dev` keeps its data in `storage/`, which is never committed, and serves the+Desktop on the first free port from `5300`.++## Before a pull request++```shbun run verify```-`verify` type-checks the source and exercises the actual release archive from a-temporary installation; CI also boots it and requests the desktop. Changes to-production dependencies, assets, startup, or build layout must preserve that-standalone path.+`verify` type-checks the source, builds it, and runs the tests. One test packs+the release, installs it in a temporary folder the way a user's System is+installed, and boots it. A change to production dependencies, assets, startup,+or the build layout must keep that path working. CI runs `verify` on Linux and+Windows.-Consume other PhreshOS components only through published releases. Do not add-workspace ranges, sibling paths, source aliases into another checkout, Git-submodules, or assumptions about an enclosing directory.+## Rules-Runtime state must remain outside version control. Tests and development runs-must use isolated storage and clean up every process and temporary resource they-create.+- Use other PhreshOS packages only through their published releases. Do not+ add workspace ranges, paths to sibling folders, source aliases into another+ checkout, Git submodules, or assumptions about an enclosing folder.+- Keep runtime state out of version control. Tests and development runs use+ their own storage, and clean up every process and temporary file they+ create.+- Tests and their fixtures go in `tests/`; tooling goes in `scripts/`.## Pull requests-Explain which system-owned behavior the change serves, include focused proof-for new behavior, update public documentation when the contract changes, and-keep each pull request focused on one coherent change.+Keep each pull request to one change. Explain what it changes in the System+and why, add tests for new behavior, and update the+[documentation](https://github.com/PhreshOS/website) when a public behavior+changes.diff --git a/README.md b/README.mdindex 22cb3db..5d0c4b3 100644--- a/README.md+++ b/README.md@@ -1,84 +1,133 @@-# PhreshOS System+<p align="center">+ <img src="assets/logo.png" width="88" alt="PhreshOS">+</p>-The authoritative runtime and web desktop for PhreshOS Programs.+<h1 align="center">PhreshOS</h1>-[Documentation](https://docs.phreshos.com/system) ·-[Runtime model](https://docs.phreshos.com/runtime) ·-[Installation](https://docs.phreshos.com/installation) ·-[Source](https://github.com/PhreshOS/system)+<p align="center">+ An operating system for software built with web technologies.+</p>-## Role+<p align="center">+ <a href="https://phreshos.com">Website</a> ·+ <a href="https://phreshos.com/docs">Documentation</a> ·+ <a href="https://demo.phreshos.com">Live demo</a> ·+ <a href="https://github.com/PhreshOS/system/releases">Releases</a>+</p>-The System owns Program and Process lifecycle, Endpoint execution, routing,-authentication, persistence, permissions, host capabilities, and the web-Desktop that represents this state.+-The browser is a display, not the authority. Client, Server, Node, and CLI-consumers reach one shared domain model whose contracts are defined by Core.-See [What is PhreshOS?](https://docs.phreshos.com/what-is-phreshos) for the-complete product model.+PhreshOS runs on the machine you install it on, keeps your Programs running+there, and gives you a Desktop in the browser to use them from. Programs are+built with the web tools you already know. The System gives each of them a+place to run, one sign-in, communication with other Programs, storage, and+permissions, so a Program only holds its own logic.-## Installation+Everything on the Desktop, from the file manager to Settings and the+wallpaper, is a Program built on the System, not part of it.-The current System requires Node.js 24.15.0 or newer. Install and operate it-through the CLI:+This repository is the **System**: the service that runs on your machine, and+the Desktop it serves.++## What Programs get++- **A place to run.** A Program's Server keeps running on the machine, whether+ or not a browser is open.+- **One sign-in.** The owner signs in to the System. Programs never handle+ accounts, sessions, or connections.+- **Communication.** Programs ask, publish, and listen, between their own parts+ and between Programs, without setting up a transport.+- **Permissions.** The System decides what each Program may reach.+- **Any browser.** Open the Desktop from any browser that can reach the machine,+ and the same Programs are there, as you left them.+- **Agents alongside you.** An AI agent uses the same Programs through the+ `phresh` command line and the SDKs, at the same time as you use them on the+ Desktop.++## Try it++The [live demo](https://demo.phreshos.com) gives you a disposable Desktop for an+hour, with nothing to install.++To install PhreshOS on macOS, Linux, or Windows, you need Node.js 24.15 or+newer:```sh+npm install --global @phreshos/cliphresh system install-phresh system status-phresh system start-phresh system stop-phresh system enable-phresh system disable```-Production state uses `~/.phreshos` by default. `PHRESHOS_HOME` selects another-System home. See [Installation](https://docs.phreshos.com/installation) for the-complete host and service workflow.+The command installs the System as a service of your user, starts it, and+prints the Desktop's address, usually `http://localhost:4300`. The first visit+creates the owner account. See [Installation](https://phreshos.com/docs/installation)+to update, stop, or remove it, or to change where it keeps its data.-## Development+Then create your first Program:```sh-bun install --frozen-lockfile-bun run verify-bun run dev+phresh create my-program+cd my-program+phresh dev```-Build or package the production release with:+## What the System does++The System owns the running state of PhreshOS:++- Programs, their Processes, and the Server and Client Endpoints they run;+- communication between Endpoints, Services, and Programs;+- authentication of the owner and of every connection;+- permissions, storage, uploads, and logs;+- the Desktop: Windows, layers, the plane of views, and the Appearance.++The browser shows this state; it does not hold it. A Desktop, a Node script,+and the `phresh` command all reach the same System, through contracts defined+in [`@phreshos/core`](https://github.com/PhreshOS/core). See+[The System](https://phreshos.com/docs/the-system) for the full model.++## Development++You need [Bun](https://bun.sh) 1.3 and Node.js 24.15 or newer.```sh-bun run build-bun run pack+bun install --frozen-lockfile+bun run dev```-`verify` checks the source contracts and validates the packed System from a-clean installation.+`dev` runs the System from source, with its data in `storage/` in this+repository and the Desktop on the first free port from `5300`. An installed+System uses `~/.phreshos` and ports from `4300`, so both can run side by side.+`PHRESHOS_HOME` and `PHRESHOS_PORT` choose another home or port.++| Command | Does |+| --- | --- |+| `bun run check` | Type-checks the source |+| `bun run build` | Builds the server and the Desktop into `dist/` |+| `bun run test` | Runs the tests in `tests/` |+| `bun run verify` | Runs `check`, `build`, and `test`, including a test that packs the release, installs it in a temporary folder, and boots it |+| `bun run pack` | Builds the release archive and its checksum |-`check` performs static checks, `build` creates distributable output, and `test`-runs Vitest assertions from `tests/`. Run `build` before testing built artifacts.-`verify` runs `check`, `build`, and `test` in order. Operational tooling belongs-in `scripts/`; tests and their fixtures belong in `tests/`. Verification uses-the committed dependency graph without local package substitutions.+The source has three parts: `source/server` is the System, `source/client` is+the Desktop, and `source/shared` holds what both use.## Related repositories-- [`@phreshos/core`](https://github.com/PhreshOS/core) owns the public contracts- implemented by the System.-- [`@phreshos/client`](https://github.com/PhreshOS/client) and- [`@phreshos/server`](https://github.com/PhreshOS/server) adapt Client and- Server Endpoint boundaries.-- [`@phreshos/node`](https://github.com/PhreshOS/node) connects external Node.js- code to a running System.-- [`@phreshos/cli`](https://github.com/PhreshOS/cli) installs and operates the- System and its native service.-- [PhreshOS Documentation](https://github.com/PhreshOS/docs) owns the canonical- public explanation of the runtime.+| Repository | Role |+| --- | --- |+| [core](https://github.com/PhreshOS/core) | The contracts shared by every part of PhreshOS |+| [client](https://github.com/PhreshOS/client) | The SDK for a Program's Client Endpoint, in its Window |+| [server](https://github.com/PhreshOS/server) | The SDK for a Program's Server Endpoint |+| [node](https://github.com/PhreshOS/node) | The SDK for Node.js code that reaches a running System |+| [react](https://github.com/PhreshOS/react) | React bindings for the SDKs |+| [react-ui](https://github.com/PhreshOS/react-ui) | The component library the Desktop and Programs draw with |+| [cli](https://github.com/PhreshOS/cli) | The `phresh` command: installs the System, builds Programs, and reaches the running System |+| [website](https://github.com/PhreshOS/website) | phreshos.com and its documentation |## Contributing-See [CONTRIBUTING.md](CONTRIBUTING.md) for the repository workflow and-[SECURITY.md](SECURITY.md) for private vulnerability reporting.+See [CONTRIBUTING.md](CONTRIBUTING.md). To report a vulnerability privately,+see [SECURITY.md](SECURITY.md).## License-Licensed under the [MIT License](LICENSE). Copyright © 2026 Zohayr SLILEH.+[MIT](LICENSE). Copyright © 2026 Zohayr SLILEH.diff --git a/SECURITY.md b/SECURITY.mdindex 2fd5981..2022bf6 100644--- a/SECURITY.md+++ b/SECURITY.md@@ -1,8 +1,9 @@# Security-Please do not disclose a suspected vulnerability in a public issue.+Please do not report a suspected vulnerability in a public issue.-Use GitHub's private vulnerability reporting for the `PhreshOS/system`-repository. Include the affected version, the smallest reproduction available,-the impact you observed, and any suggested mitigation. Reports are assessed-against the latest published release.+Use GitHub's [private vulnerability reporting](https://github.com/PhreshOS/system/security/advisories/new)+for this repository. Include the affected version, the smallest reproduction+you have, the impact you observed, and any mitigation you suggest.++Reports are assessed against the latest release.