Spaces:
Sleeping
Sleeping
Commit ·
f7cdd52
1
Parent(s): e933369
chore: add GitHub community and contributing templates
Browse files- Add code of conduct, contributing guide, and pull request template
- Add issue templates for bug reports and feature requests
.github/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Code of Conduct
|
| 2 |
+
|
| 3 |
+
## Our Pledge
|
| 4 |
+
|
| 5 |
+
We are committed to providing a welcoming and inclusive experience for everyone.
|
| 6 |
+
|
| 7 |
+
## Our Standards
|
| 8 |
+
|
| 9 |
+
- Be respectful and considerate
|
| 10 |
+
- Welcome newcomers and help them get started
|
| 11 |
+
- Focus on constructive feedback
|
| 12 |
+
- Accept responsibility for mistakes
|
| 13 |
+
|
| 14 |
+
## Enforcement
|
| 15 |
+
|
| 16 |
+
Unacceptable behavior may result in a temporary or permanent ban from the project.
|
| 17 |
+
|
| 18 |
+
## Reporting
|
| 19 |
+
|
| 20 |
+
Report issues to the project maintainers.
|
.github/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Contributing
|
| 2 |
+
|
| 3 |
+
Thank you for considering contributing to this project.
|
| 4 |
+
|
| 5 |
+
## Development Setup
|
| 6 |
+
|
| 7 |
+
```bash
|
| 8 |
+
git clone https://github.com/dangkhoa2016/NodeJs-JSON-API-Server.git
|
| 9 |
+
cd NodeJs-JSON-API-Server
|
| 10 |
+
yarn install
|
| 11 |
+
```
|
| 12 |
+
|
| 13 |
+
## Setting up the database
|
| 14 |
+
|
| 15 |
+
```bash
|
| 16 |
+
yarn db:setup # migrate + seed (required before first start)
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
## Running Tests
|
| 20 |
+
|
| 21 |
+
```bash
|
| 22 |
+
yarn test # run all tests once
|
| 23 |
+
yarn test:watch # watch mode
|
| 24 |
+
yarn test:coverage # run with V8 coverage report
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
## Code Style
|
| 28 |
+
|
| 29 |
+
- Prefer Node.js built-ins over third-party dependencies where possible
|
| 30 |
+
- Keep functions focused and small
|
| 31 |
+
- Follow the existing patterns in `src/` and `tests/`
|
| 32 |
+
|
| 33 |
+
## Pull Request Process
|
| 34 |
+
|
| 35 |
+
1. Fork the repo and create a branch from `main`
|
| 36 |
+
2. Add tests for any new functionality
|
| 37 |
+
3. Ensure all tests pass (`yarn test`)
|
| 38 |
+
4. Update documentation if needed
|
| 39 |
+
5. Submit a pull request with a clear description
|
| 40 |
+
|
| 41 |
+
## Reporting Bugs
|
| 42 |
+
|
| 43 |
+
Open an issue with:
|
| 44 |
+
- Steps to reproduce
|
| 45 |
+
- Expected vs actual behavior
|
| 46 |
+
- Node.js version and OS
|
.github/ISSUE_TEMPLATE/bug_report.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: Bug Report
|
| 3 |
+
about: Report a bug to help us improve
|
| 4 |
+
title: "[Bug] "
|
| 5 |
+
labels: bug
|
| 6 |
+
assignees: ""
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
## Description
|
| 10 |
+
|
| 11 |
+
A clear description of the bug.
|
| 12 |
+
|
| 13 |
+
## Steps to Reproduce
|
| 14 |
+
|
| 15 |
+
1.
|
| 16 |
+
2.
|
| 17 |
+
3.
|
| 18 |
+
|
| 19 |
+
## Expected Behavior
|
| 20 |
+
|
| 21 |
+
What you expected to happen.
|
| 22 |
+
|
| 23 |
+
## Actual Behavior
|
| 24 |
+
|
| 25 |
+
What actually happened.
|
| 26 |
+
|
| 27 |
+
## Environment
|
| 28 |
+
|
| 29 |
+
- Node.js version:
|
| 30 |
+
- OS:
|
| 31 |
+
- Redis (yes/no, version if applicable):
|
| 32 |
+
|
| 33 |
+
## Additional Context
|
| 34 |
+
|
| 35 |
+
Any logs, screenshots, or related info.
|
.github/ISSUE_TEMPLATE/feature_request.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: Feature Request
|
| 3 |
+
about: Suggest a new feature
|
| 4 |
+
title: "[Feature] "
|
| 5 |
+
labels: enhancement
|
| 6 |
+
assignees: ""
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
## Description
|
| 10 |
+
|
| 11 |
+
A clear description of the feature.
|
| 12 |
+
|
| 13 |
+
## Use Case
|
| 14 |
+
|
| 15 |
+
Why this feature is needed.
|
| 16 |
+
|
| 17 |
+
## Proposed Solution
|
| 18 |
+
|
| 19 |
+
How you think it should work.
|
| 20 |
+
|
| 21 |
+
## Alternatives Considered
|
| 22 |
+
|
| 23 |
+
Other approaches you've thought about.
|
.github/PULL_REQUEST_TEMPLATE.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## Summary
|
| 2 |
+
|
| 3 |
+
Brief description of changes.
|
| 4 |
+
|
| 5 |
+
## Changes
|
| 6 |
+
|
| 7 |
+
-
|
| 8 |
+
-
|
| 9 |
+
|
| 10 |
+
## Related Issues
|
| 11 |
+
|
| 12 |
+
Closes #
|
| 13 |
+
|
| 14 |
+
## Checklist
|
| 15 |
+
|
| 16 |
+
- [ ] Tests added/updated
|
| 17 |
+
- [ ] All tests pass (`yarn test`)
|
| 18 |
+
- [ ] Documentation updated (if applicable)
|
| 19 |
+
- [ ] No breaking changes (or documented in PR)
|