Skip to content

Free, open-source Windows optimization tool for performance, privacy, and simplicity.

docs: Add CODE_OF_CONDUCT, CONTRIBUTING.md, and GitHub issue/pull request templates to establish project governance.

fatDuckdf4dca3e2fea
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..8e98109
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,11 @@
+<!--
+Please consider using one of the specific issue templates available in this repository:
+- Bug Report: For reporting bugs and glitches
+- Feature Request: For suggesting new features and enhancements
+-->
+
+**Describe the issue:**
+[Provide a detailed description of the issue or question.]
+
+**Additional Context:**
+[Any other context relevant to the issue.]
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..5434e5b
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,30 @@
+---
+name: πŸ› Bug Report
+about: Create a report to help us improve optimizerDuck
+title: 'fix: [Brief description of the bug]'
+labels: bug
+assignees: ''
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior:
+1. Go to '...'
+2. Click on '....'
+3. Scroll down to '....'
+4. See error
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Desktop Environment:**
+ - OS: [e.g. Windows 10, Windows 11]
+ - Version/Build [e.g. 22H2]
+
+**Additional context**
+Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..bb0738f
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,19 @@
+---
+name: ✨ Feature Request
+about: Suggest an idea for optimizerDuck
+title: 'feat: [Brief description of the feature]'
+labels: enhancement
+assignees: ''
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..ef1ab8a
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,20 @@
+## Description
+<!-- Provide a brief description of the changes applied. Link any relevant GitHub issues here (e.g., "Fixes #123"). -->
+
+## Type of Change
+<!-- Please check the options that apply -->
+- [ ] πŸ› Bug fix (non-breaking change which fixes an issue - `fix:`)
+- [ ] ✨ New feature (non-breaking change which adds functionality - `feat:`)
+- [ ] πŸ› οΈ Refactoring (changes that neither fix a bug nor add a feature - `refactor:`)
+- [ ] πŸ“ Documentation update
+- [ ] 🌐 Translation update
+
+## Checklist
+<!-- Please ensure all of the following are checked before submitting the PR -->
+- [ ] My commit messages follow the **Conventional Commits** format (e.g., `feat: added disk cleanup`).
+- [ ] I have tested my changes locally, and all tests pass (run `dotnet test`).
+- [ ] My code follows the project's coding style and naming conventions.
+- [ ] I have added/updated `.resx` files for any new user-facing strings (no hardcoded UI text).
+
+## Screenshots / GIFs (if applicable)
+<!-- Include a visual screenshot or GIF if your pull request modifies or creates UI elements. -->
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..5de2c71
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,77 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+We as members, contributors, and leaders pledge to make participation in our
+community a harassment-free experience for everyone, regardless of age, body
+size, visible or invisible disability, ethnicity, sex characteristics, gender
+identity and expression, level of experience, education, socio-economic status,
+nationality, personal appearance, race, religion, or sexual identity
+and orientation.
+
+We pledge to act and interact in ways that contribute to an open, welcoming,
+diverse, inclusive, and healthy community.
+
+## Our Standards
+
+Examples of behavior that contributes to a positive environment for our
+community include:
+
+* Demonstrating empathy and kindness toward other people
+* Being respectful of differing opinions, viewpoints, and experiences
+* Giving and gracefully accepting constructive feedback
+* Accepting responsibility and apologizing to those affected by our mistakes,
+ and learning from the experience
+* Focusing on what is best not just for us as individuals, but for the
+ overall community
+
+Examples of unacceptable behavior include:
+
+* The use of sexualized language or imagery, and sexual attention or
+ advances of any kind
+* Trolling, insulting or derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or email
+ address, without their explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Enforcement Responsibilities
+
+Community leaders are responsible for clarifying and enforcing our standards of
+acceptable behavior and will take appropriate and fair corrective action in
+response to any behavior that they deem inappropriate, threatening, offensive,
+or harmful.
+
+Community leaders have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct, and will communicate reasons for moderation
+decisions when appropriate.
+
+## Scope
+
+This Code of Conduct applies within all community spaces, including the
+GitHub repository, issue tracker, discussions, and the project Discord server.
+It also applies when an individual is officially representing the community
+in public spaces.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported to the community leaders responsible for enforcement via:
+- **Email:** [email protected]
+- **Discord**: contact via project server (link in README)
+
+All complaints will be reviewed and investigated promptly and fairly.
+
+All community leaders are obligated to respect the privacy and security of the
+reporter of any incident.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage],
+version 2.1, available at
+[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
+
+[homepage]: https://www.contributor-covenant.org
+[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..ac89ede
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,85 @@
+# Contributing to optimizerDuck
+
+First of all, thank you for taking the time to contribute! πŸŽ‰
+We want to make contributing to `optimizerDuck` as easy, transparent, and welcoming as possible.
+
+## πŸ’¬ Where to Get Help
+If you have questions, need help, or want to discuss a feature, feel free to reach out to the author directly:
+- **Discord**: contact via project server (link in README)
+- **Email**: **`[email protected]`**
+- **GitHub Issues**: Open a discussion or an issue.
+
+## πŸ› οΈ Setting Up the Project
+
+1. **Clone the repository:**
+ ```bash
+ git clone https://github.com/itsfatduck/optimizerDuck.git
+ cd optimizerDuck
+ ```
+2. **Build the project:**
+ Execute the `build.bat` script in the root directory or run:
+ ```bash
+ dotnet build optimizerDuck.slnx
+ ```
+
+## πŸ—οΈ Project Structure & Module Organization
+
+To help you get started quickly, here is how the code is organized:
+
+- **`optimizerDuck/`**: The core C# Windows application source.
+ - `UI/`: Contains XAML views, pages, and components.
+ - `Services/`: Houses business logic and system operations (e.g., `DiskCleanupService.cs`, `OptimizationService.cs`).
+ - `Common/`: Shared utilities, helpers, and data converters.
+ - `Resources/`: Application assets and multi-language `.resx` translation files.
+- **`optimizerDuck.Test/`**: The xUnit test suite for validating application logic.
+
+## πŸ“ Coding Style & Naming Conventions
+
+This project targets modern .NET (C#) and uses XAML for the frontend presentation.
+
+- **Classes & Methods**: Use `PascalCase` (e.g., `OptimizationService`, `GetSettings()`).
+- **Variables & Parameters**: Use `camelCase` (e.g., `availableSpace`, `configData`).
+- **Linting & Formatting**: Follow standard C# conventions. The project's `.editorconfig` silently suppresses `CA1416` (Platform compatibility) warnings.
+
+## 🌍 Localization Guidelines
+
+optimizerDuck supports multiple languages. If you are adding new features or modifying the UI, please observe the following rules:
+
+1. **No Hardcoded Strings**: Never hardcode user-facing text directly in XAML or C# code.
+2. **Resource Files**: All application texts are securely managed in `.resx` files inside `optimizerDuck/Resources/Languages/`.
+ - `Translations.resx`: The primary English file. **Always** add your new keys and texts here first.
+ - `Translations.[lang].resx`: Files for other supported languages (e.g., `vi-VN`, `zh-Hans`, `ru-RU`).
+3. **Adding New Strings**:
+ - Please add any new resource keys to **all** existing `.resx` files.
+ - If you do not speak a specific language, you can use machine translation (like Google Translate or AI) as a placeholder. The community will help correct it later!
+4. **Using Translations in XAML**:
+ Always use the custom extension to bind text:
+ ```xaml
+ Text="{ext:Loc Your.Translation.Key}"
+ ```
+## πŸ§ͺ Testing Guidelines
+
+We utilize **xUnit** as our testing framework and `coverlet` for test coverage.
+
+- **Test Placement**: Align test project paths with the main project layout (e.g., tests for `Services/` go into `optimizerDuck.Test/Services/`).
+- **Naming Convention**: Suffix your test classes with `Tests` (e.g., `DiskCleanupServiceTests.cs`). Describe the behavior being tested clearly formatted in your test method names.
+- **Running Tests**: You can execute the test suite via the .NET CLI:
+ ```bash
+ dotnet test optimizerDuck.Test/optimizerDuck.Test.csproj
+ ```
+
+## πŸš€ Commit & Pull Request Guidelines
+
+We follow the **Conventional Commits** format for our Git workflow. Please structure your commit messages using these prefixes:
+
+- `feat:` for new capabilities (e.g., `feat: add disk cleanup page and its features`).
+- `fix:` for bug resolutions (e.g., `fix: use proper color`).
+- `refactor:` for restructurings or enhancements (e.g., `refactor: move converters to common`).
+
+**When submitting a Pull Request:**
+1. Prepend the PR title with the appropriate conventional commit type.
+2. Ensure all recent changes compile successfully and all tests pass.
+3. Provide a brief description of the applied modifications. Link any relevant GitHub issues.
+4. Include a visual screenshot or GIF if your pull request modifies or creates UI elements.
+
+Happy optimizing! πŸ¦†