Holochain Forum

Try out the first prototype of our new scaffolding tool!

[Edit 2020-04-21] The command name has changed — it’s now hc-happ-create.

[Edit 2020-03-27] Instructions have changed yet again! This tool is now available in the ‘blessed’ Holochain dev tools release.

[Edit 2020-03-05] instructions for installing and running have changed.

Hello developers! This week we’re releasing the first iteration of a new tool for rapid application development. It scaffolds, compiles, and runs an entire app — both DNA and GUI!

Right now it only builds one app — a note-taking app — but those curious among you can take a look around and see how it’s architected. (More on that later.) Next iteration will build a full app (yes, even the GUI) from nothing but a GraphQL schema definition, and after that we plan to create a fully graphical builder!

Why are we doing this?

Our goal is to make it easy for anyone to build a hApp. More hApps means a stronger Holochain ecosystem, which means more groups of people who are empowered to take their online activities into their own hands!

  • App devs who are new to Holochain and Rust can get going quickly with a template that shows them how Holo’s own hAppy team do things.
  • Experienced hApp devs can give their keyboard a rest and let their computer generate all the boilerplate code for data storage, retrieval, display, and interaction.
  • Non-devs can create collaboration tools for their teams and communities without deep programming knowledge.

This prototype is a partial answer to that first goal, and later iterations will tackle the others.

Try it out!

So we invite you to fire up the newest version of the Holochain dev environment (Holonix v0.0.72 with Holochain v0.0.46-alpha1 at time of writing):

$ nix-shell https://holochain.love

Then run this command in your usual project directory:

$ hc-happ-create my-notes-app

The first run will take a while (downloading and compiling dependencies), but once it’s done you can fire up the app thusly:

$ cd my-notes-app
$ yarn start

Your browser will show you a simple UI that lets you write personal notes and back them up to your friends’ devices.

How is it architected?

This notes demo app uses:

  1. A Holochain DNA on the back end (of course)
  2. Apollo GraphQL middleware in the browser to translate zome calls into something easy for front-end frameworks to understand and manipulate
  3. React for UI and data flow
  4. create-react-app for development tooling.

As with most hApps, much of the business logic lives in the front-end and is delivered as static assets to the browser. The create-react-app dev tooling builds it all from source, gets it ready for the browser, and serves it up using Webpack’s dev server. (We’re using this instead of Holochain’s built-in static asset server because it supports live reloading of changes to the UI code.)

Watch a demo

See our hAppy developer team’s Lisa Jetton demoing the tool:

Share your experience!

We invite you to share your thoughts below in this thread! If you think you’ve found a bug, please go to the project’s GitHub issue tracker.

22 Likes

@devcamp6

5 Likes

hi @pauldaoust!!

First and foremost this is amazing!!!
Thank you for all the work you guys are doing.

Our team has been trying to use this but whenever we run the holochain.love command the version getting installed in our system is
hc 0.0.42-alpha5
holochain 0.0.42-alpha5
My colleague is trying to reinstall his nix but so far we’ve been encountering this problem.

1 Like

Same problem here @pauldaoust. Seems like 42-alpha5 is where we’re all at.
Great to see this BTW - super excited to run it.

1 Like

Btw, even using holonix 0.0.71 (with holochain 0.0.45-alpha1) instead of the holochain.love version, there is no hn-happ-create command.

2 Likes

Hey folks – looks like you came to the party early; it’s not actually part of the ‘blessed’ Holonix release that you get from https://holochain.love. I meant to keep this as a draft until Friday… honestly don’t know how you even found it when I marked it as unlisted. Are you forum admins maybe?

In the meantime, here’s how you get the freshest version of Holonix with the command in it:

git clone https://github.com/holochain/holonix.git && cd holonix && git checkout create-happ && nix-shell

This pulls the developer environment repo, moves you to a side branch create-happ, and boots up the dev env from there. Then you can move to your project directory and try out the command.

Excited to see how eager everyone is to try this!

4 Likes

