# Phresh Program

The minimal starter Program generated by `phresh create`.

[First Program](https://docs.phreshos.com/first-program) ·
[Program authoring](https://docs.phreshos.com/sdks/core#program-configuration) ·
[Source](https://github.com/PhreshOS/phresh-program)

## Role

Phresh Program demonstrates one Client Endpoint and one Server Endpoint
communicating through their standard contracts. The Server owns a counter, and
the Client renders it.

The repository is a complete ordinary Program and the source of the starter
bundled by the CLI. It deliberately adds no application hierarchy, registered
Service, or generator-specific model.

## Create a Program

```sh
phresh create
```

The CLI creates a project from a verified bundled release without requiring a
template checkout. Follow [First Program](https://docs.phreshos.com/first-program)
to inspect, develop, and run the result.

## Development

```sh
bun install --frozen-lockfile
bun run verify
bun run dev
```

Build, run the production definition, or package the Program with:

```sh
bun run build
bun run start
bun run pack
```

`verify` checks the source, builds both Endpoints, and validates the packaged
Program shape.

`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.

## Related repositories

- [`@phreshos/cli`](https://github.com/PhreshOS/cli) bundles this repository for
  `phresh create` and owns the project command interface.
- [`@phreshos/core`](https://github.com/PhreshOS/core) owns the Program and
  Endpoint contracts demonstrated here.
- [`@phreshos/client`](https://github.com/PhreshOS/client) and
  [`@phreshos/server`](https://github.com/PhreshOS/server) provide the two
  runtime adapters used by the Program.
- [PhreshOS System](https://github.com/PhreshOS/system) runs the resulting
  Program.

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for the repository workflow and
[SECURITY.md](SECURITY.md) for private vulnerability reporting.

## License

Licensed under the [MIT License](LICENSE). Copyright © 2026 Zohayr SLILEH.
