54°F

Aaron Parecki

  • Articles
  • Notes
  • Photos
  • Day 74: Added a Chat Widget to my Website! #100DaysOfIndieWeb

    March 4, 2017

    A couple weeks ago, sknebel asked whether anyone in the #indieweb channel had a chat widget on their website. I used to have a form you could fill out and it would send me an SMS to my candybar phone, and a little while after that I had a prototype of a chat widget that disappeared somewhere along the way. I thought it would be fun to resurrect that idea!

    It was quite a bit of a project, but I managed to finish it all in one day! I started from scratch, wanting to implement the widget in pure Javascript with no external dependencies. Between LocalStorage, EventSource, query selectors, and a few other key pieces, the browser APIs have gotten a lot better since the last time I tried this about 7 years ago!

    Now when you go to my website, you'll see a chat icon in the bottom corner if I'm online!

    If I'm not online, the icon just doesn't appear. The widget knows whether I'm online thanks to a little script that runs on my computer while it's awake.

    If you click the icon, a chat window will pop up and you can type into it.

    On the backend, this creates a new IRC channel on my private IRC server, and sends me an invitation to join it. It also sends a message to a primary channel with some information about the visitor that just connected, including the URL of the page they were on when they clicked it, their IP address and browser user agent. I don't have any other way to establish their identity other than talking with them.

    The whole project is open source, along with some pretty detailed installation instructions. In order to keep the code to a minimum, I used some server-side tools such as the nginx push-stream module.

    We'll see if anyone ends up using this to get in touch with me!

    Portland, Oregon
    Sat, Mar 4, 2017 3:18pm -08:00 #100daysofindieweb #chat
    1 like 2 replies 2 mentions
    • Sebastiaan Andeweg
    • Greg unrelenting.technology

      The design of the chat window really reminds me of Facebook, from back when I tried Facebook :)

      Sat, May 20, 2017 2:46pm -08:00
    • Sven Knebel www.svenknebel.de
      notes for HWC Berlin 2017-03-08
      Thu, Mar 9, 2017 4:25pm +01:00

    Other Mentions

    • Aaron Parecki aaronparecki.com
      My 2017 Year in Review
      Thu, Jan 4, 2018 2:40pm -08:00
    • 100 Days of IndieWeb aaronparecki.com/tag/100daysofindieweb
      Day 74: Added a Chat Widget to my Website! #100DaysOfIndieWeb: aaronparecki.com/2017/03/04/8/d…
      Sat, Mar 4, 2017 11:20pm +00:00 (via brid-gy.appspot.com)
Posted in /articles using quill.p3k.io

Hi, I'm Aaron Parecki, Director of Identity Standards at Okta, and co-founder of IndieWebCamp. I maintain oauth.net, write and consult about OAuth, and participate in the OAuth Working Group at the IETF. I also help people learn about video production and livestreaming. (detailed bio)

I've been tracking my location since 2008 and I wrote 100 songs in 100 days. I've spoken at conferences around the world about owning your data, OAuth, quantified self, and explained why R is a vowel. Read more.

  • Director of Identity Standards at Okta
  • IndieWebCamp Founder
  • OAuth WG Editor
  • OpenID Board Member

  • 🎥 YouTube Tutorials and Reviews
  • 🏠 We're building a triplex!
  • ⭐️ Life Stack
  • ⚙️ Home Automation
  • All
  • Articles
  • Bookmarks
  • Notes
  • Photos
  • Replies
  • Reviews
  • Trips
  • Videos
  • Contact
© 1999-2025 by Aaron Parecki. Powered by p3k. This site supports Webmention.
Except where otherwise noted, text content on this site is licensed under a Creative Commons Attribution 3.0 License.
IndieWebCamp Microformats Webmention W3C HTML5 Creative Commons
WeChat ID
aaronpk_tv