|
| 1 | +# Contributing to Vaani |
| 2 | + |
| 3 | +## Welcome Contributors! 🚀 |
| 4 | + |
| 5 | +We appreciate your interest in contributing to Vaani. This guide will help you navigate the contribution process effectively. |
| 6 | + |
| 7 | +## How to Contribute |
| 8 | + |
| 9 | +### Reporting Bugs 🐞 |
| 10 | + |
| 11 | +1. **Check Existing Issues**: |
| 12 | + - Search through the [GitHub Issues](https://github.com/Dr-Blank/Vaani/issues) |
| 13 | + |
| 14 | +2. **Create a Detailed Bug Report**: |
| 15 | + - Provide: |
| 16 | + * Exact steps to reproduce |
| 17 | + * Relevant error logs or screenshots |
| 18 | + |
| 19 | +### Submodule Contribution Workflow 🧩 |
| 20 | + |
| 21 | +#### Understanding Vaani's Submodule Structure |
| 22 | + |
| 23 | +Vaani uses Git submodules to manage interconnected components. This means each submodule is a separate Git repository nested within the main project. |
| 24 | + |
| 25 | +#### Working with Submodules |
| 26 | + |
| 27 | +1. **Identifying Submodules**: |
| 28 | + - List all submodules in the project |
| 29 | + ```bash |
| 30 | + git submodule status |
| 31 | + ``` |
| 32 | + |
| 33 | +2. **Initializing Submodules**: |
| 34 | + ```bash |
| 35 | + # Ensure all submodules are initialized |
| 36 | + git submodule update --init --recursive |
| 37 | + ``` |
| 38 | + |
| 39 | +3. **Contributing to a Specific Submodule**: |
| 40 | + |
| 41 | + a. **Navigate to Submodule Directory**: |
| 42 | + ```bash |
| 43 | + cd path/to/submodule |
| 44 | + ``` |
| 45 | + |
| 46 | + b. **Create a Separate Branch**: |
| 47 | + ```bash |
| 48 | + git checkout -b feature/your-submodule-feature |
| 49 | + ``` |
| 50 | + |
| 51 | + c. **Make and Commit Changes**: |
| 52 | + ```bash |
| 53 | + # Stage changes |
| 54 | + git add . |
| 55 | + |
| 56 | + # Commit with descriptive message |
| 57 | + git commit -m "feat(submodule): describe specific change" |
| 58 | + ``` |
| 59 | + |
| 60 | + d. **Push Submodule Changes**: |
| 61 | + ```bash |
| 62 | + git push origin feature/your-submodule-feature |
| 63 | + ``` |
| 64 | + |
| 65 | +4. **Updating Submodule References**: |
| 66 | + After making changes to a submodule: |
| 67 | + ```bash |
| 68 | + # From the main repository root |
| 69 | + git add path/to/submodule |
| 70 | + git commit -m "Update submodule reference to latest changes" |
| 71 | + ``` |
| 72 | + |
| 73 | +5. **Pulling Latest Submodule Changes**: |
| 74 | + ```bash |
| 75 | + # Update all submodules |
| 76 | + git submodule update --recursive --remote |
| 77 | + |
| 78 | + # Or update a specific submodule |
| 79 | + git submodule update --remote path/to/specific/submodule |
| 80 | + ``` |
| 81 | + |
| 82 | +#### Submodule Contribution Best Practices |
| 83 | + |
| 84 | +- Always work in a feature branch within the submodule |
| 85 | +- Ensure submodule changes do not break the main application |
| 86 | +- Write tests for submodule-specific changes |
| 87 | +- Update documentation if the submodule's interface changes |
| 88 | +- Create a pull request for the submodule first, then update the main project's submodule reference |
| 89 | + |
| 90 | +### Development Workflow |
| 91 | + |
| 92 | +#### Setting Up the Development Environment |
| 93 | + |
| 94 | +1. **Prerequisites**: |
| 95 | + - [Git](https://git-scm.com/) |
| 96 | + - [Flutter SDK](https://flutter.dev/) |
| 97 | + - Recommended IDE: [VS Code](https://code.visualstudio.com/) |
| 98 | + |
| 99 | +2. **Repository Setup**: |
| 100 | + |
| 101 | + 1. [Fork the repo](https://github.com/Dr-Blank/Vaani/fork) |
| 102 | + 1. Clone the forked repository to your local machine |
| 103 | + ```bash |
| 104 | + # Fork the main repository on GitHub |
| 105 | + git clone --recursive https://github.com/[YOUR_USERNAME]/Vaani.git |
| 106 | + cd Vaani |
| 107 | +
|
| 108 | + # Initialize and update submodules |
| 109 | + git submodule update --init --recursive |
| 110 | +
|
| 111 | + # Install dependencies for the main app and submodules |
| 112 | + flutter pub get |
| 113 | + ``` |
| 114 | + |
| 115 | +#### Coding Standards |
| 116 | + |
| 117 | +1. **Code Style**: |
| 118 | + - Follow [Flutter's style guide](https://dart.dev/guides/language/effective-dart/style) |
| 119 | + - Use `dart format` and `flutter analyze` |
| 120 | +
|
| 121 | + ```bash |
| 122 | + dart format . |
| 123 | + flutter analyze |
| 124 | + ``` |
| 125 | +
|
| 126 | +2. **Testing**: |
| 127 | + - Write unit and widget tests |
| 128 | + - Ensure tests pass for both the main app and submodules |
| 129 | +
|
| 130 | + ```bash |
| 131 | + flutter test |
| 132 | + ``` |
| 133 | +
|
| 134 | +### Pull Request Process |
| 135 | +
|
| 136 | +1. **Branch Naming**: |
| 137 | + - Use descriptive branch names |
| 138 | + - Prefix with feature/, bugfix/, or docs/ |
| 139 | +
|
| 140 | + ```bash |
| 141 | + git checkout -b feature/add-accessibility-support |
| 142 | + ``` |
| 143 | +
|
| 144 | +2. **Commit Messages**: |
| 145 | + - Use clear, concise descriptions |
| 146 | + - Reference issue numbers when applicable |
| 147 | + - Follow conventional commits format: |
| 148 | + `<type>(scope): <description>` |
| 149 | +
|
| 150 | +3. **Pull Request Guidelines**: |
| 151 | + - Clearly describe the purpose of your changes |
| 152 | + - Include screenshots for visual changes |
| 153 | + - Specify if changes affect specific submodules |
| 154 | + - Ensure all CI checks pass |
| 155 | +
|
| 156 | +## Communication |
| 157 | +
|
| 158 | +* [Open an Issue](https://github.com/Dr-Blank/Vaani/issues) |
| 159 | +* [Discussion Forum](https://github.com/Dr-Blank/Vaani/discussions) |
| 160 | +
|
| 161 | +## Code of Conduct |
| 162 | +
|
| 163 | +* Be respectful and inclusive |
| 164 | +* Constructive feedback is welcome |
| 165 | +* Collaborate and support fellow contributors |
| 166 | +
|
| 167 | +Happy Contributing! 🌟 |
0 commit comments