All Projects → angelomelonas → grpc-web-chat

angelomelonas / grpc-web-chat

Licence: MIT license
A simple project demonstrating how both a Go and Java back end can power the same Vue.js front end using gRPC.

Programming Languages

typescript
32286 projects
Vue
7211 projects
shell
77523 projects
HTML
75241 projects
Dockerfile
14818 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to grpc-web-chat

complete-gRPC
In this course, we are going to learn about gRPC and how to use it with protocol buffer
Stars: ✭ 53 (+152.38%)
Mutual labels:  grpc-java, grpc-go
Vuebase
Building Vuebase : a Firebase-like theme : https://vuebase-theme.firebaseapp.com built with Vue and Vuetify (https://vuetifyjs.com)
Stars: ✭ 227 (+980.95%)
Mutual labels:  vuetify
Vue Expenses
A simple expense tracking application
Stars: ✭ 117 (+457.14%)
Mutual labels:  vuetify
Vue People
VuePeople lists and connects Vue.JS developers around the world.
Stars: ✭ 167 (+695.24%)
Mutual labels:  vuetify
Periodicity
A modern, powerful periodic table
Stars: ✭ 123 (+485.71%)
Mutual labels:  vuetify
Focus Budget Manager
Budget Manager application built with Vue.js, Node.js, Express.js and MongoDB
Stars: ✭ 189 (+800%)
Mutual labels:  vuetify
Vuetify Swipeout
👆 A swipe out example built with Vue CLI 3 + Vuetify + Swiper.
Stars: ✭ 117 (+457.14%)
Mutual labels:  vuetify
walrus
🕑 Real-time event streaming platform built on top of gRPC streams
Stars: ✭ 15 (-28.57%)
Mutual labels:  grpc-go
Alcali
Featureful Saltstack GUI
Stars: ✭ 218 (+938.1%)
Mutual labels:  vuetify
Vuetify Todo Pwa
✔️ A simple Todo PWA built with Vue CLI 3 + Vuex + Vuetify.
Stars: ✭ 160 (+661.9%)
Mutual labels:  vuetify
Vuetify Form Base
Schema-based Form Generator - Vue.js 2.0 Component based on Vuetify 2.0
Stars: ✭ 157 (+647.62%)
Mutual labels:  vuetify
Vuetify Datetime Picker
DatetimePicker component for Vuetify.js. https://darrenfang.github.io/vuetify-datetime-picker/
Stars: ✭ 123 (+485.71%)
Mutual labels:  vuetify
Vuetify Daterange Picker
The missing date range picker for Vuetify JS you have been looking for.
Stars: ✭ 192 (+814.29%)
Mutual labels:  vuetify
Theme Blog
A Free Material Blog Theme for Vuetify
Stars: ✭ 123 (+485.71%)
Mutual labels:  vuetify
Rotten Soup
A roguelike built with Vue, Vuetify, Tiled, rot.js, and PixiJS! Playable at https://rottensoup.herokuapp.com/
Stars: ✭ 249 (+1085.71%)
Mutual labels:  vuetify
Fanray
A blog built with ASP.NET Core
Stars: ✭ 117 (+457.14%)
Mutual labels:  vuetify
Skeleton Card Vuejs
A reusable skeleton card component written in Vuejs
Stars: ✭ 140 (+566.67%)
Mutual labels:  vuetify
Vue Admin Template
Sample Admin Template based on Vuejs & Vuetify.
Stars: ✭ 177 (+742.86%)
Mutual labels:  vuetify
vue-modern-resume
🗂 A simple resume template based on Vue.js framework and Vuetify UI toolkit.
Stars: ✭ 104 (+395.24%)
Mutual labels:  vuetify
Vue-UWP
So you think there is no Javascript Desktop native solution? I'm not so sure about that
Stars: ✭ 18 (-14.29%)
Mutual labels:  vuetify

gRPC Web Chat (Work in Progress)

