Environment Overview
TalentG uses a multi-environment setup to ensure safe development and deployment practices.Environment Types
Development (Local)
Purpose: Local development and testing Configuration:- URL:
http://localhost:3000 - Database: Local Supabase project
- Authentication: Development Supabase Auth
- Storage: Local Supabase Storage
- Logging: Console logging enabled
- Hot reload enabled
- Debug logging
- Mock data available
- Development-only features
Staging
Purpose: Pre-production testing and validation Configuration:- URL:
https://talentg-staging.vercel.app - Database: Staging Supabase project
- Authentication: Staging Supabase Auth
- Storage: Staging Supabase Storage
- Logging: Structured logging
- Automatic deployment from
stagingbranch - Vercel preview deployments
- Database migrations applied automatically
Production
Purpose: Live application serving end users Configuration:- URL:
https://talentg.vercel.app - Database: Production Supabase project
- Authentication: Production Supabase Auth
- Storage: Production Supabase Storage
- Logging: Production logging with monitoring
- Automatic deployment from
mainbranch - Zero-downtime deployments
- Database backups enabled
Environment Variables
Required Variables
Environment-Specific Values
| Variable | Development | Staging | Production |
|---|---|---|---|
NEXT_PUBLIC_APP_URL | http://localhost:3000 | https://talentg-staging.vercel.app | https://talentg.vercel.app |
NODE_ENV | development | staging | production |
LOG_LEVEL | debug | info | warn |
ENABLE_ANALYTICS | false | true | true |
Database Management
Schema Migrations
Environment-Specific Policies
Deployment Strategy
Branch Strategy
main: Production deploymentsstaging: Staging deploymentsfeature/*: Development branches
CI/CD Pipeline
- Code Push: Triggered on branch push
- Build: Next.js build with environment-specific config
- Test: Automated testing suite
- Deploy: Vercel deployment
- Database: Migration application
- Health Check: Post-deployment validation
Rollback Strategy
- Vercel: Automatic rollback to previous deployment
- Database: Migration rollback scripts
- Environment Variables: Version-controlled configuration
Monitoring & Logging
Development
- Console logging with detailed stack traces
- React DevTools integration
- Supabase dashboard for database queries
Staging
- Structured logging with context
- Performance monitoring
- Error tracking with Sentry
Production
- Minimal logging for performance
- Real-time monitoring
- Alerting for critical issues
- Analytics and user behavior tracking
Security Considerations
Environment Isolation
- Separate Supabase projects per environment
- Different API keys and secrets
- Isolated user data and authentication
Access Control
- Development: Full team access
- Staging: Limited team access
- Production: Restricted access with approval process
Data Protection
- Development: Mock/sample data
- Staging: Anonymized production data
- Production: Full data protection compliance