Archon/archon-ui-main/src/features/auth
Luis Erlacher a6b9640738 fix: Configure Vite to load environment variables from root directory
Fixes authentication environment variable loading by properly configuring Vite's envDir to read from the project root instead of the archon-ui-main directory.

Changes:
- Configure vite.config.ts with envDir pointing to parent directory
- Add explicit VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY to .env
- Create vite-env.d.ts for TypeScript environment variable types
- Add debug logging to supabaseClient.ts for troubleshooting
- Update .env.example with proper Vite variable configuration
- Update AUTHENTICATION_SETUP.md with corrected setup instructions

Technical details:
- Vite's loadEnv() only loads vars for config use, not client injection
- envDir config is required to tell Vite where to find .env for client code
- Variables must be explicitly defined (Vite doesn't expand ${VAR} syntax)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 18:07:02 -03:00
..
components feat: Add Supabase authentication with login/signup pages 2025-11-15 04:13:17 +00:00
config fix: Configure Vite to load environment variables from root directory 2025-11-16 18:07:02 -03:00
context feat: Add Supabase authentication with login/signup pages 2025-11-15 04:13:17 +00:00
hooks feat: Add Supabase authentication with login/signup pages 2025-11-15 04:13:17 +00:00
services feat: Add Supabase authentication with login/signup pages 2025-11-15 04:13:17 +00:00
types feat: Add Supabase authentication with login/signup pages 2025-11-15 04:13:17 +00:00