Now that this has gotten leaked before its time, I’d like to invite others to try this out before we share it with the world. @f00bar42 @martin @jimays @Akirawakabayashi

2 Likes

Awesome to see this thanks guys! :blush::pray::tada::heart:

Look forward to trying this out and tracking the progress of this one…

This is along the same goals I have with HoloNET and the OASIS api to help rapidly speed up hApp development and bring it to the masses so we can turbo charge the ecosystem… :blush:

It’s strange because I was just lying in bed at 330 am thinking about this very subject designing in my head the next stages of the OASIS api to be able to use plug n play to rapidly build hApps, then I turn my phone on and was guided to this somehow… interesting… :wink:

3 Likes

Thanks and feeling the priviledge!

I’m going to try and get to this before midnight-fall. Excited…!

2 Likes

Folks, I love this community. Such a wonderful reply to our “official” sneak peek. :wink:

3 Likes

This is great! I’ll fiddle around with the project and maybe provide my insights about it. Thanks!

How can i see how it works and can use it?

Hey all. I’ve just shared this post with the wider world. Also note that the instructions have changed – it’s now in the develop branch of holochain/holonix, not a side branch.

@nkpgardose :wave: welcome to the forum! Looking forward to hearing your feedback and seeing you become a part of the cozy community we’ve got here :slight_smile:

@WaelAura the installation procedure is fairly simple – as long as you’re on macOS (pre-Catalina) or Linux. The Windows or Catalina installation procedure is a bit trickier but not horrible.

Follow the installation guide up until (but not including) the part where you’re supposed to run the command nix-shell https://holochain.love, then continue from the instructions in my first post above. Let me know if you hit any problems; we would like to know about bugs in our documentation or code. Thanks!

thanks @pauldaoust for your response. I ll give it a try and share my experience as tech-illiterate.
How to engage with the development team and discuss about the features and functionality?
The past 15 years I was thinking about how the best collaboration scaffolding engine would looks like. Maybe I can add something.

Update!

This tool is now in ‘blessed’ holonix, so install is simpler. It’s now available in the ‘blessed’ release of holonix, which means it’s super easy to install the entire Holochain development environment and get started with this tool:

$ nix-shell https://holochain.love

will get it all installed.
[/details]

Brilliant. This is the future. RedGrid has similar ideas for some of our IoE applications.

A few observations:

  1. Be great when you start hn-happ-create if you can specify stdouts and stderr windows:
    a) One for the DEBUG gossip thing checking for gossip
    b) One for the react bit waiting for Holochain
    c) One showing compilation progress.
    For the last one, some indication how far to go… ideally an ASCII completion bar.

This took a while to complete (I’d say at least 15 minutes), so splitting this up would give an idea, especially the first time.

One other comment, the hApp pops up and I was able to enter a note as promised, but should I also with this be able to read it back? Or is this a write-only system at the moment :blush:

Outstanding effort!

3 Likes

I wonder if that was the bug they were talking about. Ihavent gotten details on what it actually is yet! If so, then it’s definitely a regression, cuz it was working for me a couple weeks ago. Hoping it’ll get fixed soon!

Re: the logging, are you using the ‘blessed’ Holonix from https://holochain.love ? I heard they screened out a good portion of the logging messages (rather, they changed them to LOG_DEBUG level) but I haven’t seen it for myself so I don’t know exactly how much quieter it is. But as for multiplexing the output from a few processes into one terminal, I have heard other people say that’s confusing too. Will pass on that feedback – it should be pretty trivial to add yarn start-dna and yarn start-ui as separate commands that you can run in separate terminals.

Yes, I used the toolset as you described 3 days ago. I was thinking piping out to stderr vs stdout vs (not sure if there is a third option), and then opening three different terminal windows. But at a higher level, using yarn sounds the ticket. Hey Paul, was looking forward to a few months in Kelowna in July but that’s off the table now… we may get a puppy instead :slight_smile:

Oh darn! Kelowna in July is lovely (although a bit busy). Freaking germs, eh? Throwing everyone’s plans off.