This project uses a GraphQL to handle web chats and event CURD
- User
- Event
object factory manufactures model objects
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 use RabbitMQ for internal communication.
- GraphQL for external communication
- Restful API for internal communication
authenticated post
mutate event{}
response
{
"data":{
"event":{
"_id": object_id,
}
}
}
- service runnable
- service stoppable
- read events
- create event
- update event
- delete event
- 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
authenticated post
mutate events(id){
"chats": push
{
"user_id": object_id,
"name": str,
"message": str,
}
}
response
{
"data":{
"event":{
"_id": object_id,
"chats":[...]
}
}
}