I used 72 hours to replicate a ClubHouse
Tags: javascript, webdev
Published: 2021-02-06 14:04:20

2021, the first “war” of new social software, Clubhouse exploded overseas.

Behind the rapid popularity of this voice social app, Elon Musk, the CEO of Tesla and a big man in the technology circle, personally stood up and created a chat room (Room) called “Elon Musk on Good Time” on Clubhouse not long ago, and the live “room” was filled up instantly with the prerequisite of accommodating 5000 users.

ClubHouse has thus become the focus of much discussion and analysis. However, many of you may not have played with the app yet, because the “registration invitation code” is hard to find. So, 72 hours ago, a developer volunteered to develop a NESHouse in imitation of ClubHouse and open sourced the code.

![](https://postimg.aliavv.com/mbp2021/iang2.png)

Open source address: [https://github.com/bestony/neshouse](https://github.com/bestony/neshouse)

Experience it at: [https://neshouse.com/admin.html](https://neshouse.com/admin.html)

The author of NESHouse, Bai Huancheng, is an engineer who plays podcasts and is also the technical leader of the Linux.cn open source community. We caught up with him to talk about the process of replicating ClubHouse and what he thinks of these kinds of applications from a professional podcaster’s perspective.

## Behind the 72-hour development challenge

### Q: How did you come up with the idea of doing a 72-hour development challenge?

Bai Huancheng: I like to research new products myself, and when ClubHouse exploded in these days, I got the invitation code early and started using it. In the process of using it, I think ClubHouse seems to be just like that. The problem with ClubHouse is that you can’t log on. Since you can’t log in, why not make one yourself? 

In addition, I and my partners in the JINJINLEDAO podcast also want to use this “performance art” to prove that in today’s cloud services are very common, operational capabilities to help the success of the product may be more important than technical skills, as long as you have an idea, although you can boldly go to practice: **build a minimalist model with reliable cloud services to Verify.**

The entrepreneurial joke of “just one programmer away” may not be so applicable today.

And to put some pressure on myself, I chose to set myself a 72-hour Flag (why not 24 hours? Because I’m not sure about 24 hours), so that I can make sure that I can finish the development in the given time.

I’ve been in the habit of Hackathons, and when I was at the company, I used to give myself a Hackathon Time every Friday night to do some Side Projects, but I didn’t actually participate in any of them due to time and location constraints. 

I usually take one out of my own inspiration bank at a specific time (like Friday night or Saturday night) and use it as the Hackathon theme, and then implement the project overnight.

### Q: What factors are considered in the process of technology selection?

Bai Huancheng: In terms of technology selection, my main consideration is two factors.

**It must be fast**: I want to do things quickly & from 0 to 1, that determines one of my core factors is fast enough, otherwise it will take me half a month to do it, this thing is meaningless.

**Must be new**: I like to use some technology stack that I have never used before in Side Project / Hackathon, so that I can force myself to learn a new thing in the fastest time and give myself energy for subsequent development.

Other aspects are less important to me, because the consumption of resources during Hackathon development is actually limited and the cost is not too much of a problem, it’s more about how to implement it quickly and well.

### Q: How was the implementation of the audio interaction function considered in the NESHouse project? What kind of problems did you encounter?

Bai Huancheng: I chose the fastest method for the audio interaction, after all, I wanted to implement it in a short time. 

I had researched some third-party real-time audio SDKs before, and found that the Agora API was relatively simple and clear, and the development cost was not so high.
In the application process, to use an analogy, suppose any of our projects need to drink water (real-time audio), then the Agora to provide is the tap water, a twist of the faucet, the water will come. 

If there is no such SDK, then you need to dig your own well, and then install your own pump, it is not that you can not drink the water, just more trouble, rather than directly access the existing SDK is more trouble.
This also allows me to finish the access faster and focus on the logic.

![](https://postimg.aliavv.com/mbp2021/zrpi6.jpg)

For example, the code for accessing audio listening in NESHouse is only 7 lines of code.

In fact, the implementation of audio interaction did not encounter too many difficulties, the main difficulty was in the adaptation of different browsers and devices. 

Because I was working on a web-side implementation, I relied on the browser’s compatibility with WebRTC. For example, during the development process, I found that the browser of WeChat had to let the user actively click on the page to access the audio playback, so I made a special interface to do the access on WeChat devices.

![](https://postimg.aliavv.com/mbp2021/mk3i4.jpg)


## Podcasts and audio social in my eyes
### Q: How is ClubHouse different from the traditional podcast idea? Is it an evolutionary form of podcasting?

Bai Huancheng: My own feeling about ClubHouse is that its original intention is probably to be an extension of the offline scene. 

For example, if I could go to an offline salon at the moment of the epidemic, but now I can’t go to listen to it, then I can listen to it in the ClubHouse. It will have a time limit, so I have to come to the House at a fixed time to listen to the content shared by the Club. But a podcast is different, a podcast has no time limit, I can come and listen to it at any time.

This time limit determines that ClubHouse is very live and requires you to be more engaged in using it. But unlike podcasts, there are not as many restrictions. However, ClubHouse can actually be used as a podcast, just maybe the theme changes often, so if you don’t mind, ClubHouse can also be a podcast.

### Q: There is a perception that “ClubHouse is not a technical barrier, but mainly a success in terms of operational communication”. How do you see the success of the app after 72 hours of development?

Huancheng Bai: Was it difficult to develop ClubHouse? Yes, it was. Are there any barriers to audio social? No. There are no barriers. Because it can be realized based on the services of Agora.

The real barrier lies in the early development of the product, you need to weigh the pros and cons of the product, what do you want? What do you want and what do you not want? After you develop the product, how to get enough KOLs, such as Elon Musk, to join the community to share? How do you get more people to come in and play? How to get enough money to support the mass of users to enter the operation and cost issues.

In contrast, I think these latter things are the more difficult ones.

### Q: As a veteran podcast host and freelance developer, do you think the ClubHouse style of audio social networking will become a trend in China?

Bai Huancheng: I think it’s still difficult, the ClubHouse style is more demanding for people to synchronize their time. It may slowly become a tool, when you have the need to open online salons, then ClubHouse will be a good tool.

## Author
Bai Huancheng, the author of NESHouse, is an engineer who plays podcasts and is also the technical leader of Linux.CN open source community, GitHub ID: bestony.