|
| 1 | +# Contributing to Pudim Server |
| 2 | + |
| 3 | +Thank you for considering contributing to Pudim Server! 🎉 |
| 4 | + |
| 5 | +🇧🇷 [Leia em Português](CONTRIBUTING_PT-BR.MD) |
| 6 | + |
| 7 | +## How to Contribute |
| 8 | + |
| 9 | +### Reporting Bugs |
| 10 | + |
| 11 | +1. Check if the bug hasn't already been reported in [issues](https://github.com/pessoa736/PudimServerAPIs/issues) |
| 12 | +2. If not found, create a new issue with: |
| 13 | + - Clear and descriptive title |
| 14 | + - Steps to reproduce the problem |
| 15 | + - Expected behavior vs actual behavior |
| 16 | + - Lua version and operating system |
| 17 | + - Example code (if possible) |
| 18 | + |
| 19 | +### Suggesting Features |
| 20 | + |
| 21 | +1. Check the [Roadmap](README.md#roadmap) to see if it's already planned |
| 22 | +2. Open an issue with the `feature request` tag |
| 23 | +3. Describe: |
| 24 | + - The problem the feature solves |
| 25 | + - How you imagine the API/usage |
| 26 | + - Code examples (if applicable) |
| 27 | + |
| 28 | +### Submitting Pull Requests |
| 29 | + |
| 30 | +1. **Fork** the repository |
| 31 | +2. **Clone** your fork: |
| 32 | + ```sh |
| 33 | + git clone https://github.com/your-username/PudimServerAPIs.git |
| 34 | + cd PudimServerAPIs |
| 35 | + ``` |
| 36 | +3. Create a **branch** for your feature/fix: |
| 37 | + ```sh |
| 38 | + git checkout -b my-feature |
| 39 | + ``` |
| 40 | +4. Make your changes |
| 41 | +5. **Test** your changes: |
| 42 | + ```sh |
| 43 | + lua ./PS/mysandbox/test.lua |
| 44 | + ``` |
| 45 | +6. **Commit** your changes: |
| 46 | + ```sh |
| 47 | + git add . |
| 48 | + git commit -m "feat: feature description" |
| 49 | + ``` |
| 50 | +7. **Push** to your fork: |
| 51 | + ```sh |
| 52 | + git push origin my-feature |
| 53 | + ``` |
| 54 | +8. Open a **Pull Request** to the `dev` branch |
| 55 | + |
| 56 | +## Code Conventions |
| 57 | + |
| 58 | +### Style |
| 59 | + |
| 60 | +- Indentation with **2 spaces** |
| 61 | +- Variable names in **camelCase** |
| 62 | +- Class/module names in **PascalCase** |
| 63 | +- Comments in Portuguese or English |
| 64 | + |
| 65 | +### Commits |
| 66 | + |
| 67 | +We follow the [Conventional Commits](https://www.conventionalcommits.org/) pattern: |
| 68 | + |
| 69 | +| Type | Description | |
| 70 | +|------|-------------| |
| 71 | +| `feat` | New feature | |
| 72 | +| `fix` | Bug fix | |
| 73 | +| `docs` | Documentation changes | |
| 74 | +| `refactor` | Code refactoring | |
| 75 | +| `test` | Adding/modifying tests | |
| 76 | +| `chore` | Other changes (build, configs, etc) | |
| 77 | + |
| 78 | +Examples: |
| 79 | +``` |
| 80 | +feat: add query string support |
| 81 | +fix: fix header parsing with spaces |
| 82 | +docs: update README with new examples |
| 83 | +``` |
| 84 | + |
| 85 | +## Project Structure |
| 86 | + |
| 87 | +``` |
| 88 | +PudimServerAPIs/ |
| 89 | +├── PS/ # Main source code |
| 90 | +│ ├── init.lua # Main module (PudimServer) |
| 91 | +│ ├── http.lua # HTTP parser and responses |
| 92 | +│ ├── utils.lua # Utilities and helpers |
| 93 | +│ ├── ServerChecks.lua # Server validations |
| 94 | +│ └── mysandbox/ # Tests and experiments |
| 95 | +├── rockspecs/ # LuaRocks specs |
| 96 | +├── README.md # Documentation in English |
| 97 | +├── README_PT-BR.MD # Documentation in Portuguese |
| 98 | +└── LICENSE # MIT License |
| 99 | +``` |
| 100 | + |
| 101 | +## Development Environment |
| 102 | + |
| 103 | +### Requirements |
| 104 | + |
| 105 | +- Lua >= 5.4 |
| 106 | +- LuaRocks |
| 107 | +- LuaSocket |
| 108 | +- lua-cjson |
| 109 | + |
| 110 | +### Local Installation |
| 111 | + |
| 112 | +```sh |
| 113 | +# Install dependencies |
| 114 | +luarocks install luasocket --local |
| 115 | +luarocks install lua-cjson --local |
| 116 | + |
| 117 | +# Run tests |
| 118 | +lua ./PS/mysandbox/test.lua |
| 119 | +``` |
| 120 | + |
| 121 | +## Questions? |
| 122 | + |
| 123 | +Feel free to open an issue with the `question` tag or contact [Davi](https://github.com/pessoa736). |
| 124 | + |
| 125 | +--- |
| 126 | + |
| 127 | +Thank you for contributing! 🍮 |
0 commit comments