Skip to content

jvlxz/my_teams

Repository files navigation

My Teams - Collaborative Communication Application

My Teams is a server and CLI client application designed to manage collaborative communication similar to Microsoft Teams. It follows a simple request-response model and uses TCP sockets for communication. The protocol supports a set of commands that facilitate various actions, such as logging in, sending messages, and creating teams, channels, threads, and comments.

Table of contents

Features

  • Creating, joining, and leaving a team
  • Creating a user
  • Creating a channel within a team
  • Creating a thread in a channel
  • Creating a comment in a thread
  • Saving and restoring users, teams, channels, threads, and associated comments
  • Personal discussions between users
  • Saving and restoring personal discussions

Getting_Started

Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • A modern C compiler
  • Make utility
  • A Unix-based operating system (Linux, macOS)

Installation

  • Clone the repository:
git clone https://github.com/yourusername/myteams.git
  • Change to the project directory:
cd myteams
  • Compile the project:
make
  • Set environment variable for each terminal that you use:
export LD_LIBRARY_PATH=$PWD/libs/myteams

Usage

Server

To start the server, run the following command in the terminal:

./myteams_server <port>
  • <port>: The port number on which the server socket listens.

Client

To start the client, run the following command in the terminal:

./myteams_client <ip_address> <port>
  • <ip_address>: The IP address of the server.
  • <port>: The port number on which the server socket listens.

Protocol_Specification

Commands

The MyTeams protocol supports the following commands:

Endpoints Parameter Type Description
/help List all available command or specific command details if command_name is provided
/login user_name string Required. Set the user_name used by the client
/logout Disconnect the client from the server
/users Get the list of all users that exist on the domain
/user user_uuid string Required. Get details about the requested user
/send user_uuid string Required. Send a message to a specific user
/messages user_uuid string Required. List all messages exchanged with the specified use
/subscribe team_uuid string Required. Subscribe to the events of a team and its subdirectories (enable reception of all events from a team)
/subscribed ?team_uuid string Optionnal. List all subscribed teams or list all users subscribed to a team
/unsubscribe team_uuid string Required. Unsubscribe from a team
/use ?team_uuid ?channel_uuid ?thread_uuid string Required. Sets the command context to a team/channel/thread

The following commands are only available in a context: (team, channel, thread) or (team, channel) or (team) or (user) or (none):

Endpoints Description
/create Based on the context, create the sub resource
/list Based on the context, list all the sub resources
/info Based on the context, display details of the current resource

Responses

{
    "status": "{StatusCode}",
    "message": "List of users",
    ...specific data
}

Error Handling

In case of an error, the response data will contain the error message, like:

{
    "status": "{StatusCode}",
    "message": "Invalid command"
}

StatusCodes

The table below describes the status codes used in the MyTeams protocol:




Security_Considerations

  • No password authentication is required for this project.
  • A user that is not logged in should NOT be able to see connected users.
  • Someone that is NOT subscribed to a team should not be able to create a thread.
  • Someone that is NOT subscribed in a team should not receive events related to that team (new threads, etc.).

Built_With

  • C programming language
  • TCP sockets for network communication
  • Select system call for handling multiple clients

Credits

  • Kevin CARTTIGUEANE:

  • Jules DUTEL:

  • Dylan WINTER

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published