Back to projects

Open source · 2023

AngularEventify

Angular architecture experiment

A typed event bus library for Angular applications focused on scoped channels, lifecycle-aware subscriptions, and low-boilerplate communication.

The problem

Large Angular applications often collect ad-hoc component communication patterns that are hard to reason about, easy to leak, and awkward to type safely.

The solution

AngularEventify offers a small, Angular-native abstraction for typed events so teams can coordinate components without turning every shared service into an accidental message broker.

Architecture decisions

  • Built on RxJS primitives already present in Angular applications, which keeps bundle impact and mental overhead low.
  • Scoped channels use dependency injection so feature boundaries stay explicit and cleanup can happen with the feature lifecycle.
  • TypeScript generics keep event payloads inferred at the call site, reducing casting and API ambiguity.

Trade-offs

  • A custom abstraction only pays off when it stays small; otherwise it becomes a second state-management system by accident.
  • Library ergonomics matter more than implementation cleverness because every rough edge becomes part of somebody else's daily workflow.

Impact

  • Published as an open-source npm package, giving other Angular teams a drop-in option for scoped, typed event communication instead of an ad-hoc shared service.
  • Core channel and subscription logic is covered by Jest tests, so the library's contract is verifiable rather than just documented.

What I learned

  • Library work forces sharper API judgment because convenience for the author is rarely the same as convenience for the user.
  • Good frontend architecture is often about boundaries and cleanup, not just adding new patterns.

Stack

AngularTypeScriptRxJSnpmJest