diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..d39b06c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,56 @@ +--- +name: Bug Report +about: Report a bug to help us improve +title: "[BUG] " +labels: bug +assignees: '' + +--- + +## Description + +A clear and concise description of what the bug is. + +## Steps to Reproduce + +Steps to reproduce the behavior: + +1. +2. +3. + +## Expected Behavior + +A clear and concise description of what you expected to happen. + +## Actual Behavior + +A clear and concise description of what actually happened. + +## Environment + +- **OS**: (e.g., macOS, Linux, Windows) +- **Node.js version**: (if applicable) +- **Python version**: (if applicable) +- **Rust version**: (if applicable) +- **Docker version**: (if applicable) + +## Screenshots + +If applicable, add screenshots to help explain your problem. + +## Logs + +If applicable, paste relevant error logs or stack traces: + +``` +[paste logs here] +``` + +## Additional Context + +Add any other context about the problem here. + +## Possible Solution + +If you have a suggestion for how to fix this, please describe it here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..e91629f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,45 @@ +--- +name: Feature Request +about: Suggest an idea for this project +title: "[FEATURE] " +labels: enhancement +assignees: '' + +--- + +## Description + +A clear and concise description of what the feature is. + +## Problem Statement + +Is your feature request related to a problem? Please describe the problem you're trying to solve. + +## Proposed Solution + +Describe the solution you'd like in detail. + +## Alternative Solutions + +Describe any alternative solutions or features you've considered. + +## Use Cases + +Describe the use cases for this feature. Who would benefit from it? + +## Additional Context + +Add any other context or screenshots about the feature request here. + +## Acceptance Criteria + +- [ ] +- [ ] +- [ ] + +## Priority + +- [ ] Low +- [ ] Medium +- [ ] High +- [ ] Critical diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..92337c5 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,48 @@ +## Description + +Please include a summary of the changes and related context. + +Closes #(issue number) + +## Type of Change + +- [ ] 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 change) +- [ ] Documentation update + +## Changes Made + +- +- +- + +## Testing + +Please describe the tests you ran and how to reproduce them: + +- [ ] Unit tests pass +- [ ] Integration tests pass +- [ ] Manual testing completed + +**Test Coverage:** +- + +## 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 passed locally with my changes +- [ ] Any dependent changes have been merged and published + +## Screenshots (if applicable) + +If your changes include UI modifications, please add screenshots here. + +## Additional Notes + +Any additional information that reviewers should know. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 60fc161..b14c9b9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,6 +4,224 @@ Thank you for your interest in contributing to VacciChain! This document provides guidelines and instructions for contributing to our project. +## Table of Contents + +- [Local Setup](#local-setup) +- [Branching Strategy](#branching-strategy) +- [Pull Request Process](#pull-request-process) +- [Commit Conventions](#commit-conventions) +- [Code of Conduct](#code-of-conduct) +- [Docker Base Image Pinning](#docker-base-image-pinning) + +## Local Setup + +### Prerequisites + +- Node.js 18+ +- Python 3.11+ +- Rust + `wasm32-unknown-unknown` target +- Soroban CLI +- Docker + Docker Compose +- Freighter Wallet (for testing) + +### Installation Steps + +1. **Clone the repository** + ```bash + git clone https://github.com/dev-fatima-24/VacciChain.git + cd VacciChain + ``` + +2. **Copy environment configuration** + ```bash + cp .env.example .env + # Fill in your Stellar keys and contract IDs + ``` + +3. **Install backend dependencies** + ```bash + cd backend + npm install + cd .. + ``` + +4. **Install frontend dependencies** + ```bash + cd frontend + npm install + cd .. + ``` + +5. **Install Python service dependencies** + ```bash + cd python-service + pip install -r requirements.txt + cd .. + ``` + +6. **Deploy smart contract (if needed)** + ```bash + cd contracts + make build + make deploy + cd .. + ``` + +7. **Run locally** + ```bash + # Terminal 1: Backend + cd backend && npm run dev + + # Terminal 2: Frontend + cd frontend && npm run dev + + # Terminal 3: Python service + cd python-service && uvicorn main:app --port 8001 + ``` + + Or use Docker Compose: + ```bash + docker compose up --build + ``` + +## Branching Strategy + +We follow a **feature branch** workflow: + +- **main**: Production-ready code. Protected branch, requires PR review. +- **Feature branches**: `feature/` or `issues/` + - Example: `feature/openapi-spec` or `issues/77-79-82-84` + - Branch from `main` + - Prefix with issue numbers if addressing GitHub issues + +### Creating a Branch + +```bash +git checkout main +git pull origin main +git checkout -b issues/77-79-82-84 +``` + +## Pull Request Process + +### Before Submitting + +1. **Ensure tests pass** + ```bash + # Backend + cd backend && npm test + + # Contracts + cd contracts && cargo test + + # Python service + cd python-service && pytest + ``` + +2. **Run linters** (if configured) + ```bash + cd backend && npm run lint # if available + ``` + +3. **Update documentation** if your changes affect user-facing features + +4. **Commit your changes** using [Conventional Commits](#commit-conventions) + +### Submitting a PR + +1. **Push your branch** + ```bash + git push -u origin issues/77-79-82-84 + ``` + +2. **Create a pull request** on GitHub + - Use the PR template (auto-populated from `.github/pull_request_template.md`) + - Link related issues: `Closes #77, #79, #82, #84` + - Provide a clear description of changes + - Include testing notes + +3. **Address review feedback** + - Make requested changes + - Push updates to the same branch + - Respond to comments + +4. **Merge** once approved + - Use "Squash and merge" for single-commit PRs + - Use "Create a merge commit" for multi-commit PRs with logical separation + +## Commit Conventions + +We follow **Conventional Commits** for clear, semantic commit messages. + +### Format + +``` +(): + + + +