```markdown # Protevus Platform Melos Configuration Documentation ## Table of Contents - [Overview](#overview) - [Repository Structure](#repository-structure) - [Setup and Configuration](#setup-and-configuration) - [Version Control Integration](#version-control-integration) - [Project Management](#project-management) - [Development Workflow](#development-workflow) - [Testing and Coverage](#testing-and-coverage) - [Documentation](#documentation) - [Code Generation](#code-generation) - [Dependency Management](#dependency-management) - [CI/CD](#cicd) - [Debugging and Utilities](#debugging-and-utilities) - [Advanced Usage](#advanced-usage) - [Best Practices](#best-practices) ## Overview The Protevus Platform uses Melos to manage our monorepo structure and automate various development tasks. This comprehensive guide outlines the features provided by our Melos configuration and provides detailed instructions on how to use them effectively. ### Project Information - Project name: `protevus_platform` - Repository: `https://github.com/protevus/platform` ### Directory Structure ``` project/ ├── apps/ # Flutter applications ├── packages/ # Dart/Flutter packages ├── examples/ # Example projects ├── templates/ # Project templates ├── tools/ # Build and maintenance scripts └── config/ # Configuration files ``` ## Setup and Configuration ### Initial Setup ```bash # Configure the entire development environment melos run configure ``` This command performs a comprehensive setup: 1. Bootstraps the workspace 2. Generates code for platform_container_generator 3. Creates dummy tests for specific packages 4. Runs reflectable debugging 5. Executes test suite 6. Generates coverage reports 7. Creates API documentation ### IDE Integration - IntelliJ integration is disabled to prevent conflicts with our custom setup. ### Configuration Management ```bash # Combine configuration files melos run combine_config ``` Combines multiple configuration files: - analyze.yaml - generate.yaml - publish.yaml - docs.yaml - coverage.yaml - clean.yaml - configure.yaml - test.yaml - create.yaml - dependencies.yaml - ci.yaml - debug.yaml - utils.yaml ## Version Control Integration ### Version Management - Version bump commit message format: "chore: Bump version to %v" - Main versioning branch: `main` - Changelog features: - Version commits are linked - Workspace-level changelog generation Example version management: ```bash # Standard version bump melos version --yes # Specific version bump melos version 1.2.3 --yes # Prerelease version melos version prerelease --preid beta --yes ``` ## Project Management ### Creating New Projects #### Standard Project Creation ```bash melos run create -- --type --category --name ``` ##### Categories for Dart Projects: - `package`: Standard Dart package - `console`: Command-line application - `server`: Server-side application with built-in dependencies: - shelf_router - dotenv - logger - `desktop`: Desktop application with: - window_manager - screen_retriever - `plugin`: Dart plugin package ##### Categories for Flutter Projects: - `app`: Standard mobile application - `web`: Web-optimized application - `desktop`: Multi-platform desktop application - `plugin`: Flutter plugin - `module`: Add-to-app module - `package`: Flutter-specific package #### Template-Based Project Creation ```bash melos run template template_name: