Giter VIP home page Giter VIP logo

slack-clone's People

Contributors

dlzer avatar incidrthreat avatar kkweon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

schairez

slack-clone's Issues

Let's avoid case sensitive names

Let's rename AuthService to authservice or simply auth (lowercase) to be consistent?

AuthService/cmd/authservice/authservice.go -> auth/cmd/authservice/authservice.go

Not all file systems are case sensitive by default.

Frontend Design

I propose to start with web (no hybrid like ionic, no native like flutter, react-native) for the sake of simplicity. And, I propose Angular as it's already pretty opinionated on how to structure the code as well as how to maintain the states although other frameworks may be much simpler to begin with (but everyone will have different opinion on how to structure). Also, I assume we agree on using TypeScript at least.

There are mainly 3 pages.

Signing into your workspace

Instead of workspace your-workspace.slack.com, we will simply call your-workspace

image

This is purely done in client side. So, any outgoing requests will have this workspace ID.

Login & Signup

We will have slightly different behaviors here. Instead of email signin/signup, we simply use email & password signup/signin.
Also, the user exists per workspace. But, I believe our current implementation is global like discord. We probably need to fix this first or the spec needs to change (slack clone -> discord clone)

image

Workspace

And, we simply want to focus on chat functionality initially. So, let's not touch the thread part.

Screen Shot 2020-08-29 at 8 01 58 PM

image

Design Proposal ChatService

image

service ChatApi {
  rpc PostMessage(PostMessageRequest) returns (EmptyResponse);
  rpc UpdateMessage(UpdateMessageRequest) returns (EmptyResponse);

  // only server stream is supported in grpc web (https://github.com/grpc/grpc-web#wire-format-mode)
  rpc Subscribe(SubscribeRequest) returns (stream SubscribeResponse);
}

message PostMessageRequest {
  string token = 1;
  Message message = 2;
}

message Message {
  string user_id = 1;
  string workspace_id = 2;
  string channel_id = 3;
  string message = 4;
  google.protobuf.Timestamp timestamp = 4;
}

message SubscribeRequest {
  string token = 1;
  string workspace_id = 2;
}

message SubscribeResponse {
  Message message = 1;
}

Project structure

how it structured is monolithic because of having root internal and root pkg. Each service will freely import each other causing tight coupling.

Do you have a suggestion or expectation on how the project should be structured?

This is going to be a monorepo

Each service should be a go module as its own without root go.mod

/auth
  /internal
  /...
  go.mod
/chat
  /internal
  /...
  go.mod

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.