Skip to content
Draft
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
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: Report a bug or unexpected behavior
title: "fix: "
labels: bug
assignees: ''
---

## Bug Description
<!-- A clear and concise description of the bug -->

## Steps to Reproduce
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error

## Expected Behavior
<!-- What you expected to happen -->

## Actual Behavior
<!-- What actually happened -->

## Screenshots / Logs
<!-- Add screenshots, error messages, or stack traces if applicable -->

## Environment
- OS: [e.g., Windows 11 / macOS 14 / Ubuntu 22.04]
- Browser: [e.g., Chrome 121, Firefox 122] (if applicable)
- App version / branch: [e.g., v1.2.0 / main]
- Node.js / Python / Java version: [e.g., Node 20.11]

## Additional Context
<!-- Any other context about the problem -->
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: ✨ Feature Request
about: Suggest a new feature or enhancement
title: "feat: "
labels: enhancement
assignees: ''
---

## Feature Summary
<!-- A clear and concise description of what you want -->

## Problem / Motivation
<!-- What problem does this solve? Why is this feature needed? -->

## Proposed Solution
<!-- Describe how you'd like this feature to work -->

## Alternative Solutions Considered
<!-- Any other approaches you've considered and why you ruled them out -->

## Acceptance Criteria
<!-- What does "done" look like for this feature? -->
- [ ]
- [ ]
- [ ]

## Additional Context
<!-- Mockups, examples from other projects, relevant links, etc. -->
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: ❓ Question / Help
about: Ask a question or request clarification
title: "question: "
labels: question
assignees: ''
---

## Question
<!-- What would you like to know? -->

## Context
<!-- What are you trying to achieve? What have you already tried? -->

## Code / Config (if applicable)
```
Paste relevant code or configuration here
```

## References
<!-- Links to docs, Stack Overflow answers, or related issues you've already checked -->
39 changes: 39 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## Description
<!-- Describe what this PR does and why -->

## Related Issue
Closes #<!-- issue number -->

## Type of Change
- [ ] 🐛 Bug fix (non-breaking change that fixes an issue)
- [ ] ✨ New feature (non-breaking change that adds functionality)
- [ ] 💥 Breaking change (fix or feature that causes existing functionality to change)
- [ ] 📚 Documentation update
- [ ] 🔧 Refactoring (no functional changes)
- [ ] ⚡ Performance improvement
- [ ] 🧪 Tests (adding or updating tests)
- [ ] 🔒 Security fix
- [ ] 🚀 CI/CD / Deployment change

## Screenshots / Demo
<!-- For UI changes, add before/after screenshots or a short screen recording -->

## Testing Checklist
- [ ] I have tested this change locally
- [ ] I have added/updated tests that prove my fix/feature works
- [ ] All existing tests pass
- [ ] I have checked for edge cases

## Code Quality
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have added comments to complex code sections
- [ ] No new warnings or linting errors introduced

## Documentation
- [ ] I have updated the README if needed
- [ ] I have updated relevant documentation
- [ ] API changes are documented

## Deployment Notes
<!-- Any special steps required for deployment, environment variables, migrations, etc. -->
84 changes: 84 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# TEMPLATE: CI — Lint, Test & Build
# Copy this file into your project and adjust scripts/paths to match your stack.
# Supported stacks include Node.js, Python, Java, Go, and more.
# Replace the Node.js steps below with the appropriate commands for your language.

name: CI — Lint, Test & Build

on:
# Uncomment the triggers below once this workflow is configured for your project.
# push:
# branches: [main, develop]
# pull_request:
# branches: [main, develop]
workflow_dispatch: # Manual trigger only (safe default for a template)

jobs:
lint-and-test:
name: Lint & Test
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v4

# --- Node.js example (replace with your language/runtime) ---
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

# Requires "lint" script in package.json, e.g. "eslint ."
- name: Run linter
run: npm run lint

# Requires "type-check" script, e.g. "tsc --noEmit"
- name: Run type check
run: npm run type-check

# Requires "test" script, e.g. "vitest run --coverage"
- name: Run tests
run: npm test -- --coverage

- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage/

build:
name: Build
runs-on: ubuntu-latest
needs: lint-and-test
permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

# Requires "build" script, e.g. "vite build" or "next build"
- name: Build project
run: npm run build

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: build-output
path: dist/
retention-days: 7
78 changes: 78 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# TEMPLATE: Deploy to Production
# Copy this file into your project and configure secrets + registry details.
# This template uses Docker + a container registry. Adjust for Vercel, Railway,
# Fly.io, Heroku, AWS, GCP, or any other platform by replacing the Docker steps.

name: Deploy to Production

on:
# Uncomment once configured for your project:
# push:
# tags:
# - 'v*.*.*'
workflow_dispatch:
inputs:
environment:
description: 'Target environment'
required: true
default: 'staging'
type: choice
options:
- staging
- production

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.environment || 'production' }}
permissions:
contents: read
security-events: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build for production
run: npm run build
env:
NODE_ENV: production

- name: Build Docker image
run: |
docker build -t ${{ secrets.REGISTRY_URL }}/app:${{ github.ref_name }} .
docker tag ${{ secrets.REGISTRY_URL }}/app:${{ github.ref_name }} \
${{ secrets.REGISTRY_URL }}/app:latest

- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Push Docker image
run: |
docker push ${{ secrets.REGISTRY_URL }}/app:${{ github.ref_name }}
docker push ${{ secrets.REGISTRY_URL }}/app:latest

- name: Notify Slack
if: always()
uses: slackapi/slack-github-action@v1.26.0
with:
payload: |
{
"text": "Deployment *${{ job.status }}* for `${{ github.ref_name }}` to *${{ github.event.inputs.environment || 'production' }}*"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
52 changes: 52 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# TEMPLATE: Dependency Security Audit
# Copy this file into your project.
# Requires: package.json with dependencies, SNYK_TOKEN secret (optional).
# For Python projects, replace npm audit with: pip-audit or safety check.

name: Dependency Security Audit

on:
# Uncomment once configured for your project:
# schedule:
# - cron: '0 8 * * 1' # Every Monday at 08:00 UTC
workflow_dispatch:

jobs:
audit:
name: Security Audit
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run npm audit
run: npm audit --audit-level=moderate

- name: Run Snyk security scan
uses: snyk/actions/node@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --severity-threshold=high
sarif: true

- name: Upload Snyk results to GitHub Security
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: snyk.sarif
continue-on-error: true
Loading