diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cf09be982..34f6ab52a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,11 +11,49 @@ We welcome contributions from everyone. By participating in this project, you ag - **Translations**: [Crowdin Project](https://crowdin.com/project/openfront-mls) - **Issues**: [GitHub Issues](https://github.com/openfrontio/OpenFrontIO/issues) +## Project Governance + +- The project maintainer ([evan](https://github.com/evanpelle)) has final authority on all code changes and design decisions. +- All pull requests require maintainer approval before merging. +- The maintainer reserves the right to reject contributions that don't align with the project's vision or quality standards. + +## Contribution Path for New Contributors + +To ensure code quality and project stability, we use a progressive contribution system: + +1. **New Contributors**: Limited to UI improvements and small bug fixes only. + - This helps you become familiar with the codebase. + - UI changes are easier to review and less likely to break core functionality. + - Small, focused PRs have a higher chance of being accepted. +2. **Established Contributors**: After several successful PRs and demonstrating understanding of the codebase, you may work on more complex features. +3. **Core Contributors**: Only those with extensive experience with the project may modify critical game systems. + +## Finding Something to Work On + +Before writing any code: + +1. Request to join the development [Discord](https://discord.gg/K9zernJB5z). +2. Find an issue labelled [`approved`](https://github.com/openfrontio/OpenFrontIO/issues?q=is%3Aissue%20state%3Aopen%20label%3Aapproved), or open a new issue and wait for it to be labelled `approved`. +3. Comment on the issue asking to be assigned. +4. Wait to be assigned before investing significant time. + +### PRs Without an Approved Issue + +Pull requests that do not link to an issue labelled `approved` will be **automatically closed**. The only exception is small bug fixes, which may be submitted directly without a pre-approved issue. + +If your PR is closed for this reason, open an issue describing the change, wait for it to be labelled `approved`, comment asking to be assigned, and then resubmit once you've been assigned. + +### AI-Generated PRs + +Pull requests that appear to be AI-generated without genuine author understanding will be **closed**. + +Using AI tools is fine — but you **MUST** understand the code you are submitting and be able to explain why each decision was made. If you cannot defend the design choices, justify the approach, or answer questions about how the code works in review, the PR will be closed. + ## Getting Started ### Prerequisites -- **Node.js**: Ensure you have a recent version installed. +- **Node.js**: A recent version. - **npm**: Version 10.9.2 or higher. - **Git**: For version control. @@ -36,19 +74,14 @@ We welcome contributions from everyone. By participating in this project, you ag ### Running the Game - **Full Development Mode** (Client + Server): - ```bash npm run dev ``` - - This starts the webpack dev server and the game server, and opens your browser. - + This starts the dev server and the game server, and opens your browser. - **Client Only**: - ```bash npm run start:client ``` - - **Server Only**: ```bash npm run start:server-dev @@ -68,84 +101,74 @@ git checkout -b fix/issue-number-bug-name ### Coding Standards -We enforce code quality using ESLint and Prettier. +We enforce code quality using ESLint and Prettier. All code must follow existing style patterns, and new features should not break existing functionality. -- **Format Code**: - ```bash - npm run format - ``` -- **Lint Code**: - ```bash - npm run lint - ``` -- **Lint & Fix**: - ```bash - npm run lint:fix - ``` +- **Format Code**: `npm run format` +- **Lint Code**: `npm run lint` +- **Lint & Fix**: `npm run lint:fix` ### Testing All new features and bug fixes should include relevant tests. We use **Vitest**. -- **Run Tests**: - ```bash - npm test - ``` -- **Run Coverage**: - ```bash - npm run test:coverage - ``` +- **Run Tests**: `npm test` +- **Run Coverage**: `npm run test:coverage` **Note**: All code changes in `src/core` **MUST** be tested to ensure game logic stability. ## Submitting a Pull Request -1. **Commit your changes**: - - Write clear, concise commit messages. - - Use the present tense ("Add feature" not "Added feature"). - +1. **Commit your changes** with a clear, present-tense message ("Add feature", not "Added feature"): ```bash git commit -m "Add new map rendering logic" ``` - 2. **Push to your fork**: - ```bash git push origin feature/your-feature-name ``` - -3. **Open a Pull Request (PR)**: - - Go to the original repository and click "New Pull Request". - - Select your branch. +3. **Open a Pull Request** against the original repository: - Fill out the **PR Template** completely. + - Link the approved issue (e.g., `Resolves #123`). + - Keep PRs focused on a single feature or bug fix. + - Include screenshots for UI changes. + - Describe what testing you've performed. + - Be responsive to feedback and requested changes. ### PR Checklist Before submitting, ensure you have: -- [ ] Linked the relevant issue (e.g., `Resolves #123`). +- [ ] Linked the relevant approved issue (e.g., `Resolves #123`). - [ ] Added screenshots for any UI changes. - [ ] Processed text through `translateText()` and added strings to `en.json`. - [ ] Added/Updated tests in the `tests/` directory. - [ ] Verified that `npm test` passes. - [ ] Provided your Discord username in the PR description for communication. +## Communication + +- Be respectful and constructive in all project interactions. +- Questions are welcome, but please search existing issues first. +- For major changes, discuss in an issue before starting work. + ## Translations -We use Crowdin for translations. If you want to help translate OpenFront.io: +Translators are welcome! We use Crowdin for translations. To help translate OpenFront.io: 1. Join the [Translation Discord](https://discord.gg/3zZzacjWFr). 2. Visit our [Crowdin Project](https://crowdin.com/project/openfront-mls). -3. Select your language or request a new one. +3. Sign up or log in, then join the project. +4. Select the language you want to translate. If your language isn't listed, click "Request New Language". +5. Translate the strings. -## Project Structure - -- `src/client`: Frontend game client (rendering, input, UI). -- `src/server`: Backend game server (networking, game state). -- `src/core`: Shared game logic used by both client and server. -- `resources`: Static assets (images, sounds, maps). -- `tests`: Unit and integration tests. +Feel free to ask questions in the translation Discord server! ## License By contributing, you agree that your contributions will be licensed under the [GNU Affero General Public License v3.0 (AGPL v3.0)](LICENSE). + +## Final Notes + +Remember that maintaining this project requires significant effort. The maintainer appreciates your contributions but must prioritize long-term project health and stability. Not all contributions will be accepted, and that's okay. + +Thank you for helping make OpenFront better! diff --git a/README.md b/README.md index 5d33f9c96..5aa733596 100644 --- a/README.md +++ b/README.md @@ -141,86 +141,10 @@ npm run dev:prod ## 🏗️ Project Structure - `/src/client` - Frontend game client -- `/src/core` - Shared game logic +- `/src/core` - Deterministic game simulation - `/src/server` - Backend game server - `/resources` - Static assets (images, maps, etc.) ## 🤝 Contributing -Contributions are welcome! Please feel free to submit a Pull Request. - -1. Request to join the development [Discord](https://discord.gg/K9zernJB5z). -1. Fork the repository -1. Create your feature branch (`git checkout -b amazing-feature`) -1. Commit your changes (`git commit -m 'Add some amazing feature'`) -1. Push to the branch (`git push origin amazing-feature`) -1. Open a Pull Request - -## 🌐 Translation - -Translators are welcome! Please feel free to help translate into your language. -How to help? - -1. Join the translation [Discord](https://discord.gg/3zZzacjWFr) -2. Go to the project's Crowdin translation page: [https://crowdin.com/project/openfront-mls](https://crowdin.com/project/openfront-mls) -3. Login if you already have an account / Sign up if you don't have one -4. Join the project -5. Select the language you want to translate in. If your language isn't on the list, click the "Request New Language" button and enter the language you want added there. -6. Translate the strings - -Feel free to ask questions in the translation Discord server! - -### Project Governance - -- The project maintainer ([evan](https://github.com/evanpelle)) has final authority on all code changes and design decisions -- All pull requests require maintainer approval before merging -- The maintainer reserves the right to reject contributions that don't align with the project's vision or quality standards - -### Contribution Path for New Contributors - -To ensure code quality and project stability, we use a progressive contribution system: - -1. **New Contributors**: Limited to UI improvements and small bug fixes only - - This helps you become familiar with the codebase - - UI changes are easier to review and less likely to break core functionality - - Small, focused PRs have a higher chance of being accepted - -2. **Established Contributors**: After several successful PRs and demonstrating understanding of the codebase, you may work on more complex features - -3. **Core Contributors**: Only those with extensive experience with the project may modify critical game systems - -### How to Contribute Successfully - -1. **Before Starting Work**: - - Open an issue describing what you want to contribute - - Wait for maintainer feedback before investing significant time - - Small improvements can proceed directly to PR stage - -2. **Code Quality Requirements**: - - All code must be well-commented and follow existing style patterns - - New features should not break existing functionality - - Code should be thoroughly tested before submission - - All code changes in src/core _MUST_ be tested. - -3. **Pull Request Process**: - - Keep PRs focused on a single feature or bug fix - - Include screenshots for UI changes - - Describe what testing you've performed - - Be responsive to feedback and requested changes - -4. **Testing Requirements**: - - Verify your changes work as expected - - Test on multiple systems/browsers if applicable - - Document your testing process in the PR - -### Communication - -- Be respectful and constructive in all project interactions -- Questions are welcome, but please search existing issues first -- For major changes, discuss in an issue before starting work - -### Final Notes - -Remember that maintaining this project requires significant effort. The maintainer appreciates your contributions but must prioritize long-term project health and stability. Not all contributions will be accepted, and that's okay. - -Thank you for helping make OpenFront better! +Contributions and translations are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for the workflow, the approved-issue process, project governance, and translation info.