🥱 MicroservicesLast updated on Dec 4, 2020A live streaming applicationServicesClient: Next.jsWebRTCAuthChatAlterPaymentsDonationOrdersExpirationCommon: share code by npmjs.comDevopsDockerKubernetesIngress-NginxCI/CDSkaffoldWireGuardInit a Microservice workflowA Typescirpt Servicenode init -y npm install typescript ts-node-dev express @types/expresstsc –initpackage.json “start”: “ts-node-dev src/index.ts"npm startA Typescirpt Service…dockerclient/Dockfileclient/.dockerignoredocker build -t zane5/auth .docker…k8sinfra/k8s/client-depl.yamlinfra/k8s/ingress-srv.yamlk8sinfra/k8s/client-depl.yaml…skaffoldskaffold.yamlrun skaffold devskaffold…sql/nosqlauth-mongo-depl.yamlsql/nosqlauth-mongo-depl.yamlViewer does not support full SVG 1.1A Auth ServicePage 1Page 1https://steaming.devhttps://steaming.devReact APPclient browersReact APP…MongoDB InstanceMongoDB InstanceAuth ServiceAuth ServiceExpress APPExpress APPMongooesMongooesRequest to Purchase Item auth 1{ticketId: ‘xxx’}JWT, Cookie 30min oldRequest to Purchase Item auth 1…Auth ServiceAuth ServiceToken refresh logicToken refresh logicOroder ServiceOroder ServiceTicket Purchase LogicTicket Purchase Logiclogged in ?logged in ?purchase this ticketpurchase this ticketRequest to Purchase Item auth2{ticketId: ‘xxx’}JWT, Cookie 30min oldRequest to Purchase Item auth2…Auth ServiceAuth ServiceToken refresh logicToken refresh logicJWT Cookie over 30 minJWT Cookie over 30 minOroder ServiceOroder ServiceTicket Purchase LogicTicket Purchase Logiclogged in ?logged in ?purchase this ticketpurchase this ticketJWT Cookie older than 30 minJWT Cookie older than 30 minrefresh JWT Cookierefresh JWT CookieAdmin UserAdmin UserAuth DBAuth DBAuth ServiceAuth ServiceUser Management LogicUser Management LogicUpdate DBUpdate DBEmit a user banned eventEmit a user banned eventEvent BusEvent BusUserBanner EventUserBanner EventOrders ServiceOrders Servicebanned user in memory cache in 30min{id: ‘xxx’}30minbanned user in memory cache in 3…Page 1Page 1https://steaming.devhttps://steaming.devContainerClientClientNext.JSNext.JSOrder ServiceOrder ServiceAuth ServiceAuth Servicerequestgetrequest…ResponseFull rendered HTMLResponse…Viewer does not support full SVG 1.1ModelUser+ email: string+ password: stringOrder+ userId: ref+ state: create | cancel | Awaiting Payment | Complete+ ticketId: ref+ expiresAt: Dateitem (gift)+ title: string+ price: number+ userId: ref+ orderId: ref+ type: stringCharge+ orderId: ref+ stateus: create | failed | completed+ amount: number+ stripeId: string+ stripeRefundId: stringZane ZhengFull Stack (Ruby on Rails) / DevopsAn Full Stack / Devops with JS, Ruby, Linux, JAMStack, MicroServices.