Skip to content

Instantly share code, notes, and snippets.

@karakayasemi
Last active July 13, 2022 08:12
Show Gist options
  • Save karakayasemi/48e485561594c0bf6658bc2904d19da7 to your computer and use it in GitHub Desktop.
Save karakayasemi/48e485561594c0bf6658bc2904d19da7 to your computer and use it in GitHub Desktop.
Google Summer of Code 2018 Rocket.Chat/ Integration of Nextcloud/ownCloud as Storage and User File Provider

At the beginning of the project, we aimed to integrate ownCloud and NextCloud projects to Rocket.Chat. For this purpose, based on current GitHub issues and community expectations, we determined three main features:

  • Nextcloud/ownCloud as a storage provider.
  • Nextcloud/ownCloud as user file provider(attachment source).
  • Save an attachment to Nextcloud/ownCloud

To communicate Nextloud/ownCloud instance, we used a generic WebDAV client. This decision expanded our aim and made the integration compatible with all WebDAV servers (NextCloud, ownCloud and so on).

WebDAV as a storage provider

In the first month of my internship, I worked on enabling Rocket.Chat server administrator to use a NextCloud/ownCloud instance for storage of upload. To add ownCloud/Nextcloud as a new storage provider for Rocket.Chat, I created a new UploadFS store for them. In the store implementation, we used a WebDAV client library to communicate with Nexcloud/ownCloud server. My pull-request for this feature was merged and released with Rocket.Chat v0.66. Also, it is announced to the community in this blog post.

WebDAV as user file provider and save an attachment to WebDAV (WebDAV Integration)

In the second and last months of my internship, I integrated WebDAV servers to Rocket.Chat. For this purpose, we decided to implement the following features;

  • Allow a user to browse ownCloud/NextCloud files in Rocket.Chat and add files directly from there to Rocket conversation
  • Allow a user to upload an attachment from Rocket conversation to WebDAV account.

For the integration, I created a GUI file picker interface within Rocket.Chat to allow any user to select files from their WebDAV servers. It is allowed to add multi WebDAV accounts. WebDAV accounts details are stored in Rocket.Chat's MongoDB database and for the client/server communication, publish/subscribe approach was used in the implementation. Related pull request and issues are given below for this part of the project.

In conclusion, being a member of Rocket.Chat was an instructive and amazing experience for me. Also, it is nice to make it happen to great open source projects work together like RocketChat, ownCloud and Nextcloud. I need to thank Guilherme Gazzo for mentoring me on this project. I hope that with the experience that I have achieved with Google Summer of Code, I will be able to help Rocket.Chat with other projects as well.

@ggazzo
Copy link

ggazzo commented Aug 20, 2018

<3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment