DummyCoin is my test task for the job interview. I made some changes to the original task. Because cutting-edge technologies require cutting-edge technologies 😃
👊 Api is based on GRPC protocol. Because it's way better than json and written once is ready for any language.
😍 Typescript instead of Javascript. Because it’s superior.
👌 RxJS for simple and convenient state management and as a communication layer of abstraction between frontend and grpc api
💥 Proof-of-work improved. User should calculate a nounce that will lead to hash containing 0
in the beginning (constant complexity for simplicity).
This is a way better (also original task has an intenger overflow problem)
😎 Blockchain itself is implemented as a separate library
👀 Blockhain can use any db/file/memory storage that satisfies IStore
interface. Simple InMemory storage ships with this package
💪 This application also is a simple but awesome GRPC microframework. Writing new methods is a pleasure
😀 The blockchain libdummy
librarry does support consensus (pick the longest valid chain), but for demonstration purposes nodejs methods are missing
🔥 Awesome Angular 6
as a frontend framework and awesome micro
as nodejs microframework
Install docker and docker-compose. Download docker-compose file and run it
wget -O docker-compose.yml https://github.com/raw/alexbyk/dummycoin/master/docker-compose.yml
docker-compose down && docker-compose pull && docker-compose up -d
See the content of the docker-compose.yml
to find docker-hub images
./run
should be your first command after git clone
./run
- install node modules, build protos and run development servers onhttp://localhost:4200
./run start
- just run development servers./run test
- test all./run --help
- see other commands, (docker, docs generation...)
- Each subproject contains
Dockerfile
s to build an image using./run build-docker
- Each subproject contains unit and functional tests. Run
npm run test:watch
for test-driven development
libdummy
- blockchain reuseble librarymicro
- awesome grpc microframework + grpc tester, written for this app_proto
- autogenerated api files
api-grpc
- grpc based api client, written for this app, that translatesgrpc
calls intoRxJs
.state
- easyready/error/data
states withRxJs
.
We provide support for browsers using grpcwebproxy
proxy server
By default, docker images use these ports
- 9090 - angular frontend
- 9091 - grpcwebproxy
- 9092 - node grpc server
- 9093 - documentation server