↖️ Projects

EMDR Lightbar

Late updated: 2023-09-20

emdr-lightbar.org is a web application developed by me at the beginning of the COVID-19 lockdowns. I was undergoing EMDR therapy at the time, and struggled with doing it over Zoom, to the point where it just wasn't effective anymore. This was tragic because up to that point, EMDR had been a transformative mode of therapy for me. There were not freely available web applications that enabled therapists to administer EMDR remotely, so I decided to create one. It is fully open source, licensed under the AGPLv3.

What is EMDR?

Eye movement desensitization and reprocessing therapy is a form of therapy that is used to treat a cluster of anxiety and post-trauma related disorders. I have complex PTSD and the difference in certain aspects of my personal life before and after undergoing EMDR treatment is night and day. Things that were impossible for me before EMDR are now at least manageable if not actually enjoyable. It does not fix everything, but it really did change my life. That’s why I created a free EMDR lightbar website.

Implementation details

The application uses server-sent events (SSE) to coordinate the lightbar between the therapist and client's computers. The therapist can observe the lightbar's movement, start and stop it, and adjust settings for their client. Any settings changed by the therapist are immediately reflected in the client's browser.

The original implementation used web-sockets, but this added significant and unnecessary complexity. Because the "syncing" is uni-directional (therapist to client), it's much simpler to implement use SSE to send events to the client whenever the therapist sends a request to the server with updated settings (including starting and stopping). Even if the client's side eventually syncs some information to the therapist (e.g., viewport width), there's no real reason why the therapist couldn't also receive these settings via SSE.

Looking into the future

There are three main things that need to improve about the current application:

  1. The audio feature is completely disabled at the moment because it simply doesn't work. I haven't figured out how to properly time the sound starting and stopping to prevent popping caused by starting or stopping at the peak or valley of the generated sine wave.
  2. The project is aesthetically miserable. It's properly utilitarian and works, but a bit of configurable colour could go a long way to make it a more appealing tool for therapists and clients.
  3. The controls need to be refined, and for this I need input from the therapists that use the application. Potential ideas are for therapists to be able to store a list of settings in local storage that they can pick from. If a therapist uses specific settings for different clients, or the same settings every time, this would save a bit of tedium. I'm sure the controls aren't intuitive and that there are significant UX improvements to be made.