Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:16:54 +08:00
commit 2eeb6e60c6
39 changed files with 10735 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
# Enterprise Mode
**Purpose**: Production-ready with security features, CI/CD, and branch protection (~120 seconds)
## Features Included
- All Quick Mode features
- ✅ Dependabot alerts and security updates
- ✅ Secret scanning with push protection
- ✅ CodeQL code scanning
- ✅ Branch protection rules
- ✅ CI/CD workflows
- ✅ Issue and PR templates
- ✅ SECURITY.md
- ✅ Required status checks
## When to Use
- Production applications
- Client projects
- Enterprise software
- Any project requiring security compliance
## Security Configuration
```bash
# Enable Dependabot
gh api -X PUT /repos/{owner}/{repo}/vulnerability-alerts
gh api -X PUT /repos/{owner}/{repo}/automated-security-fixes
# Enable secret scanning
gh api -X PUT /repos/{owner}/{repo}/secret-scanning
gh api -X PUT /repos/{owner}/{repo}/secret-scanning-push-protection
```
## Branch Protection
```json
{
"required_status_checks": {
"strict": true,
"contexts": ["ci"]
},
"enforce_admins": true,
"required_pull_request_reviews": {
"required_approving_review_count": 1,
"dismiss_stale_reviews": true
},
"restrictions": null
}
```
## CI/CD Workflow
```yaml
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run tests
run: npm test
- name: Upload coverage
uses: codecov/codecov-action@v3
```
## Next Steps After Setup
1. Configure environment secrets
2. Set up deployment pipeline
3. Add team members with appropriate permissions
4. Review security alerts dashboard

View File

@@ -0,0 +1,74 @@
# Open Source Mode
**Purpose**: Community-focused with templates and contribution guidelines (~90 seconds)
## Features Included
- All Quick Mode features
- ✅ CODE_OF_CONDUCT.md (Contributor Covenant)
- ✅ CONTRIBUTING.md
- ✅ Issue templates (bug, feature, question)
- ✅ PR template
- ✅ SUPPORT.md
- ✅ Dependabot alerts
- ✅ Basic CI workflow
## When to Use
- Open source projects
- Community-driven software
- Public libraries/tools
- Projects accepting contributions
## Community Health Files
### CODE_OF_CONDUCT.md
Use Contributor Covenant v2.1:
```markdown
# Contributor Covenant Code of Conduct
## Our Pledge
We pledge to make participation in our community a harassment-free experience...
```
### CONTRIBUTING.md
```markdown
# Contributing
Thank you for your interest in contributing!
## How to Contribute
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Submit a pull request
## Code of Conduct
Please read our [Code of Conduct](CODE_OF_CONDUCT.md)
```
## Issue Templates
```yaml
# .github/ISSUE_TEMPLATE/bug_report.yml
name: Bug Report
description: Report a bug
body:
- type: textarea
id: description
label: Describe the bug
validations:
required: true
- type: textarea
id: reproduction
label: Steps to reproduce
```
## Next Steps After Setup
1. Add comprehensive README with badges
2. Set up project board for issue tracking
3. Configure Discussions for community Q&A
4. Add CHANGELOG.md

View File

@@ -0,0 +1,78 @@
# Private/Team Mode
**Purpose**: Internal collaboration with CODEOWNERS and governance (~90 seconds)
## Features Included
- All Quick Mode features
- ✅ Private visibility
- ✅ CODEOWNERS file
- ✅ GOVERNANCE.md
- ✅ Branch protection rules
- ✅ Team access configuration
- ✅ Issue and PR templates
- ✅ Review requirements
## When to Use
- Internal team projects
- Company repositories
- Private client work
- Projects with access controls
## CODEOWNERS Configuration
```
# .github/CODEOWNERS
# Default owners for everything
* @team-leads
# Specific paths
/src/ @development-team
/docs/ @documentation-team
/.github/ @devops-team
/security/ @security-team
```
## Team Access
```bash
# Add team with write access
gh api -X PUT /orgs/{org}/teams/{team}/repos/{owner}/{repo} \
-f permission=write
# Add individual collaborator
gh repo add-collaborator <username> --permission write
```
## Governance Documentation
### GOVERNANCE.md
```markdown
# Governance
## Decision Making
- Technical decisions: Development team lead
- Product decisions: Product manager
- Security decisions: Security team lead
## Code Review Requirements
- All PRs require 1 approval
- Security-sensitive changes require security team review
- Breaking changes require team lead approval
## Release Process
1. Create release branch
2. Run full test suite
3. Get release approval
4. Tag and deploy
```
## Next Steps After Setup
1. Invite team members
2. Configure team permissions
3. Set up project milestones
4. Document team workflows

View File

@@ -0,0 +1,49 @@
# Quick Mode
**Purpose**: Fast public repo setup with essentials (~30 seconds)
## Features Included
- README.md with basic structure
- LICENSE file (MIT default)
- .gitignore for technology stack
- Basic repository settings
## Features NOT Included
- ❌ CI/CD workflows
- ❌ Branch protection
- ❌ Issue/PR templates
- ❌ Security scanning setup
- ❌ CODEOWNERS
## When to Use
- Experiments and prototypes
- Quick test projects
- Personal projects
- Learning/tutorial repos
## Commands
```bash
# Create quick repo
gh repo create <name> --public --clone --description "<description>"
cd <name>
# Add essentials
echo "# <name>" > README.md
gh repo license create mit > LICENSE
curl -o .gitignore https://www.toptal.com/developers/gitignore/api/<tech>
# Initial commit
git add .
git commit -m "Initial commit"
git push -u origin main
```
## Next Steps After Setup
1. Add initial code
2. Push first commit
3. Consider upgrading to Enterprise mode for production