State Shape - AndrewYW/harmony GitHub Wiki

{  
  entities:{  
    servers:{  
      1:{  
        id:1,
        name:"creative server name",
        image_url:'/assets/images/donk.png',
        serverChannelIds:[  
          10,
          15,
          20
        ]
      },
      2:{  
        id:2,
        name:"less creative server name",
        image_url:"",
        serverChannelIds:[  
          25
        ]
      }
    },
    channels:{  
      10:{  
        id:10,
        name:"General",
        voice:false,
        serverId:1,
        channelMessageIds:[  
          100
        ]
      },
      15:{  
        id:15,
        name:"Not general",
        voice:false,
        serverId:1,
        channelMessageIds:[  
          150,
          200
        ]
      },
      20:{  
        id:20,
        name:"Not general voice",
        voice:true,
        serverId:1,        //maybe need to store current members of channel as well 
        channelMessageIds: []
      },
      25:{  
        id:25,
        name:"Unpopular channel",
        voice:false,
        serverId:2,
        channelMessageIds:[  

        ]
      }
    },
    messages:{  
      100:{  
        id:100,
        body:"Let's turnip up",
        channelId:10,
        authorId:1000
      },
      150:{  
        id:150,
        body:"I'm not cool enough for general chat",
        channelId:15,
        authorId:2000
      },
      200:{  
        id:200,
        body:"I'm not cool enough either",
        channelId:15,
        authorId:2500
      }
    },
    users:{  
      1000:{  
        id:1000,
        username:"person",
        discriminator:"1234",
        discordId:12345,
        image_url:'assets/images/guy.png',
        messageIds:[  
          100
        ]
      },
      2000:{  
        id:2000,
        username:"uncool guy", 
        discriminator:"4444",
        discordId:54321,
        image_url:'assets/images/boringguy.png',
        messageIds:[  
          150
        ]
      },
      2500:{  
        id:2500,
        username:"marginally less uncool",
        discriminator:"5555",
        discordId:65432,
        image_url:'assets/images/ehhguy.png',
        messageIds:[  
          200
        ]
      }
    }
  },
  ui:{  
    loading:true/false
  },
  errors:{  
    login:[  
      "Incorrect credentials"
    ],
    messageInput:[  
      "Message body must not be empty"
    ],
    serverForm:[  
      "Server must have a name"
    ]
  },
  session:{  
    currentUserId:50
  }
}