Holochain Forum

Recommended way to connect web apps to the conductor?

Hey team. I’m struggling to understand the recommended way to connect web front-ends to the conductor. I’m using hc sandbox generate to test my hApp (from guidance in this short tutorial), but I’m not sure what library to use on the front-end to talk websockets to the conductor.

Should I even be using hc sandbox generate or is chaperone more appropriate? I’ve only just started to explore the Holo-Host org tonight, so if that was a dumb question, that’s why :wink:

Surprisingly, I’ve found that connecting the web front-end to the conductor has been the most ambiguous part of my Holochain learning journey so far. Naturally, I’d like to use the most future-proof approaches/libraries. And given that we’re only just on the other side of the RSM, it isn’t surprising that there isn’t clear guidance on some of this stuff; and it can be tricky to extract recommended approaches from existing code bases. Thus my reason for reaching out. I’d be super grateful for any guidance, tips or tricks. Thanks team!

1 Like

Hi @donsmith! Happy to see this :slight_smile:

Short answer is holochain-conductor-api, only that and that all the way. The buffer thing we need to fix (meanwhile you can use mixins?). Aaand we need to be a bit more careful with retiring old code. There are two things here:

  • All the holochain-open-dev examples that use @uprtcl/holochain-provider are pre-RSM, don’t follow them at all. You can follow all the other examples, look at the ones updated recently
  • Anything related to holo is not ready to develop on yet, we have to wait until hosted apps are more or less stable. But in the end we’ll get the same interface as the holochain-conductor-api code has.
  • Yes, you should be using holochain-conductor-api for sure.

Let me know if you have more doubts, or if you see some gap in the documentation and you want to write and article in the open-dev blog ping me!


Wonderful! Thanks for this @guillemcordoba. I’m definitely unblocked now. I’ll press on with holochain-conductor-api with confidence :slightly_smiling_face:

I’m writing a basic dev tutorial for my own learning, and while it’s not yet ready for prime-time, it would be cool if it turned into a comprehensive on-boarding resource for developers at some point. When it’s ready enough, I’d be happy for it to be published wherever it’s the most helpful.

Sorry for not contributing to the Holochain Gym yet. That’s on its way to being a really excellent resource. I just needed to do this tutorial first.

Thanks again!


Hey @donsmith
I saw your introduction post, and you tagged me. Glad you caught on to Holochain :slight_smile: it’s been a tough road at times, but you are tuning in at a relatively good time :+1:

How’s it going with your tutorial and your learning process?

Hey @Connoropolous
Yeah, it feels like a great time to be getting involved. I think the learning process is typical of an alpha product - pretty time consuming, especially just after a significant refactor. Fortunately, because it’s open source, it’s MUCH less ambiguous than it would be otherwise. And it’s great to have so much code to go through :star_struck: While the docs are playing catch-up, it’s helpful to have this active forum with super-responsive replies :pray: That and the community outreach (videos and meetups) also makes it really enjoyable to engage. Everyone has been very friendly and welcoming.

The tutorial is going okay. It feels good to be finishing up part 1 and the approach is suiting my learning style. I’m still trying to carve out more time to work on it. That will get easier as I get more things off my plate. In terms of the order of concepts, I think I’ll take a similar path as the Gym, but with much more hand-holding.


Hi Don,

Nice to see more tutorials popping up!

One small remark. I see you use “hc” as the root folder of you exercise. But hc is also the name of the dna build tool.
It may be confusing for first timers as the two are unrelated.


Hey @tixel, thanks for your note. Yeah, I thought about that. And it’s even more likely to be confusing given that this tutorial is aimed at those who need more prescriptive instructions. I struggled with the name of this folder.

Usually when I put the frontend and the backend in the same repo, I call the folders client and server, but that doesn’t really make sense here :smile_cat: and I haven’t seen many examples of combining these in the same repo.

I guess I could rename it to happ since that’s basically what it contains (potentially multiple DNAs) and it doesn’t conflict with a tool or module name. Thoughts?

Hi @donsmith,

If you want to can go even more specific:

Since happ is also a concept in holochain, this would indicate your are working with a specific instance of that concept.

Thanks @tixel. To me, it feels like going less specific is a better direction. I’ll think I’ll go with calling the folder service for the time being (instead of hc or happ). What I really want is to call the ui folder dermis and put the happ code in a genetics folder :smile:

1 Like