/svelte-grpc-stream

trying out streaming grpc service to a svelte frontend

Primary LanguageTypeScript

Svelte + gRPC Stream

2023-07-22.16-44-34.mp4

Infrastructure

This project consists of 5 infrastructure components

  • Traefik: ingress controller and gRPC-Web proxy
  • NATS: for queueing notifications that need to be relayed
  • Redis: caches messages
  • Relay (golang): Picks up messages from the queue and forwards them to a gRPC stream to the frontend
  • Pocketbase: For user authentication
  • Frontend (svelte & typecript): For sending notifications via the API and recieving notifications via the Relay.

Documentation

Requirements

Dev

Ingress

In your hosts file set:

127.0.0.1 frontend.docker.localhost

After running docker compose up, http://frontend.docker.localhost should now be available via Traefik.

Quickstart

docker compose up --build