Open ishowvel opened 2 days ago
@0x4007 can you give your views on this. there is nothing that clearly states how supabase should be set up. following the steps in the readme will result in a table not found error when a user tries to add their wallet using /wallet.
@gentlementlegen @Whilefoo might know more here
@UbiquityOS explain as clearly and concisely as possible on how to set up supabase for this plugin for a first time contributor.
To set up Supabase for the command-wallet
plugin as a first-time contributor, follow these steps:
Create a Supabase Project
Obtain Supabase Credentials
SUPABASE_URL
here.SUPABASE_KEY
(use the anon
key for development).Configure Environment Variables
cp .dev.vars.example .dev.vars
.dev.vars
: Open the .dev.vars
file and fill in the Supabase credentials:
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key
.dev.vars.example
file.Set Up Supabase Tables
wallets
Table:
wallets
id
(UUID, Primary Key, Default: uuid_generate_v4()
)user_id
(UUID, Foreign Key referencing auth.users(id)
)wallet_address
(Text, Not Null)created_at
(Timestamp, Default: now()
)CREATE TABLE wallets (
id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
user_id uuid REFERENCES auth.users(id),
wallet_address text NOT NULL,
created_at timestamp with time zone DEFAULT now()
);
Run Migrations (If Applicable)
yarn migrate
Generate Supabase Types
yarn prebuild
Start the Development Server
yarn wrangler
/wallet
command to confirm that the tables are correctly integrated.Additional Configuration (Optional)
Summary:
SUPABASE_URL
, SUPABASE_KEY
)wallets
) in Supabaseyarn prebuild
to generate typesyarn wrangler
By following these steps, first-time contributors should be able to set up Supabase successfully for the command-wallet
plugin. Make sure to update the project's README with these detailed instructions to assist future contributors.
Not sure how accurate this is but most of it seems to check out
@ishowvel You can refer to https://github.com/ubiquity-os/database to set up your own Supabase instance, should just be a matter of cloning and supabase start
.
It would have been really helpful if it was linked ðŸ˜ðŸ˜ðŸ˜
We created this repository 2 days ago because we noticed the database was still located within the old bot. I'll add the link in the readme.
There is nothing in the readme as of right now which might give a hint on populating the tables in supabase, this might be a headache for first time contributors