chore(github): added contribution guidelines (#105)

This commit is contained in:
Corentin THOMASSET 2025-01-26 17:39:44 +01:00 committed by GitHub
parent 4962215093
commit 5521d67a68
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 367 additions and 2 deletions

48
.github/ISSUE_TEMPLATE/bug-report.yml vendored Normal file
View file

@ -0,0 +1,48 @@
name: 🐞 Bug Report
description: File a bug report.
labels: ['bug', 'triage']
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks!
placeholder: Bug description
validations:
required: true
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen? If you have a screenshot, you can paste it here.
placeholder: Tell us what you see!
value: 'A bug happened!'
validations:
required: true
- type: textarea
id: version
attributes:
label: System information
description: What is you environment? You can use the `npx envinfo --system --browsers` command to get this information.
validations:
required: true
- type: dropdown
id: app-type
attributes:
label: Where did you encounter the bug?
options:
- Demo app (demo.papra.app)
- Public app (dashboard.papra.app
- Documentation website (docs.papra.ap)
- A self hosted instance
- Other (installations, docker, etc.)
validations:
required: true

View file

@ -0,0 +1,52 @@
name: 🚀 New feature proposal
description: Propose a new feature/enhancement
labels: ['enhancement', 'triage']
body:
- type: markdown
attributes:
value: |
Thanks for your interest in the project and taking the time to fill out this feature report!
- type: dropdown
id: request-type
attributes:
label: What type of request is this?
options:
- New feature idea
- Enhancement of an existing feature
- Deployment or CI/CD improvement
- Hosting or Self-hosting improvement
- Related to documentation
- Related to the community
- Other
validations:
required: true
- type: textarea
id: feature-description
attributes:
label: Clear and concise description of the feature you are proposing
description: A clear and concise description of what the feature is.
placeholder: 'Example: I would like to see...'
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Any other context or screenshots about the feature request here.
- type: checkboxes
id: checkboxes
attributes:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Check the feature is not already implemented in the project.
required: true
- label: Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
required: true
- label: Check that the feature is technically feasible and aligns with the project's goals.
required: true

128
CODE_OF_CONDUCT.md Normal file
View file

@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
<corentinth@proton.me>.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.

137
CONTRIBUTING.md Normal file
View file

@ -0,0 +1,137 @@
# Contributing to Papra
First off, thanks for taking the time to contribute to Papra! We welcome contributions of all types and encourage you to help make this project better for everyone.
## Code of Conduct
This project adheres to the [Contributor Covenant](https://www.contributor-covenant.org/). By participating, you are expected to uphold this code. Please report unacceptable behavior to <corentinth@proton.me>
## How Can I Contribute?
### Reporting Issues
If you find a bug, have a feature request, or need help, feel free to open an issue in the [GitHub Issue Tracker](https://github.com/papra-hq/papra/issues). You're also welcome to comment on existing issues.
### Submitting Pull Requests
Please refrain from submitting pull requests that implement new features or fix bugs without first opening an issue. This will help us avoid duplicate work and ensure that your contribution is in line with the project's goals.
We follow a **GitHub Flow** model where all PRs should target the `main` branch, which is continuously deployed to production.
**Guidelines for submitting PRs:**
- Each PR should be small and atomic. Please avoid solving multiple unrelated issues in a single PR.
- Ensure that the **CI is green** before submitting. Some of the following checks are automatically run for each package: linting, type checking, testing, and building.
- PRs without a corresponding issue are welcome.
- If your PR fixes an issue, please reference the issue number in the PR description.
- If your PR adds a new feature, please include tests and update the documentation if necessary.
- Be prepared to address feedback and iterate on your PR.
- Resolving merge conflicts is part of the PR author's responsibility.
### Branching
- **Main branch**: This is the production branch. All pull requests must target this branch.
- **Feature branches**: Create a new branch for your feature (e.g., `my-new-feature`), make your changes, and then open a PR targeting `main`.
### Commit Guidelines
We use **[Conventional Commits](https://www.conventionalcommits.org/)** to keep commit messages consistent and meaningful. Please follow these guidelines when writing commit messages. While you can structure commits however you like, PRs will be squashed on merge.
## i18n
Information about the translation process can be found in the [locales README](./packages/app-client/src/locales/README.md).
### Updating an Existing Language
If you want to update an existing language file, you can do so directly in the corresponding JSON file in the [`packages/app-client/src/locales`](./packages/app-client/src/locales) directory.
## Development Setup
### Local Environment Setup
We recommend running the app locally for development. Follow these steps:
1. Clone the repository and navigate inside the project directory.
```bash
git clone https://github.com/papra-hq/papra.git
cd papra
```
2. Install dependencies:
```bash
pnpm install
```
3. Start the development server for the backend:
```bash
cd apps/papra-server
# Run the migration script to create the database schema
pnpm migrate:up
# Start the server
pnpm dev
```
4. Start the frontend:
```bash
cd apps/papra-client
# Start the client
pnpm dev
```
5. Open your browser and navigate to `http://localhost:3000`.
### Testing
We use **Vitest** for testing. Each package comes with its own testing commands.
- To run the tests for any package:
```bash
pnpm test
```
- To run tests in watch mode:
```bash
pnpm test:watch
```
All new features must be covered by unit or integration tests. Be sure to use business-oriented test names (avoid vague descriptions like `it('should return true')`).
## Writing Documentation
If your code changes affect the documentation, you must update the docs. The documentation is powered by [**Astro Starlight**](https://starlight.astro.build/).
To start the documentation server for local development:
1. Navigate to the `packages/docs` directory:
```bash
cd apps/docs
```
2. Start the documentation server:
```bash
pnpm dev
```
3. Open your browser and navigate to `http://localhost:4321`.
## Coding Style
- Use functional programming where possible.
- Focus on clarity and maintainability over performance.
- Choose meaningful, relevant names for variables, functions, and components.
## Issue Labels
Look out for issues tagged as [**good first issue**](https://github.com/papra-hq/papra/issues?q=sort%3Aupdated-desc%20is%3Aissue%20state%3Aopen%20label%3A%22good%20first%20issue%22) or [**PR welcome**](https://github.com/papra-hq/papra/issues?q=sort%3Aupdated-desc+is%3Aissue+state%3Aopen+label%3A%22PR+welcome%22) for tasks that are well-suited for new contributors. Feel free to comment on existing issues or create new ones.
## License
By contributing, you agree that your contributions will be licensed under the [AGPL3](./LICENSE), the same as the project itself.

View file

@ -62,8 +62,8 @@ A live demo of the platform is available at [demo.papra.cc](https://demo.papra.c
## Contributing
*Coming soon*
Currently, the project is in heavy development and is not yet ready for contributions as changes are frequent and the architecture is not yet finalized. However, you can star the project to follow its progress.
Contributions are welcome! Please refer to the [`CONTRIBUTING.md`](./CONTRIBUTING.md) file for guidelines on how to get started, report issues, and submit pull requests.
You can find easy-to-pick-up tasks with the [`good first issue`](https://github.com/papra-hq/papra/issues?q=sort%3Aupdated-desc%20is%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22) or [`PR welcome`](https://github.com/papra-hq/papra/issues?q=sort%3Aupdated-desc%20is%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22) labels.
## License