|
1 | | -# Contributing to nostr-dm-magiclink-middleware |
| 1 | +# Contributing to Nostr DM Magic Link Middleware |
2 | 2 |
|
3 | | -We love your input! We want to make contributing to nostr-dm-magiclink-middleware as easy and transparent as possible, whether it's: |
| 3 | +First off, thank you for considering contributing to our Nostr ecosystem! This is an open-source project, and we love to receive contributions from our community. |
4 | 4 |
|
5 | | -- Reporting a bug |
6 | | -- Discussing the current state of the code |
7 | | -- Submitting a fix |
8 | | -- Proposing new features |
9 | | -- Becoming a maintainer |
| 5 | +## Code of Conduct |
10 | 6 |
|
11 | | -## We Develop with Github |
12 | | -We use GitHub to host code, to track issues and feature requests, as well as accept pull requests. |
| 7 | +This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. |
13 | 8 |
|
14 | | -## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html) |
15 | | -Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests: |
| 9 | +## How Can I Contribute? |
16 | 10 |
|
17 | | -1. Fork the repo and create your branch from `main`. |
18 | | -2. If you've added code that should be tested, add tests. |
19 | | -3. If you've changed APIs, update the documentation. |
20 | | -4. Ensure the test suite passes. |
21 | | -5. Make sure your code lints. |
22 | | -6. Issue that pull request! |
| 11 | +### Reporting Bugs |
23 | 12 |
|
24 | | -## Any contributions you make will be under the MIT Software License |
25 | | -In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern. |
| 13 | +Before creating bug reports, please check the issue list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible: |
26 | 14 |
|
27 | | -## Report bugs using Github's [issue tracker](https://github.com/HumanjavaEnterprises/nostr-dm.magiclink-middleware/issues) |
28 | | -We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/HumanjavaEnterprises/nostr-dm.magiclink-middleware/issues/new); it's that easy! |
| 15 | +* Use a clear and descriptive title |
| 16 | +* Describe the exact steps which reproduce the problem |
| 17 | +* Provide specific examples to demonstrate the steps |
| 18 | +* Describe the behavior you observed after following the steps |
| 19 | +* Explain which behavior you expected to see instead and why |
| 20 | +* Include any error messages or logs |
29 | 21 |
|
30 | | -## Write bug reports with detail, background, and sample code |
| 22 | +### Suggesting Enhancements |
31 | 23 |
|
32 | | -**Great Bug Reports** tend to have: |
| 24 | +If you have a suggestion for a new feature or enhancement: |
33 | 25 |
|
34 | | -- A quick summary and/or background |
35 | | -- Steps to reproduce |
36 | | - - Be specific! |
37 | | - - Give sample code if you can. |
38 | | -- What you expected would happen |
39 | | -- What actually happens |
40 | | -- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work) |
| 26 | +* Use a clear and descriptive title |
| 27 | +* Provide a step-by-step description of the suggested enhancement |
| 28 | +* Provide specific examples to demonstrate the steps |
| 29 | +* Describe the current behavior and explain which behavior you expected to see instead |
| 30 | +* Explain why this enhancement would be useful |
| 31 | + |
| 32 | +### Pull Requests |
| 33 | + |
| 34 | +* Fill in the required template |
| 35 | +* Do not include issue numbers in the PR title |
| 36 | +* Include screenshots and animated GIFs in your pull request whenever possible |
| 37 | +* Follow the TypeScript styleguide |
| 38 | +* Include thoughtfully-worded, well-structured tests |
| 39 | +* Document new code |
| 40 | +* End all files with a newline |
| 41 | + |
| 42 | +## Development Process |
| 43 | + |
| 44 | +1. Fork the repo and create your branch from `main` |
| 45 | +2. Run `npm install` to install dependencies |
| 46 | +3. Make your changes |
| 47 | +4. Add tests for any new functionality |
| 48 | +5. Run `npm test` to ensure nothing is broken |
| 49 | +6. Update documentation if needed |
| 50 | +7. Submit your pull request |
| 51 | + |
| 52 | +### Testing |
| 53 | + |
| 54 | +We use Jest for testing. Please ensure all tests pass before submitting a PR: |
| 55 | + |
| 56 | +```bash |
| 57 | +npm test |
| 58 | +``` |
| 59 | + |
| 60 | +For more information about testing, see our [Testing Guide](docs/testing-nostr-services.md). |
| 61 | + |
| 62 | +### TypeScript |
| 63 | + |
| 64 | +This project is written in TypeScript. Please ensure your code: |
| 65 | + |
| 66 | +* Has proper type definitions |
| 67 | +* Doesn't use `any` unless absolutely necessary |
| 68 | +* Follows our existing patterns for generics and type safety |
| 69 | + |
| 70 | +### Commit Messages |
| 71 | + |
| 72 | +* Use the present tense ("Add feature" not "Added feature") |
| 73 | +* Use the imperative mood ("Move cursor to..." not "Moves cursor to...") |
| 74 | +* Limit the first line to 72 characters or less |
| 75 | +* Reference issues and pull requests liberally after the first line |
| 76 | + |
| 77 | +## Related Projects |
| 78 | + |
| 79 | +This middleware is part of a larger Nostr ecosystem. Consider contributing to our related projects: |
| 80 | + |
| 81 | +* [nostr-auth-middleware](https://github.com/HumanjavaEnterprises/nostr-auth-middleware) |
| 82 | +* [nostr-relay-nestjs](https://github.com/HumanjavaEnterprises/nostr-relay-nestjs) |
| 83 | +* [ipfs-nostr-file-store](https://github.com/HumanjavaEnterprises/ipfs-nostr-file-store) |
41 | 84 |
|
42 | 85 | ## License |
43 | | -By contributing, you agree that your contributions will be licensed under its MIT License. |
44 | 86 |
|
45 | | -## References |
46 | | -This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md). |
| 87 | +By contributing, you agree that your contributions will be licensed under the MIT License. |
0 commit comments