firefiles
firefiles copied to clipboard
Feature: Deta Support
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
useDetahook. Explore how we've integrated Firebase and try to follow it. - Navigate to
util/globals.tsand add an object for your provider to thePROVIDERSarray. (Also add a logo for the provider in thepublic/directory) - Navigate to
util/types.tsand add your provider's name to theProviderenum. - Finally, navigate to the
useBuckethook 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