Our main idea was simple: we want to show that it's possible to separate domain model from implementation and maintain this model as the first-class project. We created 3 repos connected:
- Domain model (Protobuf 3 + Rake task to build Ruby gem and Js/Ts package): 0x000000/team7-domain
- Front-end (Vue-cli + typescript): Kaciaryna/team7-frontend
- Back-end (Ruby + grpc): 0x000000/team7-backend
We created a simple server implementing LoanService
described here
server.rb
— main entry, we do all setup here.services/loan_service.rb
— simple implementation ofLoanService
.helpers/data_generator.rb
— semi-random generator for initial data:User
,Loan
andAddress
models.helpers/logger.rb
— simple logger for grpc server.bin/grpcwebproxy-v0.12.0-*
— *nix versions of pre-built binaries for the simple proxy server. This server is only required for web clients.
$ bundle
$ ./bin/grpcwebproxy{linux/osx} --allow_all_origins --backend_addr=localhost:10369 --run_tls_server=false --use_websockets --server_http_debug_port=10368 --websocket_ping_interval 5s --server_http_max_read_timeout 86400s &
$ ruby server.rb