From cfdf31a392e368e01b3474f9c01193f689f4a384 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Mar 2026 06:36:11 +0000 Subject: [PATCH 1/2] Initial plan From 7563043b54cc3af763791ed6260aa057ab1b8228 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Mar 2026 06:42:56 +0000 Subject: [PATCH 2/2] Add GitHub control files, comprehensive prompts, and git command reference Co-authored-by: Sajee119 <170867193+Sajee119@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/bug_report.md | 34 ++ .github/ISSUE_TEMPLATE/feature_request.md | 28 + .github/ISSUE_TEMPLATE/question.md | 21 + .github/PULL_REQUEST_TEMPLATE.md | 39 ++ .github/workflows/ci.yml | 84 +++ .github/workflows/deploy.yml | 78 +++ .github/workflows/security.yml | 52 ++ GIT_COMMANDS.md | 512 ++++++++++++++++++ PROMPTS.md | 615 ++++++++++++++++++++++ README.md | 65 ++- 10 files changed, 1526 insertions(+), 2 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/question.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/deploy.yml create mode 100644 .github/workflows/security.yml create mode 100644 GIT_COMMANDS.md create mode 100644 PROMPTS.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..e79d541 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,34 @@ +--- +name: ๐Ÿ› Bug Report +about: Report a bug or unexpected behavior +title: "fix: " +labels: bug +assignees: '' +--- + +## Bug Description + + +## Steps to Reproduce +1. Go to '...' +2. Click on '...' +3. Scroll down to '...' +4. See error + +## Expected Behavior + + +## Actual Behavior + + +## Screenshots / Logs + + +## 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 + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..2596b78 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,28 @@ +--- +name: โœจ Feature Request +about: Suggest a new feature or enhancement +title: "feat: " +labels: enhancement +assignees: '' +--- + +## Feature Summary + + +## Problem / Motivation + + +## Proposed Solution + + +## Alternative Solutions Considered + + +## Acceptance Criteria + +- [ ] +- [ ] +- [ ] + +## Additional Context + diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 0000000..7a42d20 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,21 @@ +--- +name: โ“ Question / Help +about: Ask a question or request clarification +title: "question: " +labels: question +assignees: '' +--- + +## Question + + +## Context + + +## Code / Config (if applicable) +``` +Paste relevant code or configuration here +``` + +## References + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..1138e5d --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,39 @@ +## Description + + +## Related Issue +Closes # + +## 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 + + +## 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 + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..591a61e --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..26a710e --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 }} diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml new file mode 100644 index 0000000..658e47e --- /dev/null +++ b/.github/workflows/security.yml @@ -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 diff --git a/GIT_COMMANDS.md b/GIT_COMMANDS.md new file mode 100644 index 0000000..9354704 --- /dev/null +++ b/GIT_COMMANDS.md @@ -0,0 +1,512 @@ +# Full Git & GitHub Command Reference + +A complete guide to every Git command you need for daily development โ€” with VS Code integration tips and GitHub workflow patterns. + +--- + +## Table of Contents + +- [โš™๏ธ Initial Setup](#๏ธ-initial-setup) +- [๐Ÿ“ Repository Management](#-repository-management) +- [๐Ÿ“ Staging & Committing](#-staging--committing) +- [๐ŸŒฟ Branching](#-branching) +- [๐Ÿ”€ Merging & Rebasing](#-merging--rebasing) +- [๐ŸŒ Remote Repositories](#-remote-repositories) +- [๐Ÿท๏ธ Tags & Releases](#๏ธ-tags--releases) +- [๐Ÿ” Inspection & Comparison](#-inspection--comparison) +- [โ†ฉ๏ธ Undoing Changes](#๏ธ-undoing-changes) +- [๐Ÿ“ฆ Stashing](#-stashing) +- [๐Ÿ”Ž Searching](#-searching) +- [โšก Advanced Commands](#-advanced-commands) +- [๐Ÿ–ฅ๏ธ VS Code Git Integration](#๏ธ-vs-code-git-integration) +- [๐Ÿ” GitHub Workflow Patterns](#-github-workflow-patterns) +- [โœ๏ธ Commit Message Convention](#๏ธ-commit-message-convention) + +--- + +## โš™๏ธ Initial Setup + +```bash +# Set global identity +git config --global user.name "Your Name" +git config --global user.email "you@example.com" + +# Set default branch name +git config --global init.defaultBranch main + +# Set VS Code as default editor +git config --global core.editor "code --wait" + +# Set VS Code as merge/diff tool +git config --global merge.tool vscode +git config --global mergetool.vscode.cmd 'code --wait $MERGED' +git config --global diff.tool vscode +git config --global difftool.vscode.cmd 'code --wait --diff $LOCAL $REMOTE' + +# Enable colored output +git config --global color.ui auto + +# View all global config +git config --global --list + +# Store credentials (HTTPS) +git config --global credential.helper store + +# Use SSH key (recommended) +ssh-keygen -t ed25519 -C "you@example.com" +# Then add ~/.ssh/id_ed25519.pub to GitHub โ†’ Settings โ†’ SSH Keys +``` + +--- + +## ๐Ÿ“ Repository Management + +```bash +# Initialize a new repository +git init +git init my-project # init inside new folder + +# Clone a repository +git clone https://github.com/user/repo.git +git clone git@github.com:user/repo.git # via SSH +git clone https://github.com/user/repo.git --depth 1 # shallow clone (faster) +git clone https://github.com/user/repo.git my-folder # clone into named folder + +# Check repository status +git status +git status -s # short format + +# Show repository info +git remote -v # list remotes +git log --oneline --graph --all # visual branch graph +``` + +--- + +## ๐Ÿ“ Staging & Committing + +```bash +# Stage files +git add filename.txt # stage specific file +git add . # stage all changes +git add -p # interactively stage hunks (partial file staging) +git add *.js # stage all .js files + +# Unstage files (keep changes) +git restore --staged filename.txt +git restore --staged . # unstage everything + +# Commit +git commit -m "feat: add login page" +git commit -am "fix: typo" # stage tracked files + commit in one step +git commit --amend # edit last commit message (before push) +git commit --amend --no-edit # amend adding staged files without changing message + +# Discard working directory changes +git restore filename.txt # discard changes in file +git restore . # discard all unstaged changes + +# View diff +git diff # unstaged changes +git diff --staged # staged changes (ready to commit) +git diff HEAD # all uncommitted changes +git diff branch1..branch2 # diff between branches +``` + +--- + +## ๐ŸŒฟ Branching + +```bash +# List branches +git branch # local branches +git branch -r # remote branches +git branch -a # all branches + +# Create and switch branches +git checkout -b feature/login # create + switch (classic) +git switch -c feature/login # create + switch (modern) +git switch main # switch to existing branch + +# Rename branch +git branch -m old-name new-name +git branch -m new-name # rename current branch + +# Delete branch +git branch -d feature/login # safe delete (merged only) +git branch -D feature/login # force delete +git push origin --delete feature/login # delete remote branch + +# Track remote branch +git branch --set-upstream-to=origin/main main +git checkout -b feature/x origin/feature/x # create local from remote + +# List merged / unmerged branches +git branch --merged +git branch --no-merged +``` + +--- + +## ๐Ÿ”€ Merging & Rebasing + +```bash +# Merge +git merge feature/login # merge into current branch +git merge --no-ff feature/login # always create merge commit +git merge --squash feature/login # squash all commits into one +git merge --abort # abort in-progress merge + +# Rebase (replay commits on top of another branch) +git rebase main # rebase current branch onto main +git rebase -i HEAD~3 # interactive rebase (squash/edit last 3 commits) +git rebase --abort # abort rebase +git rebase --continue # continue after resolving conflict + +# Cherry-pick (apply specific commit) +git cherry-pick abc1234 +git cherry-pick abc1234 def5678 # multiple commits +git cherry-pick abc1234 --no-commit # apply without committing + +# Resolve merge conflicts +# 1. Open conflicted files and resolve <<<< ==== >>>> markers +# 2. git add +# 3. git commit (merge) or git rebase --continue (rebase) +``` + +--- + +## ๐ŸŒ Remote Repositories + +```bash +# Manage remotes +git remote add origin https://github.com/user/repo.git +git remote add upstream https://github.com/original/repo.git +git remote remove origin +git remote rename origin old-origin +git remote set-url origin git@github.com:user/repo.git # change URL + +# Fetch (download without merging) +git fetch origin # fetch all from origin +git fetch --all # fetch all remotes +git fetch origin main # fetch specific branch +git fetch --prune # remove stale remote-tracking branches + +# Pull (fetch + merge/rebase) +git pull # pull current branch +git pull origin main # pull specific remote branch +git pull --rebase # pull with rebase instead of merge +git pull --rebase=interactive + +# Push +git push origin feature/login # push branch +git push -u origin feature/login # push + set upstream (first time) +git push --force-with-lease # safe force push (won't overwrite others' work) +git push origin --tags # push all tags +git push origin :feature/login # delete remote branch (old syntax) + +# Sync fork with upstream +git fetch upstream +git checkout main +git merge upstream/main +git push origin main +``` + +--- + +## ๐Ÿท๏ธ Tags & Releases + +```bash +# Create tags +git tag v1.0.0 # lightweight tag +git tag -a v1.0.0 -m "Release v1.0.0" # annotated tag (recommended) +git tag -a v1.0.0 abc1234 # tag a specific commit + +# List tags +git tag +git tag -l "v1.*" # filter by pattern + +# Push tags +git push origin v1.0.0 # push specific tag +git push origin --tags # push all tags + +# Delete tags +git tag -d v1.0.0 # delete local tag +git push origin --delete v1.0.0 # delete remote tag + +# Show tag info +git show v1.0.0 +``` + +--- + +## ๐Ÿ” Inspection & Comparison + +```bash +# Log +git log # full log +git log --oneline # compact log +git log --oneline --graph --all # visual graph +git log --author="Name" # filter by author +git log --since="2024-01-01" # filter by date +git log --grep="fix" # filter by commit message +git log -p # log with diffs +git log --stat # log with file change stats +git log main..feature # commits in feature not in main +git log -n 10 # last 10 commits + +# Show specific commit +git show abc1234 # show commit details + diff +git show HEAD # show latest commit +git show HEAD~2 # show 2 commits ago + +# Blame (who changed each line) +git blame filename.txt +git blame -L 10,25 filename.txt # specific lines + +# Diff +git diff # unstaged vs staged +git diff --staged # staged vs last commit +git diff HEAD~1 # current vs 1 commit ago +git diff v1.0.0..v2.0.0 # between tags +git diff --name-only # only file names + +# Compare branches +git diff main feature/login # full diff +git diff main..feature/login --stat # summary only +``` + +--- + +## โ†ฉ๏ธ Undoing Changes + +```bash +# Undo last commit (keep changes staged) +git reset --soft HEAD~1 + +# Undo last commit (keep changes unstaged) +git reset --mixed HEAD~1 # (default) + +# Undo last commit (discard changes completely) +git reset --hard HEAD~1 + +# Revert a commit (creates a new undo commit โ€” safe for shared branches) +git revert abc1234 +git revert HEAD # revert last commit + +# Remove file from staging area +git restore --staged filename.txt + +# Discard working directory changes +git restore filename.txt +git restore . + +# Reset file to a specific commit +git checkout abc1234 -- filename.txt + +# Remove untracked files +git clean -n # dry run (show what would be removed) +git clean -f # remove untracked files +git clean -fd # remove untracked files and directories +git clean -fdx # remove including .gitignore'd files +``` + +--- + +## ๐Ÿ“ฆ Stashing + +```bash +# Stash changes +git stash # stash tracked changes +git stash -u # include untracked files +git stash save "WIP: login feature" # stash with description + +# List stashes +git stash list + +# Apply stash +git stash pop # apply latest and remove from stash +git stash apply stash@{2} # apply specific stash (keep in stash) +git stash drop stash@{0} # delete specific stash +git stash clear # delete all stashes + +# Show stash contents +git stash show -p stash@{0} + +# Create branch from stash +git stash branch feature/name stash@{0} +``` + +--- + +## ๐Ÿ”Ž Searching + +```bash +# Search in code (all commits) +git grep "function login" # search working tree +git grep -n "TODO" # with line numbers +git grep -l "import React" # files only + +# Search commit history +git log -S "functionName" # commits that added/removed string (pickaxe) +git log -G "regex.*pattern" # commits matching regex +git log --all --grep="bug fix" # search commit messages + +# Find which commit introduced a bug (binary search) +git bisect start +git bisect bad # current commit is bad +git bisect good v1.2.0 # last known good commit +# Git checks out middle commit; test it, then: +git bisect good # or: git bisect bad +# Repeat until Git identifies the first bad commit +git bisect reset # end bisect session +``` + +--- + +## โšก Advanced Commands + +```bash +# Submodules +git submodule add https://github.com/user/lib.git libs/lib +git submodule init +git submodule update --init --recursive +git submodule update --remote # update to latest remote + +# Sparse checkout (check out only part of a repo) +git sparse-checkout init +git sparse-checkout set src/ docs/ + +# Reflog (recover lost commits) +git reflog # list all HEAD movements +git checkout abc1234 # restore a "lost" commit + +# Signing commits with GPG +git config --global commit.gpgsign true +git config --global user.signingkey YOUR_KEY_ID + +# Worktrees (multiple checkouts of same repo) +git worktree add ../project-hotfix hotfix/urgent-bug +git worktree list +git worktree remove ../project-hotfix + +# Archive repository +git archive --format=zip HEAD > project.zip + +# Count contributions +git shortlog -sn # commits per author +git shortlog -sn --all # including all branches +``` + +--- + +## ๐Ÿ–ฅ๏ธ VS Code Git Integration + +| Action | Keyboard Shortcut | Description | +|--------|-------------------|-------------| +| Open Source Control | `Ctrl+Shift+G` | View changed files | +| Stage file | Click `+` next to file | Stage individual file | +| Unstage file | Click `-` next to file | Remove from staging | +| Commit | `Ctrl+Enter` in message box | Commit staged changes | +| Open Git Graph | Command Palette โ†’ "Git: Graph" | Visual history | +| Resolve conflicts | Click conflict file | Open 3-way merge editor | +| Compare with HEAD | Right-click file โ†’ "Open Changes" | Diff view | +| Git Blame | Install GitLens extension | Inline blame annotations | + +### Recommended VS Code Extensions for Git +- **GitLens** โ€” Enhanced blame, history, and comparisons +- **Git Graph** โ€” Visual branch graph +- **GitHub Pull Requests** โ€” Manage PRs inside VS Code +- **Git History** โ€” Browse file/line history + +--- + +## ๐Ÿ” GitHub Workflow Patterns + +### Feature Branch Workflow +```bash +git checkout main && git pull # start from latest main +git checkout -b feature/my-feature # create feature branch +# ... develop ... +git add . && git commit -m "feat: ..." +git push -u origin feature/my-feature +# Open Pull Request on GitHub โ†’ review โ†’ merge โ†’ delete branch +git checkout main && git pull # sync after merge +git branch -d feature/my-feature # clean up local +``` + +### Gitflow Workflow +```bash +# main = production, develop = integration +git checkout develop && git pull +git checkout -b feature/x develop +# ... develop ... +git checkout develop && git merge --no-ff feature/x +# When ready to release: +git checkout -b release/1.0.0 develop +git checkout main && git merge --no-ff release/1.0.0 +git tag -a v1.0.0 -m "Release 1.0.0" +``` + +### Hotfix Workflow +```bash +git checkout main && git pull +git checkout -b hotfix/critical-bug +# ... fix ... +git commit -m "fix: critical bug in payment" +git checkout main && git merge --no-ff hotfix/critical-bug +git tag -a v1.0.1 -m "Hotfix 1.0.1" +git checkout develop && git merge --no-ff hotfix/critical-bug +git branch -d hotfix/critical-bug +``` + +--- + +## โœ๏ธ Commit Message Convention + +Use the **Conventional Commits** specification: + +``` +(): + +[optional body] + +[optional footer(s)] +``` + +### Types +| Type | Description | +|------|-------------| +| `feat` | New feature | +| `fix` | Bug fix | +| `docs` | Documentation only | +| `style` | Formatting, no logic change | +| `refactor` | Code restructure, no feature/fix | +| `perf` | Performance improvement | +| `test` | Adding or fixing tests | +| `chore` | Build process, tool changes | +| `ci` | CI/CD configuration changes | +| `build` | Changes affecting build system | +| `revert` | Reverts a previous commit | + +### Examples +``` +feat(auth): add OAuth2 Google login +fix(cart): prevent duplicate items on fast click +docs(readme): update installation instructions +refactor(api): extract user service layer +test(checkout): add integration tests for payment flow +chore(deps): upgrade React to v18.3 +``` + +### Breaking Changes +``` +feat(api)!: change authentication endpoint path + +BREAKING CHANGE: /auth/login moved to /v2/auth/signin +Update all clients to use the new path. +``` + +--- + +*Keep commits atomic, branches short-lived, and PRs small. Ship often.* diff --git a/PROMPTS.md b/PROMPTS.md new file mode 100644 index 0000000..536b820 --- /dev/null +++ b/PROMPTS.md @@ -0,0 +1,615 @@ +# ๐Ÿš€ Powerful AI Prompts for Every Framework + +Use these prompts with GitHub Copilot, ChatGPT, Claude, or any AI coding assistant to rapidly scaffold and build projects across all platforms. + +--- + +## Table of Contents + +- [๐ŸŒ Web โ€” Frontend Frameworks](#-web--frontend-frameworks) + - [React](#react) + - [Next.js](#nextjs) + - [Vue.js](#vuejs) + - [Angular](#angular) + - [Svelte / SvelteKit](#svelte--sveltekit) +- [โš™๏ธ Web โ€” Backend Frameworks](#๏ธ-web--backend-frameworks) + - [Node.js / Express](#nodejs--express) + - [Django (Python)](#django-python) + - [FastAPI (Python)](#fastapi-python) + - [Spring Boot (Java)](#spring-boot-java) + - [Laravel (PHP)](#laravel-php) + - [Ruby on Rails](#ruby-on-rails) +- [๐Ÿ“ฑ Mobile Applications](#-mobile-applications) + - [React Native](#react-native) + - [Flutter](#flutter) + - [Swift (iOS)](#swift-ios) + - [Kotlin (Android)](#kotlin-android) +- [๐Ÿ–ฅ๏ธ Desktop Software](#๏ธ-desktop-software) + - [Electron](#electron) + - [Tauri](#tauri) + - [PyQt / Tkinter (Python)](#pyqt--tkinter-python) +- [๐Ÿ—„๏ธ Databases & APIs](#๏ธ-databases--apis) +- [๐Ÿ”’ Authentication & Security](#-authentication--security) +- [โ˜๏ธ DevOps & Deployment](#๏ธ-devops--deployment) +- [๐Ÿงช Testing](#-testing) +- [โ™ฟ Accessibility & Performance](#-accessibility--performance) + +--- + +## ๐ŸŒ Web โ€” Frontend Frameworks + +### React + +``` +Create a production-ready React 18 app with: +- TypeScript +- Vite as the build tool +- React Router v6 for routing (Home, About, Dashboard, 404 pages) +- Zustand for global state management +- Axios for API calls with a centralized API client +- Tailwind CSS for styling +- ESLint + Prettier configuration +Show the full folder structure, main entry files, and a sample feature component with hooks. +``` + +``` +Build a React component library with: +- Reusable Button, Input, Modal, Card, and Table components +- Storybook integration for documentation +- Unit tests using Vitest and React Testing Library +- TypeScript prop types and JSDoc comments +- Export all components from a single index.ts barrel file +``` + +``` +Create a React dashboard app that: +- Fetches data from a REST API using React Query (TanStack Query) +- Displays charts using Recharts +- Has a responsive sidebar navigation +- Implements dark/light mode toggle using Context API +- Shows loading skeletons while data loads +- Handles error states gracefully +``` + +--- + +### Next.js + +``` +Scaffold a full-stack Next.js 14 (App Router) project with: +- TypeScript +- Tailwind CSS + shadcn/ui component library +- NextAuth.js for authentication (Google + GitHub providers) +- Prisma ORM with PostgreSQL +- tRPC for type-safe API routes +- Zod for input validation +- Vercel deployment configuration +Include the folder structure, middleware, and a sample authenticated page. +``` + +``` +Create a Next.js e-commerce store with: +- Product listing page with filters and pagination +- Product detail page with image gallery +- Shopping cart using Zustand (persisted in localStorage) +- Checkout form with Stripe payment integration +- Order confirmation page +- Admin dashboard to manage products (CRUD) +- SEO optimization with next/head meta tags and Open Graph +``` + +``` +Build a Next.js blog platform with: +- MDX support for blog posts stored in /content directory +- Dynamic routes for each blog post +- Table of contents sidebar auto-generated from headings +- Code syntax highlighting with Shiki +- RSS feed generation +- Sitemap and robots.txt +- Tag filtering and search functionality +``` + +--- + +### Vue.js + +``` +Create a Vue 3 app using the Composition API with: +- TypeScript and