# WireJS app

> **Experimental:** WireJS is an experimental hobby project and is not production software. For a professionally supported project in a similar spirit, see [AWS Blocks](https://github.com/aws-devtools-labs/aws-blocks), which benefits from lessons and ideas explored here.

This app was generated by `create-wirejs-app`.

WireJS is experimental and changes quickly. Prefer the documentation installed with this app's exact dependency versions over docs from another branch or another npm version.

## Version-locked docs

The main app/runtime README is installed at:

```text
node_modules/wirejs-resources/README.md
```

Cross-platform command to locate it:

```sh
node -e "console.log(require.resolve('wirejs-resources/package.json').replace(/package\.json$/, 'README.md'))"
```

For DOM/component details, also inspect:

```sh
node -e "console.log(require.resolve('wirejs-dom/package.json').replace(/package\.json$/, 'README.md'))"
```

Humans can browse npm-rendered READMEs too:

- <https://www.npmjs.com/package/wirejs-resources>
- <https://www.npmjs.com/package/wirejs-dom>
- <https://www.npmjs.com/package/wirejs-scripts>

Reminder: npm pages show a package README, but the safest reference is the README in this app's `node_modules`, because it matches the installed version.

## Project layout

- `src/ssg/` — statically generated pages/artifacts. Modules export `generate()` and may use `hydrate()` for browser behavior.
- `src/ssr/` — request-time server-rendered routes. Modules export `generate(context)`.
- `src/components/`, `src/layouts/` — shared DOM/layout code, usually using `wirejs-dom/v2`.
- `api/` — API/resources workspace.
- `static/` — public static assets, served under `/static/*`.

## Commands

```sh
npm run start        # local development
npm run start:public # local development with public tunnel/NAT behavior when available
npm run build        # production build
```
