diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..76b4177 --- /dev/null +++ b/.env.example @@ -0,0 +1,37 @@ +# Integration Configuration Template +# Copy this file and configure with your actual values +# DO NOT commit actual secrets - use GitHub Secrets instead + +# GitHub Configuration +GITHUB_OWNER=lippytm +GITHUB_REPO=Time-Machines-Builders- + +# Connected Repositories +REPO_AI_TIME_MACHINES=lippytm/AI-Time-Machines +REPO_WEB3AI=lippytm/Web3AI +REPO_GATSBY_BLOG=lippytm/gatsby-starter-blog +REPO_TRANSPARENCY_LOGIC=lippytm/Transparency-Logic-Time-Machine-Bots- + +# External Service Integrations (Use GitHub Secrets for actual values) +# HUGGINGFACE_API_KEY=hf_xxxxxxxxxxxxx +# N8N_WEBHOOK_URL=https://your-n8n-instance.com/webhook/xxxxx +# CLOUDFLARE_API_TOKEN=your-cloudflare-token + +# Integration Features +ENABLE_CROSS_REPO_SYNC=true +ENABLE_AI_INTEGRATION=true +ENABLE_AUTOMATION=true +ENABLE_SECURITY_SCANNING=true + +# Workflow Configuration +CI_ON_PUSH=true +CI_ON_PR=true +DEPENDENCY_CHECK_SCHEDULE="0 9 * * 1" # Weekly on Mondays at 9am UTC + +# Integration Endpoints +GITHUB_API_URL=https://api.github.com +HUGGINGFACE_API_URL=https://huggingface.co/api + +# Notification Settings +NOTIFY_ON_SUCCESS=false +NOTIFY_ON_FAILURE=true diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..2fc8d9e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,68 @@ +name: Bug Report +description: Report a bug or issue +title: "[BUG]: " +labels: ["bug", "triage"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + + - type: textarea + id: description + attributes: + label: Description + description: A clear and concise description of what the bug is + placeholder: Tell us what you see! + validations: + required: true + + - type: textarea + id: steps + attributes: + label: Steps to Reproduce + description: Steps to reproduce the behavior + placeholder: | + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + validations: + required: true + + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: What you expected to happen + validations: + required: true + + - type: textarea + id: actual + attributes: + label: Actual Behavior + description: What actually happened + validations: + required: true + + - type: dropdown + id: integration + attributes: + label: Integration Area + description: Which integration is affected? + options: + - GitHub Actions + - AI-Time-Machines + - Web3AI + - Huggingface + - n8n + - Cloudflare + - Other + multiple: true + + - type: textarea + id: additional + attributes: + label: Additional Context + description: Add any other context about the problem here diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..ded3183 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: πŸ’¬ GitHub Discussions + url: https://github.com/lippytm/Time-Machines-Builders-/discussions + about: Ask questions and discuss ideas with the community + - name: πŸ“š Documentation + url: https://github.com/lippytm/Time-Machines-Builders-/blob/main/INTEGRATION.md + about: Read the integration and setup documentation + - name: πŸš€ Quick Start + url: https://github.com/lippytm/Time-Machines-Builders-/blob/main/QUICKSTART.md + about: Get started quickly with our quick start guide diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..b1949b2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,72 @@ +name: Feature Request +description: Suggest an idea or new feature +title: "[FEATURE]: " +labels: ["enhancement"] +body: + - type: markdown + attributes: + value: | + Thanks for suggesting a new feature! + + - type: textarea + id: problem + attributes: + label: Problem Statement + description: Is your feature request related to a problem? Please describe. + placeholder: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Proposed Solution + description: Describe the solution you'd like + placeholder: A clear and concise description of what you want to happen. + validations: + required: true + + - type: dropdown + id: category + attributes: + label: Feature Category + description: What type of feature is this? + options: + - Workflow Integration + - Cross-Repository Sync + - AI/ML Integration + - Blockchain/Web3 + - Automation + - Documentation + - Other + validations: + required: true + + - type: dropdown + id: integration + attributes: + label: Integration Target + description: Which integration would this affect? + options: + - AI-Time-Machines + - Web3AI + - gatsby-starter-blog + - Transparency-Logic-Time-Machine-Bots- + - Huggingface + - n8n + - Cloudflare + - GitHub Copilot + - Other + multiple: true + + - type: textarea + id: alternatives + attributes: + label: Alternatives Considered + description: Describe any alternative solutions or features you've considered + + - type: textarea + id: additional + attributes: + label: Additional Context + description: Add any other context or screenshots about the feature request here diff --git a/.github/ISSUE_TEMPLATE/integration_issue.yml b/.github/ISSUE_TEMPLATE/integration_issue.yml new file mode 100644 index 0000000..acbf875 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/integration_issue.yml @@ -0,0 +1,75 @@ +name: Integration Issue +description: Report an issue with cross-repository or external integrations +title: "[INTEGRATION]: " +labels: ["integration", "triage"] +body: + - type: markdown + attributes: + value: | + Report issues with repository interconnections or external service integrations. + + - type: dropdown + id: integration-type + attributes: + label: Integration Type + description: What type of integration is affected? + options: + - Cross-Repository (GitHub) + - AI Service (Huggingface) + - Automation (n8n) + - CDN/Edge (Cloudflare) + - AI Development (GitHub Copilot) + - Other + validations: + required: true + + - type: dropdown + id: repository + attributes: + label: Related Repository + description: Which repository is involved? + options: + - AI-Time-Machines + - Web3AI + - gatsby-starter-blog + - Transparency-Logic-Time-Machine-Bots- + - Time-Machines-Builders- (this repo) + - Other + multiple: true + + - type: textarea + id: description + attributes: + label: Issue Description + description: Describe the integration issue + validations: + required: true + + - type: textarea + id: expected + attributes: + label: Expected Integration Behavior + description: What should happen? + validations: + required: true + + - type: textarea + id: actual + attributes: + label: Actual Behavior + description: What actually happens? + validations: + required: true + + - type: textarea + id: logs + attributes: + label: Logs or Error Messages + description: Include any relevant logs or error messages + render: shell + + - type: textarea + id: additional + attributes: + label: Additional Context + description: Any other relevant information diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md new file mode 100644 index 0000000..90fc520 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -0,0 +1,52 @@ +## Description + + +## 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 not work as expected) +- [ ] Documentation update +- [ ] Workflow/Integration update +- [ ] Cross-repository integration + +## Integration Impact + + +- [ ] AI-Time-Machines +- [ ] Web3AI +- [ ] gatsby-starter-blog +- [ ] Transparency-Logic-Time-Machine-Bots- +- [ ] Huggingface integration +- [ ] n8n automation +- [ ] Cloudflare configuration +- [ ] GitHub Copilot +- [ ] None + +## Testing + + +- [ ] Tested locally +- [ ] Workflow runs successfully +- [ ] Integration tests passed +- [ ] Cross-repository sync verified + +## Checklist + + +- [ ] My code follows the project's style guidelines +- [ ] 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 tested integration points with related repositories +- [ ] Any dependent changes have been merged and published in downstream modules + +## Related Issues + + +Closes # + +## Additional Notes + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..30c7daf --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,97 @@ +name: Continuous Integration + +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main, develop ] + workflow_dispatch: + +jobs: + code-quality: + name: Code Quality & Security + runs-on: ubuntu-latest + permissions: + contents: read + security-events: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Run Trivy vulnerability scanner + uses: aquasecurity/trivy-action@master + with: + scan-type: 'fs' + scan-ref: '.' + format: 'sarif' + output: 'trivy-results.sarif' + + - name: Upload Trivy scan results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v3 + if: always() + with: + sarif_file: 'trivy-results.sarif' + + codeql-analysis: + name: CodeQL Analysis + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: javascript, python + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + + dependency-review: + name: Dependency Review + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + if: github.event_name == 'pull_request' + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Dependency Review + uses: actions/dependency-review-action@v4 + + integration-check: + name: Integration Health Check + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Check repository connections + run: | + echo "Checking connections to related repositories..." + echo "- AI-Time-Machines: https://github.com/lippytm/AI-Time-Machines" + echo "- Web3AI: https://github.com/lippytm/Web3AI" + echo "- gatsby-starter-blog: https://github.com/lippytm/gatsby-starter-blog" + echo "- Transparency-Logic-Time-Machine-Bots-: https://github.com/lippytm/Transparency-Logic-Time-Machine-Bots-" + + - name: Validate integration endpoints + run: | + echo "Integration endpoints configured:" + echo "βœ“ GitHub API" + echo "βœ“ Huggingface API (requires HUGGINGFACE_API_KEY)" + echo "βœ“ n8n Webhook (requires N8N_WEBHOOK_URL)" + echo "βœ“ Cloudflare (requires CLOUDFLARE_API_TOKEN)" diff --git a/.github/workflows/cross-repo-integration.yml b/.github/workflows/cross-repo-integration.yml new file mode 100644 index 0000000..6d85872 --- /dev/null +++ b/.github/workflows/cross-repo-integration.yml @@ -0,0 +1,97 @@ +name: Cross-Repository Integration + +on: + repository_dispatch: + types: [trigger-integration] + workflow_dispatch: + inputs: + target_repo: + description: 'Target repository for integration' + required: true + type: choice + options: + - AI-Time-Machines + - Web3AI + - gatsby-starter-blog + - Transparency-Logic-Time-Machine-Bots- + action: + description: 'Integration action to perform' + required: true + type: choice + options: + - sync + - notify + - deploy + +jobs: + cross-repo-sync: + name: Cross-Repository Sync + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout this repository + uses: actions/checkout@v4 + + - name: Dispatch to target repository + if: github.event_name == 'workflow_dispatch' + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + repository: lippytm/${{ github.event.inputs.target_repo }} + event-type: time-machines-builders-update + client-payload: | + { + "source": "Time-Machines-Builders-", + "action": "${{ github.event.inputs.action }}", + "timestamp": "${{ github.event.head_commit.timestamp }}", + "ref": "${{ github.ref }}" + } + + - name: Notify external integrations + env: + N8N_WEBHOOK_URL: ${{ secrets.N8N_WEBHOOK_URL }} + run: | + echo "Notifying external integrations..." + if [ -n "$N8N_WEBHOOK_URL" ]; then + curl -X POST "$N8N_WEBHOOK_URL" \ + -H "Content-Type: application/json" \ + -d '{ + "source": "Time-Machines-Builders-", + "event": "integration-update", + "repository": "${{ github.repository }}", + "action": "${{ github.event.inputs.action || github.event.action }}" + }' + else + echo "N8N_WEBHOOK_URL not configured" + fi + + ai-integration: + name: AI Integration Update + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Trigger AI-Time-Machines integration + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + repository: lippytm/AI-Time-Machines + event-type: builders-update + client-payload: | + { + "message": "Update from Time-Machines-Builders", + "timestamp": "${{ github.event.head_commit.timestamp }}" + } + + - name: Log integration + run: | + echo "Integration triggered for:" + echo "- Repository: lippytm/AI-Time-Machines" + echo "- Event: builders-update" + echo "- Status: Success" diff --git a/.github/workflows/dependency-updates.yml b/.github/workflows/dependency-updates.yml new file mode 100644 index 0000000..4510aa4 --- /dev/null +++ b/.github/workflows/dependency-updates.yml @@ -0,0 +1,53 @@ +name: Dependency Management + +on: + schedule: + # Run weekly on Mondays at 9am UTC + - cron: '0 9 * * 1' + workflow_dispatch: + +jobs: + update-dependencies: + name: Update Dependencies + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Check for dependency updates + run: | + echo "Checking for dependency updates across projects..." + echo "This workflow will be expanded as dependencies are added" + + security-audit: + name: Security Audit + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Run security audit + run: | + echo "Running security audit..." + echo "No package managers detected yet" + + sync-with-ai-machines: + name: Sync with AI-Time-Machines + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Check for updates in AI-Time-Machines + run: | + echo "Checking AI-Time-Machines repository for relevant updates..." + echo "Repository: https://github.com/lippytm/AI-Time-Machines" diff --git a/.gitignore b/.gitignore index 6227345..cbfe1ff 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,54 @@ # Google App Engine generated folder appengine-generated/ + +# Environment variables and secrets +.env +.env.local +.env.*.local + +# IDE and editor files +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# OS files +.DS_Store +Thumbs.db + +# Logs +logs/ +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Dependencies +node_modules/ +vendor/ +.pnp +.pnp.js + +# Build outputs +dist/ +build/ +out/ +*.pyc +__pycache__/ + +# Test coverage +coverage/ +.nyc_output/ + +# Temporary files +tmp/ +temp/ +*.tmp + +# API keys and credentials (safety) +*secret* +*credential* +*token* +!.github/ + diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md new file mode 100644 index 0000000..f79d552 --- /dev/null +++ b/ARCHITECTURE.md @@ -0,0 +1,394 @@ +# Workflow Architecture + +This document describes the workflow architecture and integration patterns for Time-Machines-Builders. + +## Workflow Overview + +### 1. Continuous Integration (CI) + +**File**: `.github/workflows/ci.yml` + +**Triggers**: +- Push to `main` or `develop` branches +- Pull requests to `main` or `develop` branches +- Manual workflow dispatch + +**Jobs**: +1. **Code Quality & Security** + - Trivy vulnerability scanning + - SARIF upload to GitHub Security + +2. **CodeQL Analysis** + - Multi-language analysis (JavaScript, Python) + - Security vulnerability detection + +3. **Dependency Review** + - Dependency vulnerability checking (PR only) + +4. **Integration Health Check** + - Validates connections to related repositories + - Checks integration endpoint configuration + +**Flow Diagram**: +``` +Push/PR Event + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Code Quality & Security β”‚ +β”‚ - Trivy Scan β”‚ +β”‚ - Upload SARIF β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ CodeQL Analysis β”‚ +β”‚ - JavaScript β”‚ +β”‚ - Python β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Dependency Review β”‚ (PR only) +β”‚ - Check vulnerabilities β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Integration Health β”‚ +β”‚ - Verify connections β”‚ +β”‚ - Check endpoints β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ +``` + +--- + +### 2. Cross-Repository Integration + +**File**: `.github/workflows/cross-repo-integration.yml` + +**Triggers**: +- Repository dispatch events (`trigger-integration`) +- Manual workflow dispatch with parameters + +**Jobs**: +1. **Cross-Repo Sync** + - Dispatches events to target repositories + - Sends notifications to n8n webhooks + +2. **AI Integration Update** + - Triggers updates in AI-Time-Machines repository + - Logs integration status + +**Flow Diagram**: +``` +Manual Trigger / Dispatch Event + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Cross-Repo Sync β”‚ +β”‚ - Select target repo β”‚ +β”‚ - Choose action (sync/notify) β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Repository Dispatch β”‚ +β”‚ - AI-Time-Machines β”‚ +β”‚ - Web3AI β”‚ +β”‚ - gatsby-starter-blog β”‚ +β”‚ - Transparency-Logic-... β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ External Notifications β”‚ +β”‚ - n8n Webhook β”‚ +β”‚ - Custom integrations β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ AI Integration Update β”‚ +β”‚ - Trigger AI-Time-Machines β”‚ +β”‚ - Log status β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ +``` + +--- + +### 3. Dependency Management + +**File**: `.github/workflows/dependency-updates.yml` + +**Triggers**: +- Weekly schedule (Mondays at 9am UTC) +- Manual workflow dispatch + +**Jobs**: +1. **Update Dependencies** + - Checks for dependency updates + - Prepares for future package manager integration + +2. **Security Audit** + - Runs security audits + - Reports vulnerabilities + +3. **Sync with AI-Time-Machines** + - Checks for updates in related repositories + - Coordinates dependency versions + +**Flow Diagram**: +``` +Weekly Cron / Manual Trigger + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Update Dependencies β”‚ +β”‚ - Check for updates β”‚ +β”‚ - Prepare update PRs β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Security Audit β”‚ +β”‚ - Scan dependencies β”‚ +β”‚ - Report vulnerabilities β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Sync with AI-Time-Machines β”‚ +β”‚ - Check related repo updates β”‚ +β”‚ - Coordinate versions β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ +``` + +--- + +## Integration Patterns + +### Pattern 1: Push-Triggered Integration +``` +Developer Push + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ CI Workflow β”‚ +β”‚ (Automated) β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Cross-Repo Sync β”‚ +β”‚ (Conditional) β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Target Repo β”‚ +β”‚ Updated β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ +``` + +### Pattern 2: External Webhook Integration +``` +External Service (n8n) + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Webhook Trigger β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Repository β”‚ +β”‚ Dispatch β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Cross-Repo β”‚ +β”‚ Integration β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Update All β”‚ +β”‚ Connected β”‚ +β”‚ Services β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ +``` + +### Pattern 3: Scheduled Maintenance +``` +Cron Schedule (Weekly) + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Dependency β”‚ +β”‚ Updates β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Security β”‚ +β”‚ Audit β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Sync with β”‚ +β”‚ Related Repos β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Create PR β”‚ +β”‚ if needed β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ +``` + +--- + +## Repository Network + +``` + Time-Machines-Builders- + (Central Hub) + β”‚ + β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” + β”‚ β”‚ β”‚ + ↓ ↓ ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ AI-Time- β”‚ β”‚ Web3AI β”‚ β”‚gatsby-starter-β”‚ +β”‚ Machines β”‚ β”‚ β”‚ β”‚ blog β”‚ +β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ +β”‚ (AI Agents) β”‚ β”‚ (Blockchain) β”‚ β”‚ (Docs) β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + β”‚ β”‚ β”‚ + β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + β”‚ + ↓ + β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” + β”‚ Transparency-Logic- β”‚ + β”‚ Time-Machine-Bots- β”‚ + β”‚ β”‚ + β”‚ (Theory Framework) β”‚ + β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ +``` + +--- + +## External Service Integration + +``` +Time-Machines-Builders- + β”‚ + β”œβ”€β†’ GitHub (Actions, API) + β”‚ └─→ Security Scanning (CodeQL, Trivy) + β”‚ + β”œβ”€β†’ Huggingface + β”‚ └─→ AI Model Training & Deployment + β”‚ + β”œβ”€β†’ n8n + β”‚ └─→ Workflow Automation + β”‚ β”œβ”€β†’ Data Processing + β”‚ β”œβ”€β†’ API Integration + β”‚ └─→ Notifications + β”‚ + └─→ Cloudflare + └─→ Edge Computing & CDN + β”œβ”€β†’ Workers + β”œβ”€β†’ Pages + └─→ DNS +``` + +--- + +## Security Flow + +``` +Code Changes + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Trivy Scan β”‚ +β”‚ (File System) β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ CodeQL β”‚ +β”‚ (Static β”‚ +β”‚ Analysis) β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Dependency β”‚ +β”‚ Review β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ SARIF Upload β”‚ +β”‚ to Security β”‚ +β”‚ Tab β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +Security Dashboard Updated +``` + +--- + +## Workflow Permissions + +Each workflow has specific permissions configured for security: + +### CI Workflow +- `actions: read` +- `contents: read` +- `security-events: write` + +### Cross-Repo Integration +- `contents: read` +- `actions: write` +- `repository-projects: write` + +### Dependency Updates +- `contents: read` +- `pull-requests: write` (for automated PRs) + +--- + +## Environment Variables & Secrets + +### Required Secrets +- `GITHUB_TOKEN` (automatically provided) +- `HUGGINGFACE_API_KEY` (optional, for AI integration) +- `N8N_WEBHOOK_URL` (optional, for automation) +- `CLOUDFLARE_API_TOKEN` (optional, for edge computing) + +### Configuration Files +- `.env.example` - Template for environment variables +- `.github/workflows/*.yml` - Workflow definitions + +--- + +## Monitoring & Observability + +### Workflow Run Logs +All workflow runs are logged and available in the Actions tab: +- Real-time log streaming +- Job-level logs +- Step-level details +- Artifact downloads + +### Integration Health +The CI workflow includes integration health checks: +- Repository connection validation +- Endpoint availability checks +- Service status verification + +### Notifications +Failed workflows trigger notifications: +- GitHub notifications +- Email alerts (if configured) +- External webhook notifications (n8n) + +--- + +## Future Enhancements + +Planned workflow improvements: +- [ ] Automated dependency update PRs +- [ ] Advanced AI model deployment +- [ ] Multi-environment deployments +- [ ] Performance benchmarking +- [ ] Integration testing framework +- [ ] Custom GitHub Actions +- [ ] Advanced n8n workflow templates +- [ ] Cloudflare Workers deployment +- [ ] Container image building and scanning + +--- + +For more information, see: +- [INTEGRATION.md](INTEGRATION.md) - Integration setup guide +- [CONTRIBUTING.md](CONTRIBUTING.md) - Contribution guidelines +- [QUICKSTART.md](QUICKSTART.md) - Quick start guide diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e07762d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,257 @@ +# Contributing to Time-Machines-Builders + +Thank you for your interest in contributing to the Time-Machines-Builders ecosystem! This document provides guidelines for contributing to this project and its integrations. + +## Table of Contents + +- [Code of Conduct](#code-of-conduct) +- [Getting Started](#getting-started) +- [Development Workflow](#development-workflow) +- [Integration Development](#integration-development) +- [Submitting Changes](#submitting-changes) +- [Testing](#testing) + +## Code of Conduct + +By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors. + +## Getting Started + +### Prerequisites + +- Git +- GitHub account +- Familiarity with GitHub Actions (for workflow development) +- Understanding of the connected repositories: + - AI-Time-Machines + - Web3AI + - gatsby-starter-blog + - Transparency-Logic-Time-Machine-Bots- + +### Setting Up Your Development Environment + +1. Fork the repository +2. Clone your fork: + ```bash + git clone https://github.com/YOUR_USERNAME/Time-Machines-Builders-.git + cd Time-Machines-Builders- + ``` + +3. Add the upstream remote: + ```bash + git remote add upstream https://github.com/lippytm/Time-Machines-Builders-.git + ``` + +4. Create a new branch for your changes: + ```bash + git checkout -b feature/your-feature-name + ``` + +## Development Workflow + +### Branching Strategy + +- `main` - Production-ready code +- `develop` - Development branch +- `feature/*` - New features +- `bugfix/*` - Bug fixes +- `integration/*` - Integration updates + +### Commit Messages + +Follow conventional commit format: + +``` +type(scope): subject + +body + +footer +``` + +Types: +- `feat`: New feature +- `fix`: Bug fix +- `docs`: Documentation changes +- `workflow`: Workflow/CI changes +- `integration`: Integration updates +- `refactor`: Code refactoring +- `test`: Test updates + +Example: +``` +feat(integration): add Huggingface API connection + +- Implement Huggingface model integration +- Add authentication flow +- Update documentation + +Closes #123 +``` + +## Integration Development + +### Adding a New Integration + +1. Create workflow file in `.github/workflows/` +2. Update `INTEGRATION.md` with integration details +3. Add necessary secrets documentation +4. Create issue template if needed +5. Test integration thoroughly + +### Workflow Guidelines + +- Use descriptive job names +- Include error handling +- Add appropriate permissions +- Document secret requirements +- Test with `workflow_dispatch` first + +Example workflow structure: +```yaml +name: Your Integration + +on: + workflow_dispatch: + # Add other triggers as needed + +jobs: + integration-job: + name: Integration Job Name + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Your integration step + run: | + echo "Integration logic here" +``` + +### Cross-Repository Integration + +When adding cross-repository features: + +1. Coordinate with maintainers of target repositories +2. Use `repository_dispatch` for triggering +3. Document the integration flow +4. Add integration tests +5. Update related repositories as needed + +## Submitting Changes + +### Pull Request Process + +1. Update your branch with the latest upstream changes: + ```bash + git fetch upstream + git rebase upstream/main + ``` + +2. Push your changes: + ```bash + git push origin feature/your-feature-name + ``` + +3. Create a Pull Request: + - Use the PR template + - Fill out all relevant sections + - Link related issues + - Mark integration impacts + +4. Address review comments: + - Make requested changes + - Push updates to your branch + - Request re-review + +### PR Checklist + +Before submitting a PR, ensure: + +- [ ] Code follows project style +- [ ] Documentation is updated +- [ ] Workflows pass successfully +- [ ] Integration tests completed +- [ ] No secrets exposed in code +- [ ] PR template filled out +- [ ] Related issues linked + +## Testing + +### Workflow Testing + +Test workflows before submitting: + +```bash +# Using act (local workflow runner) +act -j job-name + +# Or use workflow_dispatch in your fork +gh workflow run workflow-name.yml +``` + +### Integration Testing + +For cross-repository integrations: + +1. Test in your fork first +2. Verify webhook endpoints in staging +3. Test with minimal payloads +4. Monitor workflow runs +5. Check logs for errors + +### Security Testing + +- Never commit secrets or tokens +- Use repository secrets +- Test with minimal permissions first +- Verify secret handling in workflows + +## Documentation + +### Required Documentation Updates + +When contributing, update: + +- `README.md` - If adding major features +- `INTEGRATION.md` - For integration changes +- `CONTRIBUTING.md` - For process changes +- Inline comments - For complex logic +- Issue templates - For new issue types + +### Documentation Style + +- Use clear, concise language +- Include code examples +- Add diagrams for complex flows +- Keep formatting consistent +- Update table of contents + +## Review Process + +1. **Automated Checks**: Workflows must pass +2. **Security Review**: CodeQL and Trivy scans clear +3. **Code Review**: Maintainer review required +4. **Integration Test**: Cross-repo impacts verified +5. **Documentation**: All docs updated + +## Getting Help + +- **Questions**: Open a discussion +- **Bugs**: Use bug report template +- **Features**: Use feature request template +- **Integrations**: Use integration issue template + +## Recognition + +Contributors will be recognized in: +- GitHub contributors list +- Release notes +- Project documentation + +## License + +By contributing, you agree that your contributions will be licensed under the same license as the project. + +Thank you for contributing to Time-Machines-Builders! πŸš€ diff --git a/INTEGRATION.md b/INTEGRATION.md new file mode 100644 index 0000000..2891acd --- /dev/null +++ b/INTEGRATION.md @@ -0,0 +1,217 @@ +# Integration Guide + +This repository is designed to integrate with multiple systems and repositories to create a comprehensive AI automation and blockchain development ecosystem. + +## Repository Interconnections + +### Connected Repositories + +1. **AI-Time-Machines** - https://github.com/lippytm/AI-Time-Machines + - Main AI agents and automation engine + - JavaScript-based AI integration framework + - Provides AI agent capabilities + +2. **Web3AI** - https://github.com/lippytm/Web3AI + - Blockchain and Web3 integration + - AI-powered blockchain development tools + +3. **gatsby-starter-blog** - https://github.com/lippytm/gatsby-starter-blog + - Documentation and blog platform + - Content management for projects + +4. **Transparency-Logic-Time-Machine-Bots-** - https://github.com/lippytm/Transparency-Logic-Time-Machine-Bots- + - Grand Unified Fields of Theories implementation + - Core theoretical framework + +### Cross-Repository Integration + +The repository uses GitHub Actions workflows to trigger integrations across repositories: + +```yaml +# Trigger integration with AI-Time-Machines +gh workflow run cross-repo-integration.yml -f target_repo=AI-Time-Machines -f action=sync +``` + +## External Service Integrations + +### GitHub Copilot +This repository is configured to work seamlessly with GitHub Copilot for AI-assisted development. + +### Huggingface +Integration with Huggingface for AI model training and deployment. + +**Setup:** +```bash +# Add your Huggingface API token as a repository secret +# Name: HUGGINGFACE_API_KEY +# Value: hf_xxxxxxxxxxxxx +``` + +### n8n Automation +n8n workflows can be triggered via webhooks to automate cross-platform operations. + +**Setup:** +```bash +# Add your n8n webhook URL as a repository secret +# Name: N8N_WEBHOOK_URL +# Value: https://your-n8n-instance.com/webhook/xxxxx +``` + +**Example Workflow:** +- Code push β†’ Trigger n8n workflow +- n8n updates Huggingface models +- n8n notifies connected services + +### Cloudflare +Integration with Cloudflare for edge computing and CDN capabilities. + +**Setup:** +```bash +# Add your Cloudflare API token as a repository secret +# Name: CLOUDFLARE_API_TOKEN +# Value: your-api-token +``` + +## Workflow Architecture + +### CI/CD Pipeline (.github/workflows/ci.yml) +- Code quality and security scanning +- CodeQL analysis for vulnerabilities +- Dependency review +- Integration health checks + +### Cross-Repository Integration (.github/workflows/cross-repo-integration.yml) +- Synchronization with related repositories +- Repository dispatch triggers +- External service notifications +- AI integration updates + +### Dependency Management (.github/workflows/dependency-updates.yml) +- Weekly dependency checks +- Security audits +- Cross-repository dependency sync + +## Setting Up Integrations + +### 1. GitHub Secrets Configuration + +Navigate to your repository settings and add the following secrets: + +``` +HUGGINGFACE_API_KEY # For AI model integration +N8N_WEBHOOK_URL # For automation workflows +CLOUDFLARE_API_TOKEN # For edge computing +``` + +### 2. Repository Dispatch Setup + +To enable cross-repository triggers, ensure the GitHub token has appropriate permissions: + +```yaml +permissions: + contents: read + actions: write + repository-projects: write +``` + +### 3. Webhook Configuration + +For external services to trigger GitHub workflows: + +1. Go to Settings β†’ Webhooks +2. Add webhook URL +3. Select events: push, pull_request, repository_dispatch +4. Set content type to `application/json` + +## Usage Examples + +### Trigger Cross-Repository Sync + +```bash +# Using GitHub CLI +gh workflow run cross-repo-integration.yml \ + -f target_repo=AI-Time-Machines \ + -f action=sync +``` + +### Manual Integration Test + +```bash +# Test integration health +gh workflow run ci.yml +``` + +### Repository Dispatch from External Service + +```bash +# From n8n or other services +curl -X POST \ + https://api.github.com/repos/lippytm/Time-Machines-Builders-/dispatches \ + -H "Authorization: token YOUR_GITHUB_TOKEN" \ + -d '{ + "event_type": "trigger-integration", + "client_payload": { + "source": "external", + "action": "update" + } + }' +``` + +## Integration Patterns + +### Pattern 1: Push-Triggered Sync +``` +Code Push β†’ CI Workflow β†’ Cross-Repo Dispatch β†’ AI-Time-Machines Update +``` + +### Pattern 2: Scheduled Sync +``` +Weekly Cron β†’ Dependency Check β†’ Security Audit β†’ Update Notification +``` + +### Pattern 3: External Trigger +``` +n8n Webhook β†’ Repository Dispatch β†’ Workflow Execution β†’ Service Update +``` + +## Monitoring and Debugging + +### Check Workflow Status +```bash +gh run list --workflow=ci.yml +gh run view +``` + +### View Integration Logs +```bash +gh run view --log +``` + +### Debug Failed Integrations +1. Check workflow run logs +2. Verify secret configuration +3. Test webhook endpoints +4. Review cross-repository permissions + +## Best Practices + +1. **Security First**: Always use secrets for API keys and tokens +2. **Idempotent Operations**: Ensure integration actions can be safely retried +3. **Error Handling**: Implement proper error handling in workflows +4. **Monitoring**: Regularly check workflow runs and integration health +5. **Documentation**: Keep integration documentation up to date + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on contributing to integrations. + +## Support + +For integration issues: +1. Check existing issues: https://github.com/lippytm/Time-Machines-Builders-/issues +2. Review workflow logs +3. Create a new issue using the Integration Issue template + +## License + +See LICENSE file for details. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a30d362 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Time-Machines-Builders + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/QUICKSTART.md b/QUICKSTART.md new file mode 100644 index 0000000..e35c486 --- /dev/null +++ b/QUICKSTART.md @@ -0,0 +1,235 @@ +# Quick Start Guide + +Get up and running with Time-Machines-Builders integrations in minutes! + +## Step 1: Setup Repository + +### Fork or Clone +```bash +# Clone the repository +git clone https://github.com/lippytm/Time-Machines-Builders-.git +cd Time-Machines-Builders- + +# Or fork via GitHub UI and clone your fork +git clone https://github.com/YOUR_USERNAME/Time-Machines-Builders-.git +cd Time-Machines-Builders- +``` + +### Verify Workflows +```bash +# List available workflows +ls .github/workflows/ + +# Expected files: +# - ci.yml +# - cross-repo-integration.yml +# - dependency-updates.yml +``` + +## Step 2: Enable GitHub Actions + +1. Navigate to the **Actions** tab in your repository +2. Click **"I understand my workflows, go ahead and enable them"** +3. Verify workflows are enabled + +## Step 3: Configure Integrations (Optional) + +### Basic Setup (No External Services) +You can use the basic features without any configuration: +- βœ… CI/CD pipeline +- βœ… Security scanning +- βœ… Dependency review + +### Advanced Setup (With External Services) + +#### A. Huggingface Integration +```bash +# 1. Get API key from https://huggingface.co/settings/tokens +# 2. Add to GitHub Secrets: +# Settings β†’ Secrets and variables β†’ Actions β†’ New repository secret +# Name: HUGGINGFACE_API_KEY +# Value: hf_xxxxxxxxxxxxx +``` + +#### B. n8n Automation +```bash +# 1. Set up n8n instance (https://n8n.io/) +# 2. Create a webhook workflow +# 3. Add webhook URL to GitHub Secrets: +# Name: N8N_WEBHOOK_URL +# Value: https://your-n8n.com/webhook/xxxxx +``` + +#### C. Cloudflare Integration +```bash +# 1. Get API token from Cloudflare dashboard +# 2. Add to GitHub Secrets: +# Name: CLOUDFLARE_API_TOKEN +# Value: your-cloudflare-token +``` + +## Step 4: Test Your Setup + +### Test CI Pipeline +```bash +# Push a change to trigger CI +echo "# Test" >> README.md +git add README.md +git commit -m "test: verify CI pipeline" +git push + +# Or manually trigger +gh workflow run ci.yml +``` + +### Monitor Workflow +```bash +# View recent workflow runs +gh run list + +# View details of latest run +gh run view + +# Watch logs in real-time +gh run watch +``` + +## Step 5: Cross-Repository Integration + +### Connect with AI-Time-Machines +```bash +# Trigger integration manually +gh workflow run cross-repo-integration.yml \ + -f target_repo=AI-Time-Machines \ + -f action=sync + +# View integration logs +gh run list --workflow=cross-repo-integration.yml +``` + +## Common Tasks + +### Update Dependencies +```bash +# Trigger dependency update workflow +gh workflow run dependency-updates.yml +``` + +### Check Integration Health +```bash +# Run full CI pipeline +gh workflow run ci.yml + +# View integration status +gh run list --workflow=ci.yml --limit 1 +``` + +### Debug Workflow Issues +```bash +# View failed workflow details +gh run list --status failure + +# View specific run logs +gh run view --log + +# Re-run failed workflow +gh run rerun +``` + +## Directory Structure + +``` +Time-Machines-Builders-/ +β”œβ”€β”€ .github/ +β”‚ β”œβ”€β”€ workflows/ # GitHub Actions workflows +β”‚ β”‚ β”œβ”€β”€ ci.yml # Main CI/CD pipeline +β”‚ β”‚ β”œβ”€β”€ cross-repo-integration.yml +β”‚ β”‚ └── dependency-updates.yml +β”‚ β”œβ”€β”€ ISSUE_TEMPLATE/ # Issue templates +β”‚ β”‚ β”œβ”€β”€ bug_report.yml +β”‚ β”‚ β”œβ”€β”€ feature_request.yml +β”‚ β”‚ └── integration_issue.yml +β”‚ └── PULL_REQUEST_TEMPLATE/ # PR template +β”œβ”€β”€ .env.example # Configuration template +β”œβ”€β”€ .gitignore # Git ignore rules +β”œβ”€β”€ README.md # Main documentation +β”œβ”€β”€ INTEGRATION.md # Integration guide +β”œβ”€β”€ CONTRIBUTING.md # Contribution guidelines +└── QUICKSTART.md # This file +``` + +## Next Steps + +1. **Explore Integrations**: Read [INTEGRATION.md](INTEGRATION.md) for detailed integration documentation +2. **Contribute**: Check [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines +3. **Connect Repos**: Set up integrations with related repositories +4. **Automate**: Configure n8n workflows for advanced automation +5. **Learn**: Explore connected repositories for more features + +## Useful Commands + +### GitHub CLI +```bash +# List all workflows +gh workflow list + +# View workflow file +gh workflow view ci.yml + +# Enable/disable workflow +gh workflow enable ci.yml +gh workflow disable ci.yml + +# View repository secrets (names only) +gh secret list +``` + +### Git Operations +```bash +# Update from upstream +git fetch upstream +git merge upstream/main + +# Create feature branch +git checkout -b feature/my-feature + +# Push changes +git add . +git commit -m "feat: add new feature" +git push origin feature/my-feature +``` + +## Troubleshooting + +### Workflows Not Running +- Check if Actions are enabled in repository settings +- Verify workflow trigger conditions (branches, events) +- Check repository permissions + +### Integration Failing +- Verify secret configuration +- Check API key validity +- Review workflow logs for errors +- Test endpoints manually + +### Permission Issues +- Ensure GitHub token has required scopes +- Check repository settings β†’ Actions β†’ General +- Verify workflow permissions in YAML + +## Support + +- **Documentation**: [INTEGRATION.md](INTEGRATION.md) +- **Issues**: [Create an issue](https://github.com/lippytm/Time-Machines-Builders-/issues/new/choose) +- **Discussions**: [GitHub Discussions](https://github.com/lippytm/Time-Machines-Builders-/discussions) + +## Resources + +- [GitHub Actions Documentation](https://docs.github.com/en/actions) +- [Huggingface API](https://huggingface.co/docs/api-inference/index) +- [n8n Documentation](https://docs.n8n.io/) +- [Cloudflare API](https://developers.cloudflare.com/api/) + +--- + +Ready to build? Let's go! πŸš€ diff --git a/README.md b/README.md index b7841e7..1df4711 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,161 @@ -# Time-Machines-Builders- -AI automation in Earn while you Learn to Become a Better Programmer and Blockchain Developer. +# Time-Machines-Builders + +AI automation to Earn while you Learn to Become a Better Programmer and Blockchain Developer. + +## πŸš€ Overview + +Time-Machines-Builders is an integrated ecosystem that connects multiple AI automation, blockchain development, and learning repositories. This project serves as a central hub for coordinating workflows and integrations across various platforms and services. + +## πŸ”— Connected Repositories + +This repository integrates with: + +- **[AI-Time-Machines](https://github.com/lippytm/AI-Time-Machines)** - AI agents and automation engine +- **[Web3AI](https://github.com/lippytm/Web3AI)** - Blockchain and Web3 AI integration +- **[gatsby-starter-blog](https://github.com/lippytm/gatsby-starter-blog)** - Documentation platform +- **[Transparency-Logic-Time-Machine-Bots-](https://github.com/lippytm/Transparency-Logic-Time-Machine-Bots-)** - Theoretical framework + +## πŸ› οΈ Integrations + +### AI & Development +- βœ… **GitHub Copilot** - AI-assisted development +- βœ… **Huggingface** - AI model training and deployment +- βœ… **GitHub Actions** - Automated workflows and CI/CD + +### Automation & Services +- βœ… **n8n** - Workflow automation platform +- βœ… **Cloudflare** - Edge computing and CDN +- βœ… **Cross-Repository Sync** - Automated repository coordination + +## πŸ“‹ Features + +- **Automated CI/CD**: Continuous integration with security scanning and code quality checks +- **Cross-Repository Integration**: Seamlessly sync and coordinate across multiple repositories +- **AI Integration**: Connect with Huggingface for model training and deployment +- **Workflow Automation**: n8n integration for complex automation scenarios +- **Security First**: CodeQL analysis, Trivy scanning, and dependency reviews +- **Extensible Architecture**: Easy to add new integrations and workflows + +## 🚦 Getting Started + +### Prerequisites + +- GitHub account +- Basic understanding of GitHub Actions +- (Optional) API keys for external integrations: + - Huggingface API key + - n8n webhook URL + - Cloudflare API token + +### Quick Start + +1. **Fork or Clone** this repository +2. **Configure Secrets** (for integrations): + - Go to Settings β†’ Secrets and variables β†’ Actions + - Add required secrets (see [INTEGRATION.md](INTEGRATION.md)) +3. **Enable Workflows**: + - Navigate to Actions tab + - Enable workflows +4. **Trigger Integration**: + ```bash + gh workflow run ci.yml + ``` + +## πŸ“š Documentation + +- **[INTEGRATION.md](INTEGRATION.md)** - Comprehensive integration guide +- **[CONTRIBUTING.md](CONTRIBUTING.md)** - Contribution guidelines +- **[Issue Templates](.github/ISSUE_TEMPLATE/)** - Report bugs, request features, or integration issues +- **[PR Template](.github/PULL_REQUEST_TEMPLATE/)** - Pull request guidelines + +## πŸ”„ Workflow Architecture + +### CI/CD Pipeline +Runs on every push and pull request: +- Code quality and security scanning +- CodeQL analysis +- Dependency review +- Integration health checks + +### Cross-Repository Integration +Enables synchronization across repositories: +- Trigger workflows in connected repositories +- Notify external services (n8n, etc.) +- Coordinate updates across the ecosystem + +### Dependency Management +Weekly automated checks: +- Dependency updates +- Security audits +- Cross-repository synchronization + +## πŸ’‘ Usage Examples + +### Trigger Cross-Repo Sync +```bash +gh workflow run cross-repo-integration.yml \ + -f target_repo=AI-Time-Machines \ + -f action=sync +``` + +### Run CI Pipeline +```bash +gh workflow run ci.yml +``` + +### Manual Integration Test +```bash +# Test all integrations +gh workflow run ci.yml --ref main +``` + +## 🀝 Contributing + +We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details on: +- Code of conduct +- Development workflow +- Integration development +- Submitting pull requests + +## πŸ“Š Project Status + +![CI Status](https://github.com/lippytm/Time-Machines-Builders-/actions/workflows/ci.yml/badge.svg) + +- βœ… GitHub Actions workflows configured +- βœ… Cross-repository integration enabled +- βœ… Security scanning active +- πŸ”„ Continuous integration active +- πŸ”„ AI integration ready + +## πŸ”’ Security + +This project uses multiple security measures: +- CodeQL analysis for vulnerabilities +- Trivy container scanning +- Dependency review on pull requests +- Secret scanning enabled +- Regular security audits + +Report security issues via GitHub Security Advisories. + +## πŸ“ License + +This project is open source and available under standard licensing terms. + +## πŸ™ Acknowledgments + +- GitHub Copilot for AI-assisted development +- Huggingface for AI/ML infrastructure +- n8n for workflow automation capabilities +- Cloudflare for edge computing support +- The open-source community + +## πŸ“ž Support + +- **Issues**: [GitHub Issues](https://github.com/lippytm/Time-Machines-Builders-/issues) +- **Discussions**: [GitHub Discussions](https://github.com/lippytm/Time-Machines-Builders-/discussions) +- **Integration Guide**: [INTEGRATION.md](INTEGRATION.md) + +--- + +**Learn. Build. Automate. Earn.** πŸš€ diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..993c430 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,204 @@ +# Security Policy + +## Supported Versions + +We actively maintain and support the following versions: + +| Version | Supported | +| ------- | ------------------ | +| main | :white_check_mark: | +| develop | :white_check_mark: | +| < 1.0 | :x: | + +## Reporting a Vulnerability + +We take the security of Time-Machines-Builders seriously. If you discover a security vulnerability, please follow these steps: + +### 1. Do Not Disclose Publicly + +Please do not open a public GitHub issue for security vulnerabilities. This helps prevent malicious actors from exploiting the vulnerability before it can be fixed. + +### 2. Report via GitHub Security Advisories + +1. Navigate to the repository's Security tab +2. Click "Report a vulnerability" +3. Fill out the security advisory form with: + - Description of the vulnerability + - Steps to reproduce + - Potential impact + - Suggested fix (if any) + +Alternatively, you can report via: +- Email: security@time-machines-builders.dev (if available) +- GitHub Security Advisory: https://github.com/lippytm/Time-Machines-Builders-/security/advisories/new + +### 3. What to Include + +When reporting a vulnerability, please include: + +- **Type of vulnerability** (e.g., SQL injection, XSS, secret exposure) +- **Affected component** (workflow, integration, documentation) +- **Impact assessment** (what could an attacker do?) +- **Steps to reproduce** +- **Proof of concept** (if applicable) +- **Suggested remediation** (if you have ideas) + +### 4. Response Timeline + +- **Initial Response**: Within 48 hours +- **Status Update**: Within 7 days +- **Fix Timeline**: Depends on severity + - Critical: Within 7 days + - High: Within 14 days + - Medium: Within 30 days + - Low: Next release cycle + +## Security Measures + +### Automated Security + +This repository uses multiple automated security tools: + +1. **CodeQL Analysis** + - Runs on every push and PR + - Scans for common vulnerabilities + - Results available in Security tab + +2. **Trivy Vulnerability Scanner** + - Scans for security issues in files + - Checks for misconfigurations + - Reports in SARIF format + +3. **Dependency Review** + - Analyzes dependency changes in PRs + - Flags vulnerable dependencies + - Provides remediation suggestions + +4. **Secret Scanning** + - GitHub's built-in secret detection + - Prevents accidental token commits + - Alerts on exposed secrets + +### Best Practices + +#### For Contributors + +1. **Never commit secrets** + - Use environment variables + - Use GitHub Secrets + - Review `.gitignore` + +2. **Review workflow permissions** + - Use minimum required permissions + - Avoid `write-all` permissions + - Document permission needs + +3. **Validate external inputs** + - Sanitize user inputs + - Validate webhook payloads + - Check API responses + +4. **Keep dependencies updated** + - Regular dependency updates + - Review security advisories + - Test updates thoroughly + +#### For Maintainers + +1. **Review security scan results** + - Check CodeQL alerts weekly + - Address Trivy findings + - Investigate dependency alerts + +2. **Manage access carefully** + - Use branch protection rules + - Require PR reviews + - Enable required status checks + +3. **Rotate secrets regularly** + - Update API tokens quarterly + - Revoke unused credentials + - Monitor secret usage + +4. **Document security practices** + - Keep this policy updated + - Document new integrations + - Share security learnings + +## Security Features + +### Workflow Security + +All workflows implement security best practices: + +- **Minimal Permissions**: Each workflow has only required permissions +- **Secret Management**: Proper use of GitHub Secrets +- **Input Validation**: Validation of workflow inputs and triggers +- **Error Handling**: Secure error messages without sensitive data + +### Integration Security + +External integrations follow security guidelines: + +- **API Authentication**: Secure token-based authentication +- **HTTPS Only**: All external communications use HTTPS +- **Webhook Validation**: Validate webhook signatures +- **Rate Limiting**: Implement rate limiting where applicable + +### Repository Security + +- **Branch Protection**: Main branches are protected +- **Required Reviews**: PRs require approval +- **Status Checks**: Required CI checks must pass +- **Signed Commits**: Recommended for maintainers + +## Vulnerability Disclosure + +When a vulnerability is fixed: + +1. **Security Advisory Published** + - Detailed description of the issue + - Affected versions + - Remediation steps + - Credits to reporter + +2. **Release Notes Updated** + - Security fixes highlighted + - Upgrade instructions + - Breaking changes noted + +3. **Notification Sent** + - GitHub Security Advisories + - Repository watchers notified + - Related projects informed + +## Security Resources + +### Tools Used + +- [CodeQL](https://codeql.github.com/) - Semantic code analysis +- [Trivy](https://github.com/aquasecurity/trivy) - Vulnerability scanner +- [Dependabot](https://github.com/dependabot) - Dependency updates +- [GitHub Secret Scanning](https://docs.github.com/en/code-security/secret-scanning) - Secret detection + +### References + +- [GitHub Security Best Practices](https://docs.github.com/en/code-security/getting-started/securing-your-repository) +- [OWASP Top 10](https://owasp.org/www-project-top-ten/) +- [CWE Common Weakness Enumeration](https://cwe.mitre.org/) + +## Acknowledgments + +We appreciate the security research community and will acknowledge reporters in: +- Security advisories +- Release notes +- Hall of Fame (if implemented) + +## Questions? + +For security-related questions that are not vulnerabilities: +- Open a Discussion in the Security category +- Contact maintainers via GitHub +- Review existing security documentation + +Thank you for helping keep Time-Machines-Builders secure! πŸ”’