Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Digital Ocean integration to the app #43

Closed
faisalsayed10 opened this issue Jun 4, 2023 · 4 comments · Fixed by #64
Closed

Add Digital Ocean integration to the app #43

faisalsayed10 opened this issue Jun 4, 2023 · 4 comments · Fixed by #64
Labels
codeday labs enhancement New feature or request

Comments

@faisalsayed10
Copy link
Owner

For CodeDay Labs

Digital Ocean is yet another object storage platform that would be a very good integration to have in our app. The good part is that Digital Ocean fully supports the AWS S3 API, So we don't need to reinvent the wheel again!

If you look into our codebase right now, you'll see that we support Backblaze and AWS both at the same time. Also, we have only written the code for supporting AWS S3, but it works out of the box for Backblaze! (with some minor conditional changes wherever required)
image

Example: conditions inside useS3.tsx wherever small changes are required depending on the bucket:
image

Okay, so now, your job is to integrate Digital Ocean in a similar manner by making the useS3 hook compatible with it.

  • First, create a new file inside pages/new/ directory which will be used to get the credentials for that provider. (refer other files to get an idea)
  • Then, make changes in the useS3 hook wherever required. Explore how we've integrated Backblaze and try to follow it.
  • Navigate to util/globals.ts and add an object for your provider to the PROVIDERS array. (Also add a logo for the provider in the public/ directory)
  • Navigate to util/types.ts and add your provider's name to the Provider enum.
  • Finally, navigate to the useBucket hook and add a case for your provider and return that hook.
  • Also make sure to edit any provider-specific functions to make them work with your provider. (look for switch cases or if/else statements that check for the type of provider).

Refer to CONTRIBUTING.md for further guide: https://github.com/faisalsayed10/firefiles/blob/main/docs/CONTRIBUTING.md#testing

@faisalsayed10 faisalsayed10 added enhancement New feature or request codeday labs labels Jun 4, 2023
@faisalsayed10
Copy link
Owner Author

Similar to #39

@faisalsayed10
Copy link
Owner Author

faisalsayed10 commented Jun 4, 2023

Any Digital Ocean costs related to the storage buckets during the development will be reimbursed. (upto $7)

@sabrinaspage
Copy link

@nghiapham1026 and @9brian are working on this.

@faisalsayed10
Copy link
Owner Author

Awesome, looking forward to it

@faisalsayed10 faisalsayed10 linked a pull request Aug 18, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codeday labs enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants