Development Environment Setup
This guide covers the complete setup of the development environment for Remind Tools, including all tools, configurations, and best practices.Quick Start
Automated Setup (Recommended)
Manual Setup
If you prefer to set up manually or encounter issues with the automated script:Environment Configuration
Environment Files
The project uses multiple environment files for different deployment targets:.env
- Your local development environment (not committed).env.example
- Template with placeholder values (committed).env.development
- Development environment settings (committed).env.staging
- Staging environment settings (committed).env.production
- Production environment settings (committed)
Environment Variables
Variable | Description | Required |
---|---|---|
SUPABASE_URL | Supabase project URL | Yes |
SUPABASE_ANON_KEY | Supabase anonymous key | Yes |
SUPABASE_SERVICE_KEY | Supabase service role key | Yes |
MAPBOX_ACCESS_TOKEN | MapBox access token for maps | Yes |
MAPBOX_SECRET_TOKEN | MapBox secret token | No |
GEMINI_API_KEY | Google Gemini AI API key | Yes |
ENVIRONMENT | Current environment (development/staging/production) | Yes |
DEBUG_MODE | Enable debug features | Yes |
ENABLE_LOGGING | Enable application logging | Yes |
Switching Environments
Use the Makefile commands to quickly switch between environments:VSCode Configuration
The project includes comprehensive VSCode configuration for optimal Flutter development.Workspace Settings
The.vscode/settings.json
file includes:
- Flutter/Dart Configuration: Hot reload, debugging, analysis
- Code Formatting: Auto-format on save, organize imports
- File Management: Hide generated files, nest related files
- Performance: Optimized analysis server settings
- Terminal: Proper PATH configuration for Dart tools
Recommended Extensions
Install these extensions for the best development experience:Debug Configurations
Pre-configured launch configurations for:- Both Apps: Debug, Profile, Release modes
- Multi-Platform: Web, macOS, iOS, Android
- Testing: Unit tests, Integration tests
- Environment-Specific: Development, Staging, Production
Cmd+Shift+D
(macOS) or Ctrl+Shift+D
(Windows/Linux) to access debug configurations.
Code Generation
Build Configuration
Thebuild.yaml
file configures code generation for:
- Freezed: Immutable data classes with copyWith, equality
- JSON Serializable: JSON serialization/deserialization
- Auto Route: Type-safe navigation
- Riverpod: State management providers
Running Code Generation
Generated File Patterns
Generated files follow these patterns:*.g.dart
- JSON serializable generated files*.freezed.dart
- Freezed generated files*.gr.dart
- Auto route generated files*.config.dart
- Configuration files
Development Scripts
Available Scripts
Usemake help
to see all available commands, including:
Development
Code Quality
Testing
Building
Git Hooks
Pre-commit hooks automatically run:- Code Formatting: Auto-formats staged Dart files
- Static Analysis: Runs
melos run analyze
- Security Checks: Prevents committing real secrets
- Unit Tests: Runs unit tests if available
- Code Generation: Checks for generated file updates
Debugging and Logging
Debug Configuration
The project includes comprehensive debug configuration:Logging System
Use the built-in logging system:Debug Features
Available debug features:- Network Inspector: Log all HTTP requests/responses
- Performance Profiling: Measure execution times
- Memory Leak Detection: Track memory usage
- Flutter Inspector: Widget tree debugging
- Layout Debugging: Visual debugging aids
Platform-Specific Setup
macOS Development
Web Development
Mobile Development
Troubleshooting
Common Issues
”Melos not found"
"Flutter doctor issues"
"Build failures"
"Git hooks not working"
"VSCode extensions not working”
Getting Help
- Check Documentation: Review
/docs
directory - Run Diagnostics: Use
make doctor
andflutter doctor
- Clean Setup: Try
make reset
for a fresh start - Team Support: Ask in team channels with error details
Next Steps
After setup, you can:- Start Development: Use
make dev-trips
ormake dev-money
- Explore Code: Check
packages/
for shared code - Run Tests: Use
make test
to verify everything works - Read Architecture: Review
/docs/architecture/
- Check Issues: Look at GitHub Issues for current tasks
Continuous Integration
The setup works seamlessly with CI/CD:- GitHub Actions: Uses same melos commands
- Codemagic: Pre-configured build scripts
- Quality Gates: Automated testing and analysis
- Multi-Platform: Builds for all supported platforms