grabbit f557c06771 feat: complete database schema migration to UUID primary keys
## Database Migrations (18 new)
- Migrate all primary keys from SERIAL to UUID
- Add soft delete (deleted_at) to all 19 entities
- Add missing indexes for performance optimization
- Add CHECK constraints for data validation
- Add user audit fields (last_login_at, timezone, locale)
- Add weather station location fields (latitude, longitude, elevation)
- Add foreign key relationships (CameraDevice→Device, ValidatedEvent→WeatherStation)
- Prepare private key encryption fields

## Backend Entity Updates
- All entities updated with UUID primary keys
- Added @DeleteDateColumn for soft delete support
- Updated relations and foreign key types

## Backend Service/Controller Updates
- Changed ID parameters from number to string (UUID)
- Removed ParseIntPipe from controllers
- Updated TypeORM queries for string IDs

## Frontend Updates
- Updated all service interfaces to use string IDs
- Fixed CameraDevice.location as JSONB object
- Updated weather.ts with new fields (elevation, timezone)
- Added Supabase integration hooks and lib
- Fixed chart components for new data structure

## Cleanup
- Removed deprecated .claude/agents configuration files

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 03:33:26 +08:00

44 lines
1.6 KiB
Plaintext

# Database Configuration
# Use Supabase DATABASE_URL for production
DATABASE_URL=postgresql://postgres:[YOUR-PASSWORD]@db.your-project.supabase.co:5432/postgres
TEST_DATABASE_URL=postgresql://username:password@host:port/test_database_name
# Supabase Configuration
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_PUBLISHABLE_KEY=sb_publishable_xxx
SUPABASE_SECRET_KEY=sb_secret_xxx
SUPABASE_JWT_SECRET=your-supabase-jwt-secret
# JWT Configuration (legacy - will be replaced by Supabase Auth)
JWT_ACCESS_SECRET=your-super-secret-access-key-change-this-in-production
JWT_REFRESH_SECRET=your-super-secret-refresh-key-change-this-in-production
JWT_ACCESS_EXPIRATION=15m
JWT_REFRESH_EXPIRATION=7d
# Optional - Application Configuration
PORT=3000
NODE_ENV=development
# Optional - Security Configuration
BCRYPT_SALT_ROUNDS=10
# AWS Configuration (deprecated - migrating to Supabase Storage)
# AWS_REGION=us-east-1
# AWS_ACCESS_KEY_ID=your-aws-access-key-id
# AWS_SECRET_ACCESS_KEY=your-aws-secret-access-key
# AWS_S3_BUCKET_NAME=meteor-events-bucket
# AWS_SQS_QUEUE_URL=https://sqs.us-east-1.amazonaws.com/123456789012/meteor-events-queue
# Payment Provider Configuration
# Stripe
STRIPE_API_KEY=sk_test_your_stripe_secret_key_here
STRIPE_WEBHOOK_SECRET=whsec_your_stripe_webhook_secret_here
# Additional payment providers can be added here:
# PAYPAL_CLIENT_ID=your_paypal_client_id
# PAYPAL_WEBHOOK_SECRET=your_paypal_webhook_secret
# ALIPAY_API_KEY=your_alipay_api_key
# ALIPAY_WEBHOOK_SECRET=your_alipay_webhook_secret
# WECHAT_API_KEY=your_wechat_api_key
# WECHAT_WEBHOOK_SECRET=your_wechat_webhook_secret