Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lightningrodlabs/notebooks
https://github.com/lightningrodlabs/notebooks
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lightningrodlabs/notebooks
- Owner: lightningrodlabs
- Created: 2021-11-03T15:26:18.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-16T18:21:16.000Z (4 months ago)
- Last Synced: 2024-10-18T14:05:52.271Z (4 months ago)
- Language: TypeScript
- Size: 4.43 MB
- Stars: 5
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-weave - lightningrodlabs/notebooks - hdk-v0.4.0-rc](https://github.com/lightningrodlabs/notebooks/tree/for-hdk-v0.4.0-rc) | [@guillemcordoba](https://github.com/guillemcordoba), [@zippy](https://github.com/zippy), [@matthme](https://github.com/matthme), [@weswalla](https://github.com/weswalla) | (Happs)
- awesome-weave - lightningrodlabs/notebooks - hdk-v0.4.0-rc](https://github.com/lightningrodlabs/notebooks/tree/for-hdk-v0.4.0-rc) | [@guillemcordoba](https://github.com/guillemcordoba), [@zippy](https://github.com/zippy), [@matthme](https://github.com/matthme), [@weswalla](https://github.com/weswalla) | (Happs)
README
# notebooks
## Environment Setup
1. Install the holochain dev environment (only nix-shell is required): https://developer.holochain.org/docs/install/
2. Enable Holochain cachix with:```bash
nix-env -iA cachix -f https://cachix.org/api/v1/install
cachix use holochain-ci
```3. Clone this repo and `cd` inside of it.
4. Enter the nix shell by running this in the root folder of the repository:```bash
nix-shell
npm install
```This will install all the needed dependencies in your local environment, including `holochain`, `hc` and `npm`.
## Building the DNA
- Build the DNA (assumes you are still in the nix shell for correct rust/cargo versions from step above):
```bash
npm run build:happ
```## Running the DNA tests
```bash
npm run test
```## UI
To test out the UI:
``` bash
npm start
```To run another agent, open another terminal, and execute again:
```bash
npm start
```Each new agent that you create this way will get assigned its own port and get connected to the other agents.
## Package
To package the web happ:
``` bash
npm run package
```You'll have the `notebooks.webhapp` in `workdir`. This is what you should distribute so that the Holochain Launcher can install it.
You will also have its subcomponent `notebooks.happ` in the same folder`.
## Documentation
We are using this tooling:
- [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.