Skip to content

SPA for real-time monitoring of cryptocoins, using Vue 3, Typescript, WebSockets, Docker

Notifications You must be signed in to change notification settings

arcbjorn/arc-crypto-monitor

Repository files navigation

Arc Crypto Monitor

build      lint      unit tests      e2e tests      deploy status

SPA for real-time monitoring of 25 cryptocoins with following functions:

  • search / filter coins by name
  • sort coins by name & value of currenly displayed currency (usd/eur/rub)
  • switch between currency (usd/eur/rub) coin value

Plans for the future:

  • add more unit & end-to-end tests
  • setup integration testing & add tests for getExchangeRate and tickerSubscriptions modules (api)

Checkout the demo here.

Development setup (Docker version)

Important: Distroless docker node.js image is used - it is experimental: app is only exposed to localhost & not to network.

Docker Compose

cd <project-folder>
# Clean up docker-compose environment:
# - remove local containers
# - remove named volumes declared in the compose file and anonymous volumes attached to containers
# - remove containers for services not defined in the compose file
$ docker-compose down --rmi local --volumes --remove-orphans

# Rebuild containers:
$ docker-compose build --no-cache

# Run the application in the development mode:
$ docker-compose up

# Also you can run only needed services:
$ docker-compose up <service_name1> <service_name2>

# View service logs:
$ docker-compose logs <service_name>

Docker (alternative way)

Build, run and stop the service:

# Build docker image:
$ cd <project-folder>
$ docker build --tag arc-crypto-monitor .

# Create and run the container:
$ docker run --name arc-crypto-monitor --network="host" arc-crypto-monitor node_modules/.bin/vue-cli-service serve

# If container is already created, just start it:
$ docker start arc-crypto-monitor

# Stop and remove container:
$ docker rm --force arc-crypto-monitor

# Delete all images/containers/networks/cache
$ docker system prune -a

Development setup (no Docker version)

# Install dependencies:
cd <project-folder>
yarn
# Compile and hot-reload for development:
yarn serve
# Compile and minify for production:
yarn build
# Run unit tests (Jest):
yarn test:unit
# Run end-to-end tests (Cypress):
yarn test:e2e
# Lint and fixes files (Eslint):
yarn lint

Customize configuration

See Configuration Reference.

License: MIT