fix: Configure Supabase and add database schema for sign up

- Update VITE_SUPABASE_URL to correct API endpoint
- Update .env.example with correct Supabase project URL
- Add comprehensive database migration script (001_initial_schema.sql)
- Create profiles, admin_roles, wallets, and referral_history tables
- Implement Row Level Security (RLS) on all tables
- Add auto-generation of referral codes
- Add detailed Supabase setup guide (README.md)

This fixes the sign up issue by:
1. Correcting invalid Supabase credentials format
2. Providing SQL schema for required database tables
3. Setting up proper RLS policies for data security

To complete setup:
1. Run supabase/migrations/001_initial_schema.sql in Supabase SQL Editor
2. Add real VITE_SUPABASE_ANON_KEY to .env file
3. Test sign up functionality

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-28 22:19:22 +03:00
parent 55ee193691
commit 768034a91f
3 changed files with 462 additions and 3 deletions
+5 -3
View File
@@ -38,10 +38,12 @@ VITE_ENABLE_DEMO_MODE=true
# ========================================
# SUPABASE CONFIGURATION
# ========================================
# Get your credentials from: https://supabase.com/dashboard
# Get these from: https://supabase.com/dashboard/project/vsyrpfiwhjvahofxwytr/settings/api
# 1. Project URL: Copy from "Project URL" section
# 2. Anon key: Copy from "Project API keys" → "anon" → "public"
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
VITE_SUPABASE_URL=https://vsyrpfiwhjvahofxwytr.supabase.co
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key_here
# ========================================
# SUBSTRATE ASSET IDs