Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@

# Contributing Guide to BelZSpeedScan

Thank you for your interest in contributing to BelZSpeedScan! This document provides guidelines and the process for contributing to the project.

## 🎯 Why Contribute?

BelZSpeedScan is a barcode and QR code scanning library designed to make scanning faster and more efficient. Your contribution can help:

- Improve user experience
- Add new features
- Fix bugs
- Improve documentation
- Optimize performance

## 🚀 Getting Started

1. **Fork the repository**
- Click the "Fork" button at the top right of the repository page.

2. **Clone your fork**
```bash
git clone https://github.com/YOUR-USERNAME/BelZSpeedScan.git
cd BelZSpeedScan

3. Set up your development environment
Make sure you have:
• Android Studio (latest stable version)
• Xcode (for iOS development)
• Kotlin 1.8.0 or higher
• Gradle 7.0 or higher
4. Create a branch for your feature

git checkout -b feature/your-feature-name



📝 Contribution Process
1. Development
• Follow existing code conventions
• Add tests for new features
• Update documentation as needed
2. Commits
• Use descriptive commit messages
• Follow the format: type(scope): description
• Example: feat(android): add background scanning support
3. Pull Request
• Make sure your code compiles and passes all tests
• Update documentation if necessary
• Clearly describe your changes in the PR
• Reference any related issues

🎨 Style Guide

Kotlin
• Follow the Kotlin Coding Conventions
• Use camelCase for variables and functions
• Use PascalCase for classes and objects
• Keep functions short and focused

Documentation
• Document all public APIs
• Use KDoc for code documentation
• Keep the README up to date

🧪 Testing
• Write unit tests for any new functionality
• Ensure all tests pass before submitting a PR
• Keep test coverage above 80%

📋 Pull Request Checklist
• Code follows the style guide
• Tests have been added for new functionality
• Documentation has been updated
• Tests pass locally
• Code compiles without warnings
• Conflicts with the main branch are resolved

🤝 Code of Conduct

Please read our Code of Conduct before contributing.

❓ Need Help?
• Open an issue for questions or problems
• Join our GitHub discussions
• Reach out to the project maintainers

📜 License

By contributing, you agree that your code will be licensed under the same license as the project (MIT).


Thank you for contributing to BelZSpeedScan! 🎉
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help us improve
title: '[BUG] '
labels: bug
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment:**
- Device: [e.g. iPhone 6, Samsung Galaxy S21]
- OS: [e.g. iOS 14.5, Android 12]
- Version [e.g. 1.0.11]
- Platform: [e.g. Android Native, KMP]

**Additional context**
Add any other context about the problem here.

**Possible Solution**
If you have suggestions on how to fix the issue, please describe them here.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Feature request
about: Suggest an idea for this project
title: '[FEATURE] '
labels: enhancement
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.

**Would you like to work on this feature?**
- [ ] Yes, I would like to implement this feature
- [ ] No, I just want to suggest it

If you would like to implement this feature, please let us know and we can guide you through the process!
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Question
about: Ask a question about the project
title: '[QUESTION] '
labels: question
assignees: ''
---

**Question**
Please describe your question clearly and concisely.

**Context**
Provide any relevant context about your question, such as:
- What you're trying to achieve
- What you've tried so far
- Any relevant code snippets
- Any error messages you're seeing

**Environment**
- Device: [e.g. iPhone 6, Samsung Galaxy S21]
- OS: [e.g. iOS 14.5, Android 12]
- Version [e.g. 1.0.11]
- Platform: [e.g. Android Native, KMP]

**Additional Information**
Add any other information about your question here.

**Checklist**
- [ ] I have searched the [documentation](https://github.com/ismoy/BelZSpeedScan/wiki)
- [ ] I have searched existing [issues](https://github.com/ismoy/BelZSpeedScan/issues)
- [ ] I have searched existing [discussions](https://github.com/ismoy/BelZSpeedScan/discussions)
33 changes: 33 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes # (issue)

## Type of change
Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

- [ ] Test A
- [ ] Test B

## Checklist:
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules

## Screenshots (if appropriate):

## Additional context
Add any other context about the pull request here.
92 changes: 92 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew build

- name: Run tests
run: ./gradlew test

- name: Check formatting
run: ./gradlew ktlintCheck

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: build/

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Run ktlint
run: ./gradlew ktlintCheck

security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Run dependency check
run: ./gradlew dependencyCheckAnalyze

release:
needs: [build, lint, security]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Publish to Maven Central
run: ./gradlew publish
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}
60 changes: 60 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Contributor Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and community a harassment-free experience for everyone, regardless of:

- Age
- Body size
- Disability
- Ethnicity
- Sex characteristics
- Gender identity and expression
- Level of experience
- Education
- Socio-economic status
- Nationality
- Personal appearance
- Race
- Religion
- Sexual identity and orientation

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

- Using welcoming and inclusive language
- Respecting different viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy toward other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others’ private information, such as physical or electronic addresses, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to:

- Remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct
- Temporarily or permanently ban any contributor for behaviors that they deem inappropriate, threatening, offensive, or harmful

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
Loading
Loading