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
63 changes: 63 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# StreamVault Knowledge Base

This directory contains comprehensive documentation and configuration for GitHub Copilot integration with StreamVault.

## Files Overview

### Core Configuration
- **`copilot.json`** - Main Copilot configuration with rules, allowlists, and features
- **`copilot_instructions.md`** - Detailed project context and development guidelines
- **`copilot_firewall_config.md`** - Network firewall configuration for external API access

### Setup & Workflows
- **`workflows/copilot-setup-steps.yml`** - Automated setup workflow for Copilot environment
- **`workflows/copilot-autofix.yml`** - Automated code fixes and improvements
- **`COPILOT_SETUP.md`** - Developer guide for Copilot integration

### Project Documentation
- **`CONTRIBUTING.md`** - Contribution guidelines and development workflow
- **`pull_request_template.md`** - PR template with review checklist

## Quick Reference

### For Developers
1. Read `COPILOT_SETUP.md` for initial setup
2. Follow `copilot_instructions.md` for coding guidelines
3. Use `CONTRIBUTING.md` for PR workflow

### For Repository Admins
1. Configure firewall using `copilot_firewall_config.md`
2. Monitor `workflows/` for CI/CD integration
3. Update `copilot.json` for new features or rules

### For Copilot Agent
- Primary instructions: `copilot_instructions.md`
- Configuration rules: `copilot.json`
- Project examples: `../examples/`
- Documentation: `../docs/` and `../README.md`

## Integration Status

✅ **Configured Features:**
- Code review and analysis
- Security scanning and auto-remediation
- Pull request feedback and suggestions
- Auto-fix for common issues
- StreamVault-specific rules and patterns

✅ **Active Integrations:**
- GitHub Actions workflows
- TypeScript strict mode enforcement
- ESLint and Prettier integration
- Firebase, Stripe, and Clerk patterns
- Performance and security best practices

🔄 **Continuous Improvement:**
- Knowledge base updates with new patterns
- Rule refinement based on code review feedback
- Firewall allowlist optimization
- Developer workflow enhancement

---

For questions or improvements to Copilot integration, see the repository maintainers or create an issue.
118 changes: 106 additions & 12 deletions .github/copilot.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,36 @@
{
"version": "1.0",
"repository": {
"name": "StreamVault",
"description": "Next.js streaming platform with AI-powered content enhancement",
"type": "web-application",
"primary_language": "typescript",
"framework": "nextjs"
},
"copilot": {
"knowledge_base": {
"instructions_file": ".github/copilot_instructions.md",
"documentation_paths": [
"README.md",
"docs/",
"CONTRIBUTING.md",
"lib/*/README.md"
],
"examples_path": "examples/"
},
"features": {
"code_review": {
"enabled": true,
"auto_comment": true,
"security_analysis": true,
"performance_analysis": true,
"best_practices": true
"best_practices": true,
"focus_areas": [
"typescript_strict_mode",
"nextjs_app_router",
"security_best_practices",
"streaming_optimization"
]
},
"pull_request_analysis": {
"enabled": true,
Expand All @@ -16,15 +39,28 @@
"auto_fix": {
"security_vulnerabilities": true,
"code_style": true,
"dependency_updates": true
}
"dependency_updates": true,
"typescript_errors": true
},
"review_checklist": [
"Authentication and authorization",
"Input validation with Zod",
"Error handling patterns",
"Performance impact",
"Security considerations"
]
},
"security_scanning": {
"enabled": true,
"vulnerability_detection": true,
"secret_scanning": true,
"dependency_scanning": true,
"auto_remediation": true
"auto_remediation": true,
"custom_patterns": [
"hardcoded_api_keys",
"insecure_random_generation",
"unvalidated_redirects"
]
}
},
"rules": {
Expand Down Expand Up @@ -85,10 +121,38 @@
"enforce_test_naming": true
}
},
"context": {
"project_patterns": {
"api_routes": "app/api/**/*.ts",
"components": "components/**/*.tsx",
"hooks": "hooks/**/*.ts",
"lib": "lib/**/*.ts",
"types": "types/**/*.ts",
"tests": "tests/**/*.{ts,tsx}"
},
"ignore_patterns": [
"node_modules/",
".next/",
"dist/",
"build/",
"coverage/",
"*.log"
]
},
"workflow": {
"setup_steps": ".github/workflows/copilot-setup-steps.yml",
"auto_fix": ".github/workflows/copilot-autofix.yml",
"required_checks": [
"type-check",
"lint",
"test",
"build"
]
},
"allowlist": {
"external_domains": [
"fonts.googleapis.com",
"fonts.gstatic.com",
"fonts.gstatic.com",
"cdn.jsdelivr.net",
"unpkg.com",
"api.stripe.com",
Expand All @@ -97,17 +161,21 @@
"clerk.com",
"*.clerk.accounts.dev",
"firebase.googleapis.com",
"*.googleapis.com",
"storage.googleapis.com",
"firestore.googleapis.com",
"storage.googleapis.com",
"cloudflare.com",
"api.cloudflare.com",
"videodelivery.net",
"*.cloudflare.com"
],
"npm_packages": [
"@clerk/nextjs",
"@google-cloud/storage",
"@google-cloud/storage",
"@radix-ui/*",
"@tanstack/react-query",
"@upstash/redis",
"firebase",
"firebase-admin",
"stripe",
"next",
"react",
Expand All @@ -117,7 +185,9 @@
"hls.js",
"lucide-react",
"zod",
"zustand"
"zustand",
"dompurify",
"svix"
]
},
"notifications": {
Expand All @@ -137,18 +207,42 @@
"github_actions": {
"enabled": true,
"workflow_triggers": ["pull_request", "push"],
"auto_fix_commits": true
"auto_fix_commits": true,
"required_workflows": [
"ci.yml",
"copilot-setup-steps.yml",
"copilot-autofix.yml"
]
},
"codeql": {
"enabled": true,
"custom_queries": true,
"sarif_upload": true
"sarif_upload": true,
"languages": ["typescript", "javascript"]
},
"dependabot": {
"enabled": true,
"auto_merge_patches": true,
"security_updates_only": false
"security_updates_only": false,
"package_ecosystems": ["npm"]
}
},
"development": {
"package_manager": "pnpm",
"node_version": "22",
"commands": {
"install": "pnpm install --frozen-lockfile",
"dev": "pnpm dev",
"build": "pnpm build",
"test": "pnpm test",
"lint": "pnpm lint",
"type_check": "pnpm type-check"
},
"environment_files": [
".env.example",
".env.development.template",
".env.production.template"
]
}
}
}
Loading