Skip to content

Commit

Permalink
Scaffolded
Browse files Browse the repository at this point in the history
  • Loading branch information
ThetaSinner committed Feb 16, 2024
0 parents commit 026640b
Show file tree
Hide file tree
Showing 23 changed files with 5,623 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "test"
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

jobs:
testbuild:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install nix
uses: cachix/install-nix-action@v18
with:
install_url: https://releases.nixos.org/nix/nix-2.12.0/install
extra_nix_config: |
experimental-features = flakes nix-command
- uses: cachix/cachix-action@v10
with:
name: holochain-ci

- name: Install and test
run: |
nix develop --command bash -c "npm i && npm t"
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

/node_modules/
/dist/
/target/
/.cargo/
*.happ
*.webhapp
*.zip
*.dna
.hc*
.hc
.running
12 changes: 12 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[workspace]
members = [
"dnas/*/zomes/coordinator/*",
"dnas/*/zomes/integrity/*",
]
resolver = "2"

[profile.dev]
opt-level = "z"

[profile.release]
opt-level = "z"
59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# H Wot

## Environment Setup

> PREREQUISITE: set up the [holochain development environment](https://developer.holochain.org/docs/install/).
Enter the nix shell by running this in the root folder of the repository:

```bash
nix-shell
npm install
```

**Run all the other instructions in this README from inside this nix-shell, otherwise they won't work**.

## Running 2 agents

```bash
npm start
```

This will create a network of 2 nodes connected to each other and their respective UIs.
It will also bring up the Holochain Playground for advanced introspection of the conductors.

## Running the backend tests

```bash
npm test
```

## Bootstrapping a network

Create a custom network of nodes connected to each other and their respective UIs with:

```bash
AGENTS=3 npm run network
```

Substitute the "3" for the number of nodes that you want to bootstrap in your network.
This will also bring up the Holochain Playground for advanced introspection of the conductors.

## Packaging

To package the web happ:
``` bash
npm run package
```

You'll have the `hWOT.webhapp` in `workdir`. This is what you should distribute so that the Holochain Launcher can install it.
You will also have its subcomponent `hWOT.happ` in the same folder`.

## Documentation

This repository is using these tools:
- [NPM Workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces/): npm v7's built-in monorepo capabilities.
- [hc](https://github.com/holochain/holochain/tree/develop/crates/hc): Holochain CLI to easily manage Holochain development instances.
- [@holochain/tryorama](https://www.npmjs.com/package/@holochain/tryorama): test framework.
- [@holochain/client](https://www.npmjs.com/package/@holochain/client): client library to connect to Holochain from the UI.
- [@holochain-playground/cli](https://www.npmjs.com/package/@holochain-playground/cli): introspection tooling to understand what's going on in the Holochain nodes.
Loading

0 comments on commit 026640b

Please sign in to comment.