Tables for Slack Clone

Let's get started by looking at the data model.


The primary functionality of the app revolves around users and their messages.

So we have the following tables.

  • users and user_message


Slack app has workspaces where users can join. It is managed by the owner and the admins of the workspace. The following tables takes care of this requirement.

  • workspace, workspace_member and workspace_user_type


Each workspace can have channels scoped to a specific topic of discussion having subset of members from the workspace. Members of the channel can post messages to the channel that everyone can see.

  • channel, channel_member, channel_thread and channel_thread_message

The final model roughly looks like the following with basic relational columns:

Slack Data Model

Note that it doesn't have the detailed column list, but it should give an idea of the relationships between different entities.


Get Started with GraphQL Now

Hasura Cloud gives you a fully managed, production ready GraphQL API as a service to help you build modern apps faster.
Ready to get started?
Start for free on Hasura Cloud or you could contact our sales team for a detailed walk-through on how Hasura may benefit your business.
Stay in the know
Sign up for full access to our community highlights, new features, and occasional baby animal gifs! Oh, and we have a strict no-spam rule. โœŒ๏ธ