Skip to main content

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

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

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
Install these extensions for the best development experience:
VSCode will automatically suggest these extensions when you open the project.

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
Use Cmd+Shift+D (macOS) or Ctrl+Shift+D (Windows/Linux) to access debug configurations.

Code Generation

Build Configuration

The build.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
These files are hidden in VSCode but visible in the file system.

Development Scripts

Available Scripts

Use make help to see all available commands, including:

Development

Code Quality

Testing

Building

Git Hooks

Pre-commit hooks automatically run:
  1. Code Formatting: Auto-formats staged Dart files
  2. Static Analysis: Runs melos run analyze
  3. Security Checks: Prevents committing real secrets
  4. Unit Tests: Runs unit tests if available
  5. Code Generation: Checks for generated file updates
To bypass hooks temporarily:

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

  1. Check Documentation: Review /docs directory
  2. Run Diagnostics: Use make doctor and flutter doctor
  3. Clean Setup: Try make reset for a fresh start
  4. Team Support: Ask in team channels with error details

Next Steps

After setup, you can:
  1. Start Development: Use make dev-trips or make dev-money
  2. Explore Code: Check packages/ for shared code
  3. Run Tests: Use make test to verify everything works
  4. Read Architecture: Review /docs/architecture/
  5. 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
This ensures consistency between local development and production builds.