- Updated the registration flow to check if the first admin account has been created, preventing further public registrations. - Introduced `is_first_admin_setup_available` function to determine registration availability. - Modified the `/register` and `/login` pages to redirect based on the setup state. - Enhanced the user creation process to handle internal admin accounts correctly. - Added migration script to enforce the new registration rules in the database. - Refactored chat API to improve message handling and context building. - Updated dashboard and settings components for better state management. - Improved error handling and user feedback across various components.
Supabase Directory
This directory stores SQL files for the project's Supabase/PostgreSQL database.
Current Baseline
schema.sqlis the first registered database SQL file.- Its documentation is in
docs/database/0001-initial-schema.md. - Its order is tracked in
docs/database/query-order.md. - Execution history is tracked in
docs/database/query-log.md.
Future Changes
Future schema changes should be added under:
supabase/migrations/
Optional local/demo data should be added under:
supabase/seeds/
Do not overwrite already executed SQL without also creating a new ordered migration and documenting why.
Current Ordered SQL
schema.sqlmigrations/0002_add_freelancer_os_core_tables.sql- Optional:
seeds/0001_demo_freelancer_os_data.sql