firefiles icon indicating copy to clipboard operation
firefiles copied to clipboard

Feature: Deta Support

Open faisalsayed10 opened this issue 4 years ago • 0 comments

Deta is a very user-friendly cloud platform that enables users to use the cloud for free! (unlike s3). This would be a very good integration to have in our app. We will need to implement Deta support just like how Firebase is implemented.

If you look into our codebase right now, you will see that we have a custom hook called useFirebase that allows all the CRUD functions for the bucket.

So now, your job is to integrate Deta in a similar manner by making a useDeta hook.

  • First, create a new file inside pages/new/ directory which will be used to get the credentials for that provider. (refer to other files to get an idea)
  • Then, create a useDeta hook. Explore how we've integrated Firebase 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 guidance: https://github.com/faisalsayed10/firefiles/blob/main/docs/CONTRIBUTING.md#testing

faisalsayed10 avatar Feb 06 '22 17:02 faisalsayed10