Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interplanetary Apps: Disco Chat - Blog Post #517

Merged
merged 29 commits into from
Jan 30, 2023

Conversation

TheDiscordian
Copy link
Member

@TheDiscordian TheDiscordian commented Jan 4, 2023

https://bafybeifox3br34rvtcdo336cf2k7gcpqozpvwpvqpmwkuy6hvqk6qni4cm.ipfs.dweb.link/interplanetary-apps-disco-chat/

This is ready for review.

TODO

  • Add a header image
  • Make syntax highlighting work (optional, but would be very nice to have)
  • Finish going over reviews

@2color
Copy link
Member

2color commented Jan 5, 2023

It seems like the build is failing due to the missing header image. I would point it to another random one temporarily so that the build works.

12:21:49 AM 01/05/2023: [Vue warn]: Error in created hook: "Error: could not load og:image /interplanetary-apps-cover.png"
12:21:49 AM 01/05/2023: found in
12:21:49 AM 01/05/2023: ---> <GlobalLayout>
12:21:49 AM 01/05/2023: <Root>
12:21:53 AM 01/05/2023: error Error rendering /interplanetary-apps-disco-chat/: false

@2color
Copy link
Member

2color commented Jan 5, 2023

I fixed the syntax highlighting in #519

@TheDiscordian
Copy link
Member Author

@2colo the PR it doesn't build, but the linked version did build and is updated, can you use that?

Thanks for fixing the highlighting! It's going to really help a lot of technical posts pop.

TheDiscordian and others added 2 commits January 6, 2023 13:55
Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
Copy link
Member

@2color 2color left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an excellent overview of the journey from a web app to a desktop app. It alternates from high level to very technical quickly which can throw off reader, hence the suggestion to set expectations/goals for the reader.

A couple of high-level suggestions:

  • Set reader expectations in the beginning in terms of what they can expect to learn from this,
  • Add more concrete CTAs
  • Add a video/gif showing the app in action
  • Make the titles a bit more SEO friendly, e.g instead of IPNS profiles, `How Disc Chat uses IPNS for mutable profiles". Phrasing the titles as a question is helpful
  • Update the link to the header image to fix the build so that it can be previewed
  • Add a warning about the fact that while this uses common crypto primitives, it hasn't been audited.

Copy link
Collaborator

@mishmosh mishmosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this is a great tour of the app! Let's make this more streamlined by removing some of the convoluted history of js-ipfs, browser support, etc. — and focus more on what Disco Chat can do today.

Also included a few minor grammar/spelling edits.

src/_blog/interplanetary-apps-disco-chat.md Outdated Show resolved Hide resolved
src/_blog/interplanetary-apps-disco-chat.md Show resolved Hide resolved
src/_blog/interplanetary-apps-disco-chat.md Outdated Show resolved Hide resolved
src/_blog/interplanetary-apps-disco-chat.md Outdated Show resolved Hide resolved
src/_blog/interplanetary-apps-disco-chat.md Show resolved Hide resolved
src/_blog/interplanetary-apps-disco-chat.md Show resolved Hide resolved
src/_blog/interplanetary-apps-disco-chat.md Show resolved Hide resolved
src/_blog/interplanetary-apps-disco-chat.md Outdated Show resolved Hide resolved
src/_blog/interplanetary-apps-disco-chat.md Show resolved Hide resolved
src/_blog/interplanetary-apps-disco-chat.md Outdated Show resolved Hide resolved
TheDiscordian and others added 6 commits January 13, 2023 14:04
Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
Co-authored-by: Mosh <1306020+mishmosh@users.noreply.github.com>
Co-authored-by: Mosh <1306020+mishmosh@users.noreply.github.com>
Co-authored-by: Mosh <1306020+mishmosh@users.noreply.github.com>
Co-authored-by: Mosh <1306020+mishmosh@users.noreply.github.com>
Co-authored-by: Mosh <1306020+mishmosh@users.noreply.github.com>
@TheDiscordian
Copy link
Member Author

Overall this is a great tour of the app! Let's make this more streamlined by removing some of the convoluted history of js-ipfs, browser support, etc. — and focus more on what Disco Chat can do today.

Also included a few minor grammar/spelling edits.

Thanks for the review! I believe I've streamlined it significantly, keeping the history down to 1 paragraph in the journey section.

@TheDiscordian
Copy link
Member Author

This is an excellent overview of the journey from a web app to a desktop app. It alternates from high level to very technical quickly which can throw off reader, hence the suggestion to set expectations/goals for the reader.

Thanks!

A couple of high-level suggestions:

  • Set reader expectations in the beginning in terms of what they can expect to learn from this,

Complete.

  • Add more concrete CTAs

Complete.

  • Add a video/gif showing the app in action

I might record something and link it in. I think a full video format version of the post would be much better though (and we could link to it on this post).

  • Make the titles a bit more SEO friendly, e.g instead of IPNS profiles, `How Disc Chat uses IPNS for mutable profiles". Phrasing the titles as a question is helpful

I believe this is complete.

  • Update the link to the header image to fix the build so that it can be previewed

Complete.

  • Add a warning about the fact that while this uses common crypto primitives, it hasn't been audited.

There is a warning currently along the lines of "don't trust random crypto code", and a reference to the warning was recently removed. Is there something specific you'd like to see changed?

@TheDiscordian
Copy link
Member Author

This is ready for final review & merge. Ideally this will be merged tomorrow EoD at the latest.


