diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index a279b23..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,347 +0,0 @@ -# ๐Ÿค Contributing to Microsoft Rewards Script - -
- -Microsoft Rewards Script Logo - -**Thank you for considering contributing to this project!** - -
- ---- - -## ๐Ÿ“‹ Table of Contents - -- [Code of Conduct](#code-of-conduct) -- [How Can I Contribute?](#how-can-i-contribute) -- [Development Setup](#development-setup) -- [Pull Request Process](#pull-request-process) -- [Coding Standards](#coding-standards) -- [Documentation](#documentation) - ---- - -## ๐Ÿค Code of Conduct - -This project follows a simple principle: **Be respectful and constructive**. - -- Treat all contributors with respect -- Welcome newcomers and help them learn -- Focus on constructive feedback -- Keep discussions professional and on-topic - ---- - -## ๐Ÿ’ก How Can I Contribute? - -### ๐Ÿ› Reporting Bugs - -Before creating a bug report: -- Check existing issues to avoid duplicates -- Gather diagnostic information (see [Diagnostics Guide](docs/diagnostics.md)) - -**Good bug reports include:** -- Clear title and description -- Steps to reproduce -- Expected vs actual behavior -- Environment details (OS, Node.js version, script version) -- Logs and screenshots (remember to redact sensitive info!) - -### โœจ Suggesting Features - -Feature suggestions are welcome! Please: -- Check if the feature already exists or is planned -- Explain the use case and benefits -- Consider backward compatibility -- Be open to discussion and alternatives - -### ๐Ÿ“ Improving Documentation - -Documentation improvements are highly valued: -- Fix typos or unclear instructions -- Add examples or clarifications -- Translate content (if applicable) -- Update outdated information - -### ๐Ÿ’ป Code Contributions - -Contributions to the codebase are welcome! See [Development Setup](#development-setup) below. - ---- - -## ๐Ÿ› ๏ธ Development Setup - -### Prerequisites - -- Node.js 20+ (version 22 recommended) -- Git -- A code editor (VS Code recommended) - -### Getting Started - -1. **Fork the repository** on GitHub - -2. **Clone your fork:** - ```bash - git clone https://github.com/YOUR_USERNAME/Microsoft-Rewards-Bot.git - cd Microsoft-Rewards-Bot - ``` - -3. **Install dependencies:** - ```bash - npm install - ``` - -4. **Set up configuration:** - ```bash - cp src/accounts.example.jsonc src/accounts.jsonc - # Edit accounts.jsonc with test credentials - ``` - -5. **Build the project:** - ```bash - npm run build - ``` - -6. **Run in development mode:** - ```bash - npm run dev - ``` - -### Project Structure - -``` -src/ -โ”œโ”€โ”€ browser/ # Browser automation (Playwright) -โ”œโ”€โ”€ functions/ # Core features (activities, login, workers) -โ”‚ โ””โ”€โ”€ activities/ # Individual activity handlers -โ”œโ”€โ”€ interface/ # TypeScript interfaces -โ””โ”€โ”€ util/ # Utility classes (logging, analytics, etc.) -``` - ---- - -## ๐Ÿ”„ Pull Request Process - -### Before Submitting - -1. **Create a feature branch:** - ```bash - git checkout -b feature/your-feature-name - ``` - -2. **Make your changes:** - - Write clean, documented code - - Follow existing code style - - Add comments for complex logic - -3. **Test your changes:** - ```bash - npm run build - npm run start - ``` - -4. **Commit your changes:** - ```bash - git add . - git commit -m "feat: add amazing new feature" - ``` - - Use conventional commits: - - `feat:` for new features - - `fix:` for bug fixes - - `docs:` for documentation - - `refactor:` for code refactoring - - `test:` for tests - - `chore:` for maintenance tasks - -### Submitting the PR - -1. **Push to your fork:** - ```bash - git push origin feature/your-feature-name - ``` - -2. **Create a Pull Request** on GitHub: - - Provide a clear title and description - - Reference any related issues - - Explain what changed and why - - Include screenshots/examples if applicable - -3. **Respond to feedback:** - - Be open to suggestions - - Make requested changes promptly - - Keep the discussion focused and professional - -### PR Review Process - -- Maintainers will review your PR as soon as possible -- Changes may be requested before merging -- Once approved, a maintainer will merge your contribution - ---- - -## ๐Ÿ“ Coding Standards - -### TypeScript Style - -- **Indentation:** 2 spaces (no tabs) -- **Quotes:** Single quotes for strings -- **Semicolons:** Required -- **Naming:** - - `camelCase` for variables and functions - - `PascalCase` for classes and interfaces - - `UPPER_CASE` for constants - -### Best Practices - -- Write self-documenting code with clear variable names -- Add comments for complex logic -- Keep functions small and focused (single responsibility) -- Handle errors gracefully -- Avoid code duplication -- Use TypeScript types properly (avoid `any` when possible) - -### Example - -```typescript -// โœ… Good -async function calculateRewardPoints(account: Account): Promise { - try { - const points = await fetchPointsFromAPI(account); - return points; - } catch (error) { - this.log.error('POINTS-FETCH', `Failed to fetch points: ${error.message}`); - return 0; - } -} - -// โŒ Bad -async function calc(a: any): Promise { - const p = await fetch(a); - return p; -} -``` - ---- - -## ๐Ÿ“š Documentation - -### Documentation Standards - -- Keep documentation clear and concise -- Use examples wherever possible -- Update documentation when changing functionality -- Follow the existing documentation structure - -### Documentation Files - -- `README.md` โ€” Main project overview and quick start -- `docs/*.md` โ€” Detailed guides for specific topics -- Code comments โ€” Inline documentation for complex logic - -### Writing Style - -- Use clear, simple language -- Break complex topics into steps -- Include code examples -- Add visual aids (screenshots, diagrams) when helpful -- Use emojis sparingly for visual navigation - ---- - -## ๐Ÿงช Testing - -Currently, this project doesn't have a formal test suite. If you'd like to contribute tests: - -- Use a testing framework (Jest, Mocha, etc.) -- Write unit tests for utility functions -- Consider integration tests for critical flows -- Document how to run tests - ---- - -## ๐Ÿ› Debugging - -When debugging issues: - -1. Enable diagnostics in `config.jsonc`: - ```jsonc - { - "diagnostics": { - "enabled": true, - "saveScreenshot": true, - "saveHtml": true - } - } - ``` - -2. Check logs in the console and `reports/` folder - -3. Use VS Code debugger with launch configuration - ---- - -## ๐Ÿ’ฌ Getting Help - -- **Discord:** [Join our community](https://discord.gg/k5uHkx9mne) -- **GitHub Issues:** Ask questions or report problems -- **Documentation:** Check the [docs folder](docs/index.md) - ---- - -## ๐ŸŽฏ Contribution Ideas - -Not sure where to start? Here are some ideas: - -### Beginner-Friendly - -- Fix typos in documentation -- Improve error messages -- Add code comments -- Create examples or tutorials - -### Intermediate - -- Refactor complex functions -- Improve error handling -- Add new configuration options -- Optimize performance - -### Advanced - -- Implement new activity types -- Enhance anti-detection mechanisms -- Add comprehensive testing -- Improve Docker deployment - ---- - -## ๐Ÿ™ Recognition - -Contributors will be: -- Listed in the project's contributors page -- Mentioned in release notes (for significant contributions) -- Appreciated by the community! ๐ŸŒŸ - ---- - -## ๐Ÿ“„ License - ---- - -## ๐Ÿ“„ License - -By contributing, you agree that your contributions will be licensed under the same [Non-Commercial Personal Use License](LICENSE) as the project. - ---- - ---- - -
- -**Thank you for contributing!** ๐ŸŽ‰ - -[Back to README](README.md) โ€ข [Documentation](docs/index.md) โ€ข [Discord](https://discord.gg/k5uHkx9mne) - -