Coder Social home page Coder Social logo

microservice-go's Introduction

Microservices for web chat and event invites

This project uses a GraphQL to handle web chats and event CURD

Model

  • User
  • Event

Seeder

object factory manufactures model objects

Graphql

type user{
    "name": str, 
    "password": str,
    "phone": str, required
    "email": str, 
    "emailConfirmed": bool, 
    "token": str,
    "createdAt": timestamp,
    "updatedAt": timestamp,
    "deletedAt": timestamp,
}
type events{
    "name": str, required
    "isVirtual": bool, required
    "isPrivate": bool, required
    "size": int, required
    "owner": user_id, required
    "guests":[
      {
      "user_id": object_id, 
      "phone": str,
      "confirmed": nil},
      ], required
    "intro": str,
    "createdAt": timestamp,
    "updatedAt": timestamp,
    "deletedAt": timestamp,
    "startAt": timestamp, required
    "endAt": timestamp, required
    "location":[
      "zoom":{
        "id":str,
        "password":str},
      "address":{
          "street":str,
          "city":str,
          "state":str}], required
    "chats":[
      {
        "user_id": object_id,
        "name": str,
        "message": str},]
}

Microservices

Microservices use RabbitMQ for internal communication.

  • GraphQL for external communication
  • Restful API for internal communication

Event Service

API

authenticated post

mutate event{}

response

{
  "data":{
    "event":{
      "_id": object_id,
    }
  }
}

Test

  • service runnable
  • service stoppable
  • read events
  • create event
  • update event
  • delete event

User Service

API

tests

  • login to get token
  • logout to delete token
  • use token to get protected resources
  • use token to push protected resources
  • use token to delete protected resources

Invite Service

Chat Service

API

authenticated post

mutate events(id){
  "chats": push
      { 
      "user_id": object_id,
      "name": str,
      "message": str,
      }
}

response

{
  "data":{
    "event":{
      "_id": object_id,
      "chats":[...]
    }
  }
}

microservice-go's People

Contributors

0xd5dc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.