I **wanted to keep Disco Chat in the browser** as it's easy to create graphical applications that work cross-platform, not to mention the current popularity of Javascript. First I looked at Electron, but I'm haunted by many complaints developers and users have about the behemoth (not to mention it's quite large). After some searching I **found Tauri, a very thin/lightweight browser view** tied together with Rust.

From there I **created [native-ipfs-building-blox](https://github.com/TheDiscordian/native-ipfs-building-blox)** to assist in creating desktop applications with a webview powered by a Kubo node in the background. The API on the Javascript side is exactly the same, but by using [kubp-rpc-client](https://github.com/ipfs/js-kubo-rpc-client) it's **Kubo handling all the heavy lifting** like running the IPFS node instead of js-ipfs. This **gives us a lot of powers like advanced hole punching techniques** using CircuitRelayV2 and being able to listen on a socket in general.
Copy link
Member

@2color 2color Jan 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
From there I **created [native-ipfs-building-blox](https://github.com/TheDiscordian/native-ipfs-building-blox)** to assist in creating desktop applications with a webview powered by a Kubo node in the background. The API on the Javascript side is exactly the same, but by using [kubp-rpc-client](https://github.com/ipfs/js-kubo-rpc-client) it's **Kubo handling all the heavy lifting** like running the IPFS node instead of js-ipfs. This **gives us a lot of powers like advanced hole punching techniques** using CircuitRelayV2 and being able to listen on a socket in general.
From there I **created [native-ipfs-building-blox](https://github.com/TheDiscordian/native-ipfs-building-blox)** to assist in creating desktop applications with a webview powered by a Kubo node in the background. The API on the Javascript side is exactly the same, but by using [kubo-rpc-client](https://github.com/ipfs/js-kubo-rpc-client) it's **Kubo handling all the heavy lifting** like running the IPFS node instead of js-ipfs. This **gives us a lot of powers like advanced [hole punching](https://docs.libp2p.io/concepts/nat/hole-punching/) techniques** using CircuitRelayV2 and being able to listen on a socket in general.


From there I **created [native-ipfs-building-blox](https://github.com/TheDiscordian/native-ipfs-building-blox)** to assist in creating desktop applications with a webview powered by a Kubo node in the background. The API on the Javascript side is exactly the same, but by using [kubp-rpc-client](https://github.com/ipfs/js-kubo-rpc-client) it's **Kubo handling all the heavy lifting** like running the IPFS node instead of js-ipfs. This **gives us a lot of powers like advanced hole punching techniques** using CircuitRelayV2 and being able to listen on a socket in general.

After this I **just dropped the browser-based Disco Chat into the [ui directory](https://github.com/TheDiscordian/disco-chat/tree/master/ui) with some tweaks**. The browser version of Disco Chat used js-ipfs in the browser which was no longer needed in the new Disco Chat which uses Kubo and Kubo RPC API. After this, I cleaned up that ui directory, added a boatload of comments, and implemented IPNS-based profiles and end-to-end encryption.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After this I **just dropped the browser-based Disco Chat into the [ui directory](https://github.com/TheDiscordian/disco-chat/tree/master/ui) with some tweaks**. The browser version of Disco Chat used js-ipfs in the browser which was no longer needed in the new Disco Chat which uses Kubo and Kubo RPC API. After this, I cleaned up that ui directory, added a boatload of comments, and implemented IPNS-based profiles and end-to-end encryption.
After this, I **just dropped the browser-based Disco Chat into the [ui directory](https://github.com/TheDiscordian/disco-chat/tree/master/ui) with some tweaks**. The browser version of Disco Chat used js-ipfs in the browser, which was no longer needed in the new Disco Chat because it uses Kubo and Kubo RPC API. After this, I cleaned up that `ui` directory, added a boatload of comments, and implemented IPNS-based profiles and end-to-end encryption.

1. **How to have mutable data beyond just a website / redirect**
2. **How to encrypt or hide data**

So to assist with those problems, I created **IPNS-based profiles** for Disco Chat - to show off mutable data, and a **simple end-to-end encryption** feature - to show the basics of how to hide or encrypt data over IPFS (or any public room). This was made possible as each IPFS node has a unique identifier known as a PeerID which is generated via a keypair. I utilise the PeerID as the IPNS name for profile lookups, and the keypair to generate a secret used for data encryption.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
So to assist with those problems, I created **IPNS-based profiles** for Disco Chat - to show off mutable data, and a **simple end-to-end encryption** feature - to show the basics of how to hide or encrypt data over IPFS (or any public room). This was made possible as each IPFS node has a unique identifier known as a PeerID which is generated via a keypair. I utilise the PeerID as the IPNS name for profile lookups, and the keypair to generate a secret used for data encryption.
So to assist with those problems, I created **IPNS-based profiles** for Disco Chat - to show off mutable data, and a **simple end-to-end encryption** feature - to show the basics of how to hide or encrypt data over IPFS (or any public room). This was made possible as each IPFS node has a unique identifier known as a [PeerID](https://docs.libp2p.io/concepts/fundamentals/peers/#peer-id) which is generated via a keypair. I utilise the PeerID as the IPNS name for profile lookups, and the keypair to generate a secret used for data encryption.

Copy link
Member

@2color 2color left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very neat!

Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
@TheDiscordian
Copy link
Member Author

Forgot to hit the magic button last week! Merging after checks complete 🎉

@TheDiscordian TheDiscordian merged commit 639f83a into ipfs:main Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants