Skip to content

NATS Web UI client with Avro support

Notifications You must be signed in to change notification settings

JILeXanDR/nats-avro-tester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NATS AVRO TESTER

Disclaimer

This project has been created for own needs and may contain bugs.

Tests are also missing. :(

Use it carefully on your own risk!

Stack

  • golang 1.14
  • vuejs
  • docker
  • nats
  • lib for decoding/encoding Avro schemas

Features

  • uploading your zipped Avro schemas
  • auto discovering list of subjects using "namespace" from Avro schemas
  • publishing messages (auto encode to Avro)
  • receiving any messages from all subjects
  • auto decoding messages using Avro schemas

TODO

  • better documentation
  • support publishing into JSON format
  • support publishing to custom subject
  • tests
  • refactoring
  • improve UI

Web UI

Alt text

See working example

docker-compose up

Want to use in your own project?

Just use image from Docker Hub

Inside your docker-compose.yml

version: "3"
services:
  app:
    image: jilexandr/natsavrotester:tag
    environment:
      PORT: 8080
      NATS_SERVER: "http://nats:4222"
      MAX_HIERARCHY_LEVEL: 5
      LOG_LEVEL: "trace"
    ports:
      - 9999:8080
    links:
      - nats
  nats:
    image: nats:2.1
    ports:
      - 4222

Separately using host network (not recommended)

docker run -e PORT=9999 --net=host jilexandr/natsavrotester:tag

How to develop?

At the moment there is no possibility to develop frontend part without backend part.

All requests from frontend are sent to same domain window.location.origin.

Just run both Backend and Frontend using instructions below.

Backend

ENV:

In the root of the project directory:

go run .

You'll get web server (http://localhost:8080 by default) which hosts static assets (web/dist) from Frontend part.

Frontend

In the root of the project directory:

(cd web && npm run dev)

It will keep up to date app assets inside web/dist.