A simple project demonstrating how both a Go and Java back end can power the same Vue.js front end using gRPC.

Overview

gRPC-Web Overview

Project Branches

The root of the project contains the shared API and client code. Checkout the relevant server branch in your language of choice.

master  -> dev-stable [-> dev]  -> go-dev-stable    [-> go-dev]
                                -> java-dev-stable  [-> java-dev]

Installation for Development

Requirements

Docker
  1. Install Docker on your local machine.
Protoc
  1. Go to the releases page of Protobuf.
  2. Select the latest release version.
  3. Scroll down to Assets and download the applicable file (e.g., for Windows protoc-3.8.0-rc-1-win64.zip).
  4. Extract the contents and add to your path (e.g., for Windows, simply add the protoc.exe to your path).
gRPC-Web Protoc Plugin
  1. Go to the releases page of gRPC-Web.
  2. Select the latest release version.
  3. Scroll down to Assets and download the applicable file (e.g., for Windows protoc-gen-grpc-web-1.0.4-windows-x86_64.exe).
  4. Extract the protoc-gen-grpc-web file a directory and it to your path (e.g., for Windows add the protoc-gen-grpc-web.exe file to your path).

Server

Java

  1. Checkout the java-dev-stable branch.
  2. Execute mvn clean install in the root directory to build and compile the project.
    • This will generate all the necessary Protocol Buffer files for the server and client.
    • This will execute the create-cert.sh script, generating all necessary keys and certificates for the Vue development server and the Envoy Proxy.
  3. To securely serve the Vue files on the Spring Boot server for production, execute the create-cert-java.sh script.
  4. Simply run the ChatApplication.java as a normal Java application. This will start the server. See the resources/application.properties file for server configuration details.

Go

  1. Checkout the go-dev-stable branch.
  2. TODO: Run gradle install/build script that builds files, generates protos, runs the create-cert.sh script, etc.
  3. To serve the Vue files on the Go static file server for production, execute the create-cert-go.sh script.
  4. TODO: Run the Go server somehow...

Envoy Proxy

  1. From the root directory, run the create-ca-cert.sh script to generate the Certificate Authority.
  2. In the same directory, run the create-cert.sh script. See the envoy/README.md file for more details.
    • Note: This step should be unnecessary for the Java project if the mvn clean install command was used.
  3. Run docker-compose up from the root directory to start the Envoy proxy.
    • Note: Remember to remove the Docker image after generating new certificates!

Client Development Server

  1. Run npm install and then npm run proto.
    • Note: This step is unnecessary after running the mvn clean install command for the Java server.
  2. Run npm run serve to start the development server on https://localhost:443.

Installation for Production

Requirements

Docker
  1. Install Docker on the Linux host machine. Follow the relevant instructions here:
  2. Install Docker Compose by running the following two commands (see more on Install Docker Compose):
    sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    sudo chmod +x /usr/local/bin/docker-compose
    

Java

  1. From within the project root directory, run the mvn clean install -U command to build the Java project.
  2. Copy the generated .jar file to a directory on the host machine.
  3. Run the Java Server with java -jar server-<version>.jar to start the server.

Go

  1. TODO: Figure out how to run the Go server on production.

Envoy Proxy

  1. Modify the envoy.yaml file for production. Change the following:
    • Change the domains value to the host machine IP address (or * to allow all domains).
    • Change the cors allow_origin to the correct domain (e.g., https://example.com). You can also use * to allow all origins.
    • Change the hosts socket address to the machine IP address.
  2. Copy the envoy directory to a directory on the host machine.
  3. Copy the docker-compose.yml file one level up from the envoy directory copied in the previous step.
  4. Run docker-compose up to build and deploy the Docker image.
    • NOTE: Remember to remove the docker image before running the docker-compose command if any changes to Envoy or the certificates were made.

Client

  1. If using a custom CA, add the relevant ca.crt file to the Trusted Root Certificate Authorities on your local machine.
  2. The client should now be running on https://<host-machine-ip>.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].