From 8dee4e6de2715ed29f5049373617985e5eb05ad5 Mon Sep 17 00:00:00 2001
From: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
Date: Mon, 18 May 2026 19:26:49 -0500
Subject: [PATCH 01/19] Potential fix for pull request finding 'CodeQL /
Workflow does not contain permissions'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
---
.github/workflows/major-updates.yml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/.github/workflows/major-updates.yml b/.github/workflows/major-updates.yml
index 9aef5b5..54fe88b 100644
--- a/.github/workflows/major-updates.yml
+++ b/.github/workflows/major-updates.yml
@@ -5,6 +5,10 @@ on:
- cron: '0 10 1 * *' # 1st of month at 10 AM
workflow_dispatch:
+permissions:
+ contents: read
+ issues: write
+
jobs:
check-major:
runs-on: ubuntu-latest
From 1746a39c551868c9c6dbae5b09f69acde5b18b67 Mon Sep 17 00:00:00 2001
From: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
Date: Mon, 18 May 2026 20:22:26 -0500
Subject: [PATCH 02/19] Create MONOREPO_MAP.md
Signed-off-by: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
---
MONOREPO_MAP.md | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 MONOREPO_MAP.md
diff --git a/MONOREPO_MAP.md b/MONOREPO_MAP.md
new file mode 100644
index 0000000..f0ebe00
--- /dev/null
+++ b/MONOREPO_MAP.md
@@ -0,0 +1,44 @@
+# MBTQ.dev Monorepo Map
+
+This repository contains multiple subsystems. Each subsystem is isolated by boundaries.
+
+## 1. Backend Services (Python)
+- app/ (Flask)
+- fastapi_backend/
+- magician_api/
+- database/
+
+## 2. Frontend / Static
+- static/
+- templates/
+- docs/
+- GitHub Pages demo
+
+## 3. AI / Quantum
+- magician_api/ai
+- magician_api/quantum
+- app/core/quantum
+
+## 4. Integrations
+- app/integrations/
+- fastapi_backend/api/v1/integration_endpoints.py
+
+## 5. Infrastructure
+- deployment/docker/
+- deployment/kubernetes/
+- deployment/terraform/
+- deployment/ansible/
+
+## 6. Tests
+- tests/unit
+- tests/integration
+- tests/e2e
+- tests/accessibility
+- tests/performance
+
+## 7. Scripts
+- scripts/setup
+- scripts/deployment
+- scripts/data
+- scripts/maintenance
+- scripts/monitoring
From 6809fd8510fc491456686e815cb717cc38beea10 Mon Sep 17 00:00:00 2001
From: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
Date: Mon, 18 May 2026 20:23:11 -0500
Subject: [PATCH 03/19] Create dev
Signed-off-by: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
---
envs/dev | 1 +
1 file changed, 1 insertion(+)
create mode 100644 envs/dev
diff --git a/envs/dev b/envs/dev
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/envs/dev
@@ -0,0 +1 @@
+
From e2150fc452b7eeb5d420ae0d65f5d60f5696af66 Mon Sep 17 00:00:00 2001
From: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
Date: Mon, 18 May 2026 20:23:27 -0500
Subject: [PATCH 04/19] Create staging
Signed-off-by: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
---
staging | 1 +
1 file changed, 1 insertion(+)
create mode 100644 staging
diff --git a/staging b/staging
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/staging
@@ -0,0 +1 @@
+
From fb15a97a3418b98d43ab3f22b4a4731126727ef7 Mon Sep 17 00:00:00 2001
From: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
Date: Mon, 18 May 2026 20:25:36 -0500
Subject: [PATCH 05/19] Rename staging to envs/staging
Signed-off-by: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
---
staging => envs/staging | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename staging => envs/staging (100%)
diff --git a/staging b/envs/staging
similarity index 100%
rename from staging
rename to envs/staging
From ad0dbd1ba0b866988d05093b0915259e7f99d934 Mon Sep 17 00:00:00 2001
From: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
Date: Mon, 18 May 2026 20:25:54 -0500
Subject: [PATCH 06/19] Create prod
Signed-off-by: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
---
envs/prod | 1 +
1 file changed, 1 insertion(+)
create mode 100644 envs/prod
diff --git a/envs/prod b/envs/prod
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/envs/prod
@@ -0,0 +1 @@
+
From 541dcf0d78a7733570dba7d212290c8a48d4fc4a Mon Sep 17 00:00:00 2001
From: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
Date: Mon, 18 May 2026 21:09:46 -0500
Subject: [PATCH 07/19] Create co-pilot-instruction.md
Signed-off-by: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
---
.github/co-pilot-instruction.md | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 .github/co-pilot-instruction.md
diff --git a/.github/co-pilot-instruction.md b/.github/co-pilot-instruction.md
new file mode 100644
index 0000000..c29808b
--- /dev/null
+++ b/.github/co-pilot-instruction.md
@@ -0,0 +1,16 @@
+# Project general coding guidelines
+
+## Code Style
+- Use semantic HTML5 elements (header, main, section, article, etc.)
+- Prefer modern JavaScript (ES6+) features like const/let, arrow functions, and template literals
+
+## Naming Conventions
+- Use PascalCase for component names, interfaces, and type aliases
+- Use camelCase for variables, functions, and methods
+- Prefix private class members with underscore (_)
+- Use ALL_CAPS for constants
+
+## Code Quality
+- Use meaningful variable and function names that clearly describe their purpose
+- Include helpful comments for complex logic
+- Add error handling for user inputs and API calls
From 841848d1cdc6d8b4e3739591143daf881d5ef4d1 Mon Sep 17 00:00:00 2001
From: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
Date: Mon, 18 May 2026 21:11:27 -0500
Subject: [PATCH 08/19] Update infrastructure.md
Signed-off-by: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
---
infrastructure.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/infrastructure.md b/infrastructure.md
index af27616..e42ee5d 100644
--- a/infrastructure.md
+++ b/infrastructure.md
@@ -1,7 +1,7 @@
# MBTQ.dv: Complete GitHub Repository Structure
```
-mbtq-deaf-first-platform/
+deaf-first-platform/
├── README.md
├── LICENSE
├── .gitignore
From 326de3e3ab704785df0b04b0ba957e82a678c72b Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 19 May 2026 01:09:53 -0500
Subject: [PATCH 09/19] chore(deps-dev): bump vitest from 2.1.9 to 4.1.6 in
/backend (#89)
---
backend/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/package.json b/backend/package.json
index 8344842..23480b5 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -37,6 +37,6 @@
"eslint": "^9.15.0",
"tsx": "^4.19.2",
"typescript": "^5.7.2",
- "vitest": "^2.1.5"
+ "vitest": "^4.1.6"
}
}
From 220d48b89b7d2267b26095c3db18e5a6484ceab4 Mon Sep 17 00:00:00 2001
From: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
Date: Thu, 21 May 2026 04:27:06 -0500
Subject: [PATCH 10/19] Update cloudbuild.yaml
Signed-off-by: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
---
cloudbuild.yaml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/cloudbuild.yaml b/cloudbuild.yaml
index 35a118f..42e2438 100644
--- a/cloudbuild.yaml
+++ b/cloudbuild.yaml
@@ -3,13 +3,13 @@
steps:
# Install dependencies
- - name: 'node:20'
+ - name: 'node:24'
id: 'install-dependencies'
entrypoint: 'npm'
args: ['ci']
# Run tests
- - name: 'node:20'
+ - name: 'node:24'
id: 'test'
entrypoint: 'npm'
args: ['run', 'test']
@@ -18,7 +18,7 @@ steps:
waitFor: ['install-dependencies']
# Build all services
- - name: 'node:20'
+ - name: 'node:24'
id: 'build'
entrypoint: 'npm'
args: ['run', 'build']
From 6278974e0a142716099f311ddaadb5ae558d4c04 Mon Sep 17 00:00:00 2001
From: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
Date: Thu, 21 May 2026 04:58:41 -0500
Subject: [PATCH 11/19] Update package.json
Signed-off-by: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
---
package.json | 76 +++++++++++++++++++++++++---------------------------
1 file changed, 37 insertions(+), 39 deletions(-)
diff --git a/package.json b/package.json
index ac15ad4..b15465c 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,3 @@
-<<<<<<< HEAD
-{
"name": "deaf-first",
"version": "2.0.0",
"private": true,
@@ -76,40 +74,40 @@
"mcp-server"
]
}
-=======
-{
- "name": "mbtq-deaf-first-platform",
- "version": "1.0.0",
- "description": "MBTQ Universe deaf-first platform with OpenAPI specifications",
- "main": "index.js",
- "scripts": {
- "test": "jest",
- "test:watch": "jest --watch",
- "test:coverage": "jest --coverage",
- "validate:openapi": "node scripts/validate-openapi.js",
- "generate:sdk": "npm run generate:sdk:typescript && npm run generate:sdk:python",
- "generate:sdk:typescript": "node scripts/generate-sdk.js typescript",
- "generate:sdk:python": "node scripts/generate-sdk.js python",
- "lint": "eslint .",
- "format": "prettier --write ."
- },
- "keywords": [
- "deaf-first",
- "accessibility",
- "openapi",
- "api",
- "mbtq"
- ],
- "author": "MBTQ Universe",
- "license": "MIT",
- "devDependencies": {
- "@apidevtools/swagger-parser": "^10.1.0",
- "@openapitools/openapi-generator-cli": "^2.13.4",
- "axios": "^1.6.0",
- "eslint": "^8.57.0",
- "jest": "^29.7.0",
- "prettier": "^3.2.5",
- "yaml": "^2.3.4"
- }
-}
->>>>>>> e961430... Add Node.js API automated tests and SDK generation capabilities
+=======
+{
+ "name": "mbtq-deaf-first-platform",
+ "version": "1.0.0",
+ "description": "MBTQ Universe deaf-first platform with OpenAPI specifications",
+ "main": "index.js",
+ "scripts": {
+ "test": "jest",
+ "test:watch": "jest --watch",
+ "test:coverage": "jest --coverage",
+ "validate:openapi": "node scripts/validate-openapi.js",
+ "generate:sdk": "npm run generate:sdk:typescript && npm run generate:sdk:python",
+ "generate:sdk:typescript": "node scripts/generate-sdk.js typescript",
+ "generate:sdk:python": "node scripts/generate-sdk.js python",
+ "lint": "eslint .",
+ "format": "prettier --write ."
+ },
+ "keywords": [
+ "deaf-first",
+ "accessibility",
+ "openapi",
+ "api",
+ "mbtq"
+ ],
+ "author": "MBTQ Universe",
+ "license": "MIT",
+ "devDependencies": {
+ "@apidevtools/swagger-parser": "^10.1.0",
+ "@openapitools/openapi-generator-cli": "^2.13.4",
+ "axios": "^1.6.0",
+ "eslint": "^8.57.0",
+ "jest": "^29.7.0",
+ "prettier": "^3.2.5",
+ "yaml": "^2.3.4"
+ }
+}
+>>>>>>> e961430... Add Node.js API automated tests and SDK generation capabilities
From f77824f5494b106d5f0cddbdf37ae2e730ab7597 Mon Sep 17 00:00:00 2001
From: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
Date: Thu, 21 May 2026 04:59:29 -0500
Subject: [PATCH 12/19] Update api-tests.yml
Signed-off-by: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
---
.github/workflows/api-tests.yml | 185 ++++++++++++++++----------------
1 file changed, 92 insertions(+), 93 deletions(-)
diff --git a/.github/workflows/api-tests.yml b/.github/workflows/api-tests.yml
index 988b247..08d2c3d 100644
--- a/.github/workflows/api-tests.yml
+++ b/.github/workflows/api-tests.yml
@@ -1,4 +1,3 @@
-<<<<<<< HEAD
name: API Tests and Validation
on:
@@ -89,95 +88,95 @@ jobs:
name: generated-sdks
path: sdks/
retention-days: 30
-=======
-name: API Tests and Validation
-
-on:
- push:
- branches: [ main, develop ]
- pull_request:
- branches: [ main, develop ]
-
-jobs:
- test:
- runs-on: ubuntu-latest
-
- strategy:
- matrix:
- node-version: [18.x, 20.x]
-
- steps:
- - uses: actions/checkout@v3
-
- - name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v3
- with:
- node-version: ${{ matrix.node-version }}
- cache: 'npm'
-
- - name: Install dependencies
- run: npm ci
-
- - name: Validate OpenAPI specifications
- run: npm run validate:openapi
-
- - name: Run tests
- run: npm test
-
- - name: Generate coverage report
- run: npm run test:coverage
-
- - name: Upload coverage to Codecov
- uses: codecov/codecov-action@v3
- with:
- files: ./coverage/lcov.info
- flags: unittests
- name: codecov-umbrella
-
- validate-specs:
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v3
-
- - name: Use Node.js
- uses: actions/setup-node@v3
- with:
- node-version: '20.x'
- cache: 'npm'
-
- - name: Install dependencies
- run: npm ci
-
- - name: Validate all OpenAPI specifications
- run: npm run validate:openapi
-
- generate-sdks:
- runs-on: ubuntu-latest
- needs: [test, validate-specs]
-
- steps:
- - uses: actions/checkout@v3
-
- - name: Use Node.js
- uses: actions/setup-node@v3
- with:
- node-version: '20.x'
- cache: 'npm'
-
- - name: Install dependencies
- run: npm ci
-
- - name: Generate TypeScript SDK
- run: npm run generate:sdk:typescript
-
- - name: Generate Python SDK
- run: npm run generate:sdk:python
-
- - name: Upload SDK artifacts
- uses: actions/upload-artifact@v3
- with:
- name: generated-sdks
- path: sdks/
- retention-days: 30
->>>>>>> e961430... Add Node.js API automated tests and SDK generation capabilities
+=======
+name: API Tests and Validation
+
+on:
+ push:
+ branches: [ main, develop ]
+ pull_request:
+ branches: [ main, develop ]
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ node-version: [18.x, 20.x]
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v3
+ with:
+ node-version: ${{ matrix.node-version }}
+ cache: 'npm'
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Validate OpenAPI specifications
+ run: npm run validate:openapi
+
+ - name: Run tests
+ run: npm test
+
+ - name: Generate coverage report
+ run: npm run test:coverage
+
+ - name: Upload coverage to Codecov
+ uses: codecov/codecov-action@v3
+ with:
+ files: ./coverage/lcov.info
+ flags: unittests
+ name: codecov-umbrella
+
+ validate-specs:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Use Node.js
+ uses: actions/setup-node@v3
+ with:
+ node-version: '20.x'
+ cache: 'npm'
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Validate all OpenAPI specifications
+ run: npm run validate:openapi
+
+ generate-sdks:
+ runs-on: ubuntu-latest
+ needs: [test, validate-specs]
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Use Node.js
+ uses: actions/setup-node@v3
+ with:
+ node-version: '20.x'
+ cache: 'npm'
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Generate TypeScript SDK
+ run: npm run generate:sdk:typescript
+
+ - name: Generate Python SDK
+ run: npm run generate:sdk:python
+
+ - name: Upload SDK artifacts
+ uses: actions/upload-artifact@v3
+ with:
+ name: generated-sdks
+ path: sdks/
+ retention-days: 30
+>>>>>>> e961430... Add Node.js API automated tests and SDK generation capabilities
From 87c34b162f22974332dfedc5fb5c71b9a3ae91a0 Mon Sep 17 00:00:00 2001
From: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
Date: Thu, 21 May 2026 05:06:40 -0500
Subject: [PATCH 13/19] Update generate-sdk.js
Signed-off-by: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
---
scripts/generate-sdk.js | 265 ++++++++++++++++++++--------------------
1 file changed, 132 insertions(+), 133 deletions(-)
diff --git a/scripts/generate-sdk.js b/scripts/generate-sdk.js
index 30b7db3..e1e6ba7 100644
--- a/scripts/generate-sdk.js
+++ b/scripts/generate-sdk.js
@@ -1,4 +1,3 @@
-<<<<<<< HEAD
/**
* SDK Generator Script
* Generates TypeScript and Python SDKs from OpenAPI specifications
@@ -129,135 +128,135 @@ console.log('\n🚀 MBTQ Universe SDK Generator\n');
ensureDirectoryExists(SDK_OUTPUT_DIR);
generateAllSDKs(language);
-=======
-/**
- * SDK Generator Script
- * Generates TypeScript and Python SDKs from OpenAPI specifications
- */
-
-const fs = require('fs');
-const path = require('path');
-const { execSync } = require('child_process');
-
-const SERVICES_DIR = path.join(__dirname, '..', 'services');
-const SDK_OUTPUT_DIR = path.join(__dirname, '..', 'sdks');
-
-const SDK_CONFIGS = {
- typescript: {
- generator: 'typescript-axios',
- outputDir: 'typescript',
- additionalProps: {
- npmName: '@mbtq/sdk',
- npmVersion: '1.0.0',
- supportsES6: true,
- withSeparateModelsAndApi: true
- }
- },
- python: {
- generator: 'python',
- outputDir: 'python',
- additionalProps: {
- packageName: 'mbtq_sdk',
- projectName: 'mbtq-sdk',
- packageVersion: '1.0.0'
- }
- }
-};
-
-function ensureDirectoryExists(dir) {
- if (!fs.existsSync(dir)) {
- fs.mkdirSync(dir, { recursive: true });
- }
-}
-
-function generateSDK(service, specPath, language) {
- const config = SDK_CONFIGS[language];
- const outputDir = path.join(SDK_OUTPUT_DIR, config.outputDir, service);
-
- console.log(`\n📦 Generating ${language} SDK for ${service}...`);
-
- ensureDirectoryExists(outputDir);
-
- // Build additional properties string
- const additionalProps = Object.entries(config.additionalProps)
- .map(([key, value]) => `${key}=${value}`)
- .join(',');
-
- try {
- // Use openapi-generator-cli
- const command = [
- 'npx',
- '@openapitools/openapi-generator-cli',
- 'generate',
- `-i ${specPath}`,
- `-g ${config.generator}`,
- `-o ${outputDir}`,
- `--additional-properties=${additionalProps}`,
- '--skip-validate-spec' // We already validated
- ].join(' ');
-
- execSync(command, { stdio: 'inherit' });
-
- console.log(` ✅ ${language} SDK generated successfully`);
- console.log(` 📁 Output: ${outputDir}`);
-
- return true;
- } catch (error) {
- console.error(` ❌ Failed to generate ${language} SDK: ${error.message}`);
- return false;
- }
-}
-
-function generateAllSDKs(language) {
- console.log('═══════════════════════════════════════════════════════════');
- console.log(` Generating ${language.toUpperCase()} SDKs`);
- console.log('═══════════════════════════════════════════════════════════');
-
- const services = fs.readdirSync(SERVICES_DIR)
- .filter(name => {
- const servicePath = path.join(SERVICES_DIR, name);
- return fs.statSync(servicePath).isDirectory();
- });
-
- let successCount = 0;
-
- for (const service of services) {
- const specPath = path.join(SERVICES_DIR, service, 'openapi', 'openapi.yaml');
-
- if (fs.existsSync(specPath)) {
- const success = generateSDK(service, specPath, language);
- if (success) successCount++;
- } else {
- console.log(`\n⚠️ ${service}: No OpenAPI spec found`);
- }
- }
-
- console.log('\n═══════════════════════════════════════════════════════════');
- console.log(`\n📊 Summary:`);
- console.log(` Services processed: ${services.length}`);
- console.log(` SDKs generated: ${successCount}`);
-
- if (successCount === services.length) {
- console.log(`\n✅ All ${language} SDKs generated successfully!`);
- console.log(`📁 Output directory: ${path.join(SDK_OUTPUT_DIR, SDK_CONFIGS[language].outputDir)}`);
- } else {
- console.log(`\n⚠️ Some SDKs failed to generate`);
- }
-}
-
-// Main execution
-const language = process.argv[2];
-
-if (!language || !SDK_CONFIGS[language]) {
- console.error('Usage: node generate-sdk.js [typescript|python]');
- console.error('Available languages:', Object.keys(SDK_CONFIGS).join(', '));
- process.exit(1);
-}
-
-console.log('\n🚀 MBTQ Universe SDK Generator\n');
-
-// Ensure SDK output directory exists
-ensureDirectoryExists(SDK_OUTPUT_DIR);
-
-generateAllSDKs(language);
->>>>>>> e961430... Add Node.js API automated tests and SDK generation capabilities
+=======
+/**
+ * SDK Generator Script
+ * Generates TypeScript and Python SDKs from OpenAPI specifications
+ */
+
+const fs = require('fs');
+const path = require('path');
+const { execSync } = require('child_process');
+
+const SERVICES_DIR = path.join(__dirname, '..', 'services');
+const SDK_OUTPUT_DIR = path.join(__dirname, '..', 'sdks');
+
+const SDK_CONFIGS = {
+ typescript: {
+ generator: 'typescript-axios',
+ outputDir: 'typescript',
+ additionalProps: {
+ npmName: '@mbtq/sdk',
+ npmVersion: '1.0.0',
+ supportsES6: true,
+ withSeparateModelsAndApi: true
+ }
+ },
+ python: {
+ generator: 'python',
+ outputDir: 'python',
+ additionalProps: {
+ packageName: 'mbtq_sdk',
+ projectName: 'mbtq-sdk',
+ packageVersion: '1.0.0'
+ }
+ }
+};
+
+function ensureDirectoryExists(dir) {
+ if (!fs.existsSync(dir)) {
+ fs.mkdirSync(dir, { recursive: true });
+ }
+}
+
+function generateSDK(service, specPath, language) {
+ const config = SDK_CONFIGS[language];
+ const outputDir = path.join(SDK_OUTPUT_DIR, config.outputDir, service);
+
+ console.log(`\n📦 Generating ${language} SDK for ${service}...`);
+
+ ensureDirectoryExists(outputDir);
+
+ // Build additional properties string
+ const additionalProps = Object.entries(config.additionalProps)
+ .map(([key, value]) => `${key}=${value}`)
+ .join(',');
+
+ try {
+ // Use openapi-generator-cli
+ const command = [
+ 'npx',
+ '@openapitools/openapi-generator-cli',
+ 'generate',
+ `-i ${specPath}`,
+ `-g ${config.generator}`,
+ `-o ${outputDir}`,
+ `--additional-properties=${additionalProps}`,
+ '--skip-validate-spec' // We already validated
+ ].join(' ');
+
+ execSync(command, { stdio: 'inherit' });
+
+ console.log(` ✅ ${language} SDK generated successfully`);
+ console.log(` 📁 Output: ${outputDir}`);
+
+ return true;
+ } catch (error) {
+ console.error(` ❌ Failed to generate ${language} SDK: ${error.message}`);
+ return false;
+ }
+}
+
+function generateAllSDKs(language) {
+ console.log('═══════════════════════════════════════════════════════════');
+ console.log(` Generating ${language.toUpperCase()} SDKs`);
+ console.log('═══════════════════════════════════════════════════════════');
+
+ const services = fs.readdirSync(SERVICES_DIR)
+ .filter(name => {
+ const servicePath = path.join(SERVICES_DIR, name);
+ return fs.statSync(servicePath).isDirectory();
+ });
+
+ let successCount = 0;
+
+ for (const service of services) {
+ const specPath = path.join(SERVICES_DIR, service, 'openapi', 'openapi.yaml');
+
+ if (fs.existsSync(specPath)) {
+ const success = generateSDK(service, specPath, language);
+ if (success) successCount++;
+ } else {
+ console.log(`\n⚠️ ${service}: No OpenAPI spec found`);
+ }
+ }
+
+ console.log('\n═══════════════════════════════════════════════════════════');
+ console.log(`\n📊 Summary:`);
+ console.log(` Services processed: ${services.length}`);
+ console.log(` SDKs generated: ${successCount}`);
+
+ if (successCount === services.length) {
+ console.log(`\n✅ All ${language} SDKs generated successfully!`);
+ console.log(`📁 Output directory: ${path.join(SDK_OUTPUT_DIR, SDK_CONFIGS[language].outputDir)}`);
+ } else {
+ console.log(`\n⚠️ Some SDKs failed to generate`);
+ }
+}
+
+// Main execution
+const language = process.argv[2];
+
+if (!language || !SDK_CONFIGS[language]) {
+ console.error('Usage: node generate-sdk.js [typescript|python]');
+ console.error('Available languages:', Object.keys(SDK_CONFIGS).join(', '));
+ process.exit(1);
+}
+
+console.log('\n🚀 MBTQ Universe SDK Generator\n');
+
+// Ensure SDK output directory exists
+ensureDirectoryExists(SDK_OUTPUT_DIR);
+
+generateAllSDKs(language);
+>>>>>>> e961430... Add Node.js API automated tests and SDK generation capabilities
From a38bb52ebb91b616b00199de134d6d5004707e4c Mon Sep 17 00:00:00 2001
From: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
Date: Thu, 21 May 2026 05:07:36 -0500
Subject: [PATCH 14/19] Update validate-openapi.js
Signed-off-by: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
---
scripts/validate-openapi.js | 191 ++++++++++++++++++------------------
1 file changed, 95 insertions(+), 96 deletions(-)
diff --git a/scripts/validate-openapi.js b/scripts/validate-openapi.js
index 1706581..951f7e6 100644
--- a/scripts/validate-openapi.js
+++ b/scripts/validate-openapi.js
@@ -1,4 +1,3 @@
-<<<<<<< HEAD
/**
* OpenAPI Specification Validator
* Validates all OpenAPI specs in the services directory
@@ -92,98 +91,98 @@ validateAllSpecs().catch(error => {
console.error('Fatal error:', error);
process.exit(1);
});
-=======
-/**
- * OpenAPI Specification Validator
- * Validates all OpenAPI specs in the services directory
- */
-
-const fs = require('fs');
-const path = require('path');
-const yaml = require('yaml');
-const SwaggerParser = require('@apidevtools/swagger-parser');
-
-const SERVICES_DIR = path.join(__dirname, '..', 'services');
-
-async function validateOpenAPISpec(serviceName, specPath) {
- try {
- console.log(`\n📋 Validating ${serviceName}...`);
-
- // Parse and validate the spec
- const api = await SwaggerParser.validate(specPath);
-
- // Count endpoints
- const pathCount = Object.keys(api.paths || {}).length;
- let endpointCount = 0;
-
- for (const path in api.paths) {
- const methods = api.paths[path];
- endpointCount += Object.keys(methods).filter(m =>
- ['get', 'post', 'put', 'patch', 'delete'].includes(m)
- ).length;
- }
-
- console.log(` ✅ Valid OpenAPI ${api.openapi} specification`);
- console.log(` 📊 ${pathCount} paths, ${endpointCount} endpoints`);
- console.log(` 📝 Title: ${api.info.title}`);
- console.log(` 🔢 Version: ${api.info.version}`);
-
- return { valid: true, serviceName, pathCount, endpointCount };
- } catch (error) {
- console.error(` ❌ Validation failed: ${error.message}`);
- return { valid: false, serviceName, error: error.message };
- }
-}
-
-async function validateAllSpecs() {
- console.log('═══════════════════════════════════════════════════════════');
- console.log(' OpenAPI Specification Validation');
- console.log('═══════════════════════════════════════════════════════════');
-
- const services = fs.readdirSync(SERVICES_DIR)
- .filter(name => {
- const servicePath = path.join(SERVICES_DIR, name);
- return fs.statSync(servicePath).isDirectory();
- });
-
- const results = [];
-
- for (const service of services) {
- const specPath = path.join(SERVICES_DIR, service, 'openapi', 'openapi.yaml');
-
- if (fs.existsSync(specPath)) {
- const result = await validateOpenAPISpec(service, specPath);
- results.push(result);
- } else {
- console.log(`\n⚠️ ${service}: No OpenAPI spec found`);
- results.push({ valid: false, serviceName: service, error: 'Spec file not found' });
- }
- }
-
- // Summary
- console.log('\n═══════════════════════════════════════════════════════════');
- const validCount = results.filter(r => r.valid).length;
- const totalEndpoints = results
- .filter(r => r.valid)
- .reduce((sum, r) => sum + r.endpointCount, 0);
-
- console.log(`\n📊 Summary:`);
- console.log(` Services validated: ${results.length}`);
- console.log(` Valid specifications: ${validCount}`);
- console.log(` Total endpoints: ${totalEndpoints}`);
-
- if (validCount === results.length) {
- console.log('\n✅ All OpenAPI specifications are valid!');
- process.exit(0);
- } else {
- console.log('\n❌ Some specifications have errors');
- process.exit(1);
- }
-}
-
-// Run validation
-validateAllSpecs().catch(error => {
- console.error('Fatal error:', error);
- process.exit(1);
-});
->>>>>>> e961430... Add Node.js API automated tests and SDK generation capabilities
+=======
+/**
+ * OpenAPI Specification Validator
+ * Validates all OpenAPI specs in the services directory
+ */
+
+const fs = require('fs');
+const path = require('path');
+const yaml = require('yaml');
+const SwaggerParser = require('@apidevtools/swagger-parser');
+
+const SERVICES_DIR = path.join(__dirname, '..', 'services');
+
+async function validateOpenAPISpec(serviceName, specPath) {
+ try {
+ console.log(`\n📋 Validating ${serviceName}...`);
+
+ // Parse and validate the spec
+ const api = await SwaggerParser.validate(specPath);
+
+ // Count endpoints
+ const pathCount = Object.keys(api.paths || {}).length;
+ let endpointCount = 0;
+
+ for (const path in api.paths) {
+ const methods = api.paths[path];
+ endpointCount += Object.keys(methods).filter(m =>
+ ['get', 'post', 'put', 'patch', 'delete'].includes(m)
+ ).length;
+ }
+
+ console.log(` ✅ Valid OpenAPI ${api.openapi} specification`);
+ console.log(` 📊 ${pathCount} paths, ${endpointCount} endpoints`);
+ console.log(` 📝 Title: ${api.info.title}`);
+ console.log(` 🔢 Version: ${api.info.version}`);
+
+ return { valid: true, serviceName, pathCount, endpointCount };
+ } catch (error) {
+ console.error(` ❌ Validation failed: ${error.message}`);
+ return { valid: false, serviceName, error: error.message };
+ }
+}
+
+async function validateAllSpecs() {
+ console.log('═══════════════════════════════════════════════════════════');
+ console.log(' OpenAPI Specification Validation');
+ console.log('═══════════════════════════════════════════════════════════');
+
+ const services = fs.readdirSync(SERVICES_DIR)
+ .filter(name => {
+ const servicePath = path.join(SERVICES_DIR, name);
+ return fs.statSync(servicePath).isDirectory();
+ });
+
+ const results = [];
+
+ for (const service of services) {
+ const specPath = path.join(SERVICES_DIR, service, 'openapi', 'openapi.yaml');
+
+ if (fs.existsSync(specPath)) {
+ const result = await validateOpenAPISpec(service, specPath);
+ results.push(result);
+ } else {
+ console.log(`\n⚠️ ${service}: No OpenAPI spec found`);
+ results.push({ valid: false, serviceName: service, error: 'Spec file not found' });
+ }
+ }
+
+ // Summary
+ console.log('\n═══════════════════════════════════════════════════════════');
+ const validCount = results.filter(r => r.valid).length;
+ const totalEndpoints = results
+ .filter(r => r.valid)
+ .reduce((sum, r) => sum + r.endpointCount, 0);
+
+ console.log(`\n📊 Summary:`);
+ console.log(` Services validated: ${results.length}`);
+ console.log(` Valid specifications: ${validCount}`);
+ console.log(` Total endpoints: ${totalEndpoints}`);
+
+ if (validCount === results.length) {
+ console.log('\n✅ All OpenAPI specifications are valid!');
+ process.exit(0);
+ } else {
+ console.log('\n❌ Some specifications have errors');
+ process.exit(1);
+ }
+}
+
+// Run validation
+validateAllSpecs().catch(error => {
+ console.error('Fatal error:', error);
+ process.exit(1);
+});
+>>>>>>> e961430... Add Node.js API automated tests and SDK generation capabilities
From 9d45912b9ae40435c258a4d58e3759d2c1397f9c Mon Sep 17 00:00:00 2001
From: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
Date: Thu, 21 May 2026 05:17:21 -0500
Subject: [PATCH 15/19] Update index.html
Signed-off-by: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
---
docs/html/index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/html/index.html b/docs/html/index.html
index 64e73c5..2bcad9a 100644
--- a/docs/html/index.html
+++ b/docs/html/index.html
@@ -3,7 +3,7 @@
- Deaf-First Project - API Documentation
+ Deaf-First Platform - API Documentation
From de04cd8059bb50d03149bb3d6e33a931a0603762 Mon Sep 17 00:00:00 2001
From: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
Date: Thu, 21 May 2026 05:22:54 -0500
Subject: [PATCH 16/19] Create infra.sh
Signed-off-by: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
---
scripts/infra.sh | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
create mode 100644 scripts/infra.sh
diff --git a/scripts/infra.sh b/scripts/infra.sh
new file mode 100644
index 0000000..f9d6c76
--- /dev/null
+++ b/scripts/infra.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+# Infrastructure Readiness Check Script
+
+echo "🔍 Starting Infrastructure Readiness Check..."
+
+# 1. Verify service directories and package.json
+SERVICES=("deafauth" "pinksync" "fibonrose")
+for service in "${SERVICES[@]}"; do
+ if [ -f "services/$service/package.json" ]; then
+ echo "✅ $service service configured"
+ else
+ echo "❌ $service service NOT configured (missing services/$service/package.json)"
+ exit 1
+ fi
+done
+
+# 2. Verify Terraform files
+TF_FILES=("main.tf" "variables.tf" "outputs.tf" "networking.tf" "deafauth.tf" "pinksync.tf" "fibonrose.tf" "monitoring.tf" "cicd.tf" "billing.tf")
+for tf_file in "${TF_FILES[@]}"; do
+ if [ -f "terraform/$tf_file" ]; then
+ echo "✅ Terraform file $tf_file present"
+ else
+ echo "❌ Terraform file $tf_file MISSING"
+ exit 1
+ fi
+done
+
+# 3. Verify environment files
+ENV_FILES=("dev.tfvars" "staging.tfvars" "production.tfvars")
+for env_file in "${ENV_FILES[@]}"; do
+ if [ -f "environments/$env_file" ]; then
+ echo "✅ Environment file $env_file present"
+ else
+ echo "❌ Environment file $env_file MISSING"
+ exit 1
+ fi
+done
+
+echo "✅ ALL INFRASTRUCTURE CHECKS PASSED"
+exit 0
From 3a01196ee744f1c929099860cd94df824ee095cc Mon Sep 17 00:00:00 2001
From: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
Date: Thu, 21 May 2026 05:33:02 -0500
Subject: [PATCH 17/19] Update README.md
Signed-off-by: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
---
README.md | 730 +++++++++++++++++++++++++++---------------------------
1 file changed, 365 insertions(+), 365 deletions(-)
diff --git a/README.md b/README.md
index 21e6653..c9ba349 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-<<<<<<< main
+[](https://github.com/pinkycollie/deaf-first-platform/actions/workflows/github-code-scanning/codeql)
[](https://codecov.io/gh/pinkycollie/deaf-first-platform)
[](https://github.com/pinkycollie/DEAF-FIRST-PLATFORM/actions/workflows/copilot-pull-request-reviewer/copilot-pull-request-reviewer)
# MBTQ Deaf-First Platform
@@ -681,367 +681,367 @@ MIT License - see LICENSE file for details
- http platform management
- Real-time synchronization
- Sign language support
-=======
-# MBTQ Deaf-First Platform
-
-A comprehensive platform built with deaf-first principles, providing accessible financial services, AI-powered assistance, and decentralized governance.
-
-## 📚 MBTQ Universe Components
-
-This repository contains OpenAPI specifications for all five core services of the MBTQ Universe:
-
-### 1. **DeafAUTH - Identity Cortex**
-Secure authentication system designed with deaf-first principles.
-
-- **Location**: `services/deafauth/`
-- **Base URL**: `https://api.mbtquniverse.com/auth`
-- **Documentation**: [DeafAUTH README](services/deafauth/README.md)
-- **OpenAPI Spec**: [openapi.yaml](services/deafauth/openapi/openapi.yaml)
-
-### 2. **PinkSync - Accessibility Engine**
-Real-time accessibility features and synchronization.
-
-- **Location**: `services/pinksync/`
-- **Base URL**: `https://api.mbtquniverse.com/sync`
-- **Documentation**: [PinkSync README](services/pinksync/README.md)
-- **OpenAPI Spec**: [openapi.yaml](services/pinksync/openapi/openapi.yaml)
-
-### 3. **Fibonrose - Trust & Blockchain**
-Decentralized trust and verification layer.
-
-- **Location**: `services/fibonrose/`
-- **Base URL**: `https://api.mbtquniverse.com/blockchain`
-- **Documentation**: [Fibonrose README](services/fibonrose/README.md)
-- **OpenAPI Spec**: [openapi.yaml](services/fibonrose/openapi/openapi.yaml)
-
-### 4. **360Magicians - AI Agents**
-Intelligent automation and assistance agents.
-
-- **Location**: `services/magicians/`
-- **Base URL**: `https://api.mbtquniverse.com/ai`
-- **Documentation**: [360Magicians README](services/magicians/README.md)
-- **OpenAPI Spec**: [openapi.yaml](services/magicians/openapi/openapi.yaml)
-
-### 5. **MBTQ DAO - Governance**
-Decentralized governance and community management.
-
-- **Location**: `services/dao/`
-- **Base URL**: `https://api.mbtquniverse.com/dao`
-- **Documentation**: [DAO README](services/dao/README.md)
-- **OpenAPI Spec**: [openapi.yaml](services/dao/openapi/openapi.yaml)
-
-## 🚀 Features
-
-✔ All endpoints documented with OpenAPI 3.1
-✔ Standardized responses across all services
-✔ Shared DeafAUTH security scheme
-✔ Tags, components, pagination, error schemas
-✔ Cloudflare-friendly JSON-only style
-✔ **Automated API testing with Jest**
-✔ **SDK generation (TypeScript + Python)**
-✔ Production-ready specifications
-
-## 🔐 Authentication
-
-All MBTQ Universe services use DeafAUTH for authentication. Include the Bearer token in the Authorization header:
-
-```bash
-Authorization: Bearer
-```
-
-### Getting Started with Authentication
-
-1. Register a new user:
-```bash
-curl -X POST https://api.mbtquniverse.com/auth/register \
- -H "Content-Type: application/json" \
- -d '{"email": "user@example.com", "password": "secure_password"}'
-```
-
-2. Login to get tokens:
-```bash
-curl -X POST https://api.mbtquniverse.com/auth/login \
- -H "Content-Type: application/json" \
- -d '{"email": "user@example.com", "password": "secure_password"}'
-```
-
-3. Use the access token for API calls:
-```bash
-curl -X GET https://api.mbtquniverse.com/sync/status \
- -H "Authorization: Bearer "
-```
-
-## 📦 API Endpoints Overview
-
-**Note:** The endpoints below show full paths including the service prefix (e.g., `/auth/`, `/sync/`). In the OpenAPI specifications, these are defined as relative paths (e.g., `/register`, `/status`) with the base URL specified in the `servers` section.
-
-### DeafAUTH Endpoints
-
-- `POST /auth/register` - User registration
-- `POST /auth/login` - User authentication
-- `GET /auth/verify` - Token verification
-- `POST /auth/refresh` - Token refresh
-
-### PinkSync Endpoints
-
-- `GET /sync/status` - Check synchronization status
-- `POST /sync/preferences` - Update accessibility preferences
-- `GET /sync/features` - List available accessibility features
-
-### Fibonrose Endpoints
-
-- `POST /blockchain/verify` - Verify blockchain transaction
-- `GET /blockchain/trust-score` - Get trust score
-- `POST /blockchain/record` - Record new transaction
-
-### 360Magicians Endpoints
-
-Comprehensive AI agent platform with 60+ endpoints including:
-
-- Agent management (CRUD operations)
-- Task execution and workflow orchestration
-- Memory and context management
-- File ingestion and RAG search
-- Tool registration and management
-- Scheduling and webhooks
-- Analytics and cost tracking
-
-See [360Magicians README](services/magicians/README.md) for complete endpoint list.
-
-### DAO Endpoints
-
-- `GET /dao/proposals` - List governance proposals
-- `POST /dao/vote` - Submit vote
-- `GET /dao/members` - List DAO members
-
-## 🔧 Environment Configuration
-
-Copy `.env.example` to `.env` and configure your environment variables:
-
-```bash
-cp .env.example .env
-```
-
-See [.env.example](.env.example) for all required configuration options.
-
-## 🌐 Integration Notes
-
-### Google API & AI SDKs
-
-**Google Cloud Integration:**
-
-- Google Cloud Vision API for visual accessibility features
-- Google Speech-to-Text for real-time captioning
-- Google Translate API for multi-language support
-- PinkSync API acts as an API broker network for partners' APIs that enhance deaf accessibility
-
-**AI SDK Integration:**
-
-The platform uses multiple AI models for comprehensive coverage:
-
-- **OpenAI**: GPT-4, GPT-4 Turbo for natural language processing
-- **Anthropic**: Claude 3 for advanced reasoning
-- **Google**: Gemini Pro for multimodal tasks
-- **TensorFlow.js**: Client-side AI processing
-- **Hugging Face Transformers**: Specialized accessibility models
-
-## 🔄 Integration with Other Repositories
-
-This platform integrates with several related repositories:
-
-- [pinkycollie/pinksync](https://github.com/pinkycollie/pinksync) - Fastify-based accessibility engine
-- [pinkycollie/deafauth-ecosystem](https://github.com/pinkycollie/deafauth-ecosystem) - Authentication ecosystem
-- [pinkycollie/fibonrose](https://github.com/pinkycollie/fibonrose) - Blockchain trust layer
-- [pinkycollie/pinkflow](https://github.com/pinkycollie/pinkflow) - Hub pipeline integrator
-
-## 🧪 Testing & Validation
-
-### Automated API Testing
-
-Run comprehensive API tests for all services:
-
-```bash
-# Install dependencies
-npm install
-
-# Run all tests
-npm test
-
-# Run tests with coverage
-npm run test:coverage
-
-# Run specific service tests
-npm test -- tests/deafauth
-npm test -- tests/pinksync
-npm test -- tests/magicians
-```
-
-See [tests/README.md](tests/README.md) for detailed testing documentation.
-
-### OpenAPI Validation
-
-Validate all OpenAPI specifications:
-
-```bash
-# Validate specs
-npm run validate:openapi
-```
-
-All specifications are validated and ready for:
-
-- Documentation generation
-- SDK generation (TypeScript, Python, Go, etc.)
-- API gateway configuration
-- Testing and mocking
-
-### SDK Generation
-
-Generate client SDKs from OpenAPI specifications:
-
-```bash
-# Generate TypeScript SDK
-npm run generate:sdk:typescript
-
-# Generate Python SDK
-npm run generate:sdk:python
-
-# Generate all SDKs
-npm run generate:sdk
-```
-
-Generated SDKs will be in the `sdks/` directory. See [SDK.md](SDK.md) for detailed documentation and usage examples.
-
-## 📚 Middleware Examples
-
-### DeafAUTH Middleware (Node.js/Express)
-
-```javascript
-const deafAuthMiddleware = async (req, res, next) => {
- const token = req.headers.authorization?.split(' ')[1];
-
- if (!token) {
- return res.status(401).json({ error: 'No token provided' });
- }
-
- try {
- const decoded = await verifyDeafAuthToken(token);
- req.user = decoded;
- next();
- } catch (error) {
- return res.status(403).json({ error: 'Invalid token' });
- }
-};
-
-module.exports = deafAuthMiddleware;
-```
-
-### PinkSync Middleware (Node.js/Express)
-
-```javascript
-const pinkSyncMiddleware = async (req, res, next) => {
- const userId = req.user?.id;
-
- if (userId) {
- const preferences = await getPinkSyncPreferences(userId);
- req.accessibilityPrefs = preferences;
- }
-
- next();
-};
-
-module.exports = pinkSyncMiddleware;
-```
-
-## 🎯 Quick Start for Developers
-
-### 1. Clone and Install
-
-```bash
-# Clone the repository
-git clone https://github.com/pinkycollie/DEAF-FIRST-PLATFORM.git
-cd DEAF-FIRST-PLATFORM
-
-# Install dependencies
-npm install
-```
-
-### 2. Validate OpenAPI Specifications
-
-```bash
-npm run validate:openapi
-```
-
-### 3. Run Tests
-
-```bash
-# Run all tests
-npm test
-
-# Run with coverage
-npm run test:coverage
-```
-
-### 4. Generate SDKs
-
-```bash
-# Generate TypeScript SDK
-npm run generate:sdk:typescript
-
-# Generate Python SDK
-npm run generate:sdk:python
-```
-
-### 5. Use Generated SDKs
-
-See [SDK.md](SDK.md) for usage examples with TypeScript and Python.
-
-## 🎯 Next Steps
-
-### Generate Documentation
-
-Generate interactive API documentation:
-
-```bash
-# TypeScript SDK
-openapi-generator-cli generate \
- -i services/deafauth/openapi/openapi.yaml \
- -g typescript-axios \
- -o sdks/typescript/deafauth
-
-# Python SDK
-openapi-generator-cli generate \
- -i services/deafauth/openapi/openapi.yaml \
- -g python \
- -o sdks/python/deafauth
-```
-
-### Option 2: Deploy with Cloudflare Workers
-
-Each service can be deployed as a Cloudflare Worker for edge computing benefits.
-
-### Option 3: Generate API Documentation
-
-Use Redoc, Swagger UI, or other documentation tools to generate interactive API documentation.
-
-### Option 4: Set Up CI/CD
-
-Implement automated testing, validation, and deployment for all services.
-
-## 📖 Additional Documentation
-
-- [Complete Infrastructure Overview](infrastructure.md)
-- Individual service README files in each service directory
-- OpenAPI specifications in `services/*/openapi/openapi.yaml`
-
-## 🤝 Contributing
-
-Contributions are welcome! Please ensure all changes maintain accessibility standards and deaf-first principles.
-
-## 📄 License
-
-See LICENSE file for details.
-
-## 🌟 Acknowledgments
-
-Built with deaf-first principles and a commitment to accessibility for all.
->>>>>>> e961430
+=======
+# MBTQ Deaf-First Platform
+
+A comprehensive platform built with deaf-first principles, providing accessible financial services, AI-powered assistance, and decentralized governance.
+
+## 📚 MBTQ Universe Components
+
+This repository contains OpenAPI specifications for all five core services of the MBTQ Universe:
+
+### 1. **DeafAUTH - Identity Cortex**
+Secure authentication system designed with deaf-first principles.
+
+- **Location**: `services/deafauth/`
+- **Base URL**: `https://api.mbtquniverse.com/auth`
+- **Documentation**: [DeafAUTH README](services/deafauth/README.md)
+- **OpenAPI Spec**: [openapi.yaml](services/deafauth/openapi/openapi.yaml)
+
+### 2. **PinkSync - Accessibility Engine**
+Real-time accessibility features and synchronization.
+
+- **Location**: `services/pinksync/`
+- **Base URL**: `https://api.mbtquniverse.com/sync`
+- **Documentation**: [PinkSync README](services/pinksync/README.md)
+- **OpenAPI Spec**: [openapi.yaml](services/pinksync/openapi/openapi.yaml)
+
+### 3. **Fibonrose - Trust & Blockchain**
+Decentralized trust and verification layer.
+
+- **Location**: `services/fibonrose/`
+- **Base URL**: `https://api.mbtquniverse.com/blockchain`
+- **Documentation**: [Fibonrose README](services/fibonrose/README.md)
+- **OpenAPI Spec**: [openapi.yaml](services/fibonrose/openapi/openapi.yaml)
+
+### 4. **360Magicians - AI Agents**
+Intelligent automation and assistance agents.
+
+- **Location**: `services/magicians/`
+- **Base URL**: `https://api.mbtquniverse.com/ai`
+- **Documentation**: [360Magicians README](services/magicians/README.md)
+- **OpenAPI Spec**: [openapi.yaml](services/magicians/openapi/openapi.yaml)
+
+### 5. **MBTQ DAO - Governance**
+Decentralized governance and community management.
+
+- **Location**: `services/dao/`
+- **Base URL**: `https://api.mbtquniverse.com/dao`
+- **Documentation**: [DAO README](services/dao/README.md)
+- **OpenAPI Spec**: [openapi.yaml](services/dao/openapi/openapi.yaml)
+
+## 🚀 Features
+
+✔ All endpoints documented with OpenAPI 3.1
+✔ Standardized responses across all services
+✔ Shared DeafAUTH security scheme
+✔ Tags, components, pagination, error schemas
+✔ Cloudflare-friendly JSON-only style
+✔ **Automated API testing with Jest**
+✔ **SDK generation (TypeScript + Python)**
+✔ Production-ready specifications
+
+## 🔐 Authentication
+
+All MBTQ Universe services use DeafAUTH for authentication. Include the Bearer token in the Authorization header:
+
+```bash
+Authorization: Bearer
+```
+
+### Getting Started with Authentication
+
+1. Register a new user:
+```bash
+curl -X POST https://api.mbtquniverse.com/auth/register \
+ -H "Content-Type: application/json" \
+ -d '{"email": "user@example.com", "password": "secure_password"}'
+```
+
+2. Login to get tokens:
+```bash
+curl -X POST https://api.mbtquniverse.com/auth/login \
+ -H "Content-Type: application/json" \
+ -d '{"email": "user@example.com", "password": "secure_password"}'
+```
+
+3. Use the access token for API calls:
+```bash
+curl -X GET https://api.mbtquniverse.com/sync/status \
+ -H "Authorization: Bearer "
+```
+
+## 📦 API Endpoints Overview
+
+**Note:** The endpoints below show full paths including the service prefix (e.g., `/auth/`, `/sync/`). In the OpenAPI specifications, these are defined as relative paths (e.g., `/register`, `/status`) with the base URL specified in the `servers` section.
+
+### DeafAUTH Endpoints
+
+- `POST /auth/register` - User registration
+- `POST /auth/login` - User authentication
+- `GET /auth/verify` - Token verification
+- `POST /auth/refresh` - Token refresh
+
+### PinkSync Endpoints
+
+- `GET /sync/status` - Check synchronization status
+- `POST /sync/preferences` - Update accessibility preferences
+- `GET /sync/features` - List available accessibility features
+
+### Fibonrose Endpoints
+
+- `POST /blockchain/verify` - Verify blockchain transaction
+- `GET /blockchain/trust-score` - Get trust score
+- `POST /blockchain/record` - Record new transaction
+
+### 360Magicians Endpoints
+
+Comprehensive AI agent platform with 60+ endpoints including:
+
+- Agent management (CRUD operations)
+- Task execution and workflow orchestration
+- Memory and context management
+- File ingestion and RAG search
+- Tool registration and management
+- Scheduling and webhooks
+- Analytics and cost tracking
+
+See [360Magicians README](services/magicians/README.md) for complete endpoint list.
+
+### DAO Endpoints
+
+- `GET /dao/proposals` - List governance proposals
+- `POST /dao/vote` - Submit vote
+- `GET /dao/members` - List DAO members
+
+## 🔧 Environment Configuration
+
+Copy `.env.example` to `.env` and configure your environment variables:
+
+```bash
+cp .env.example .env
+```
+
+See [.env.example](.env.example) for all required configuration options.
+
+## 🌐 Integration Notes
+
+### Google API & AI SDKs
+
+**Google Cloud Integration:**
+
+- Google Cloud Vision API for visual accessibility features
+- Google Speech-to-Text for real-time captioning
+- Google Translate API for multi-language support
+- PinkSync API acts as an API broker network for partners' APIs that enhance deaf accessibility
+
+**AI SDK Integration:**
+
+The platform uses multiple AI models for comprehensive coverage:
+
+- **OpenAI**: GPT-4, GPT-4 Turbo for natural language processing
+- **Anthropic**: Claude 3 for advanced reasoning
+- **Google**: Gemini Pro for multimodal tasks
+- **TensorFlow.js**: Client-side AI processing
+- **Hugging Face Transformers**: Specialized accessibility models
+
+## 🔄 Integration with Other Repositories
+
+This platform integrates with several related repositories:
+
+- [pinkycollie/pinksync](https://github.com/pinkycollie/pinksync) - Fastify-based accessibility engine
+- [pinkycollie/deafauth-ecosystem](https://github.com/pinkycollie/deafauth-ecosystem) - Authentication ecosystem
+- [pinkycollie/fibonrose](https://github.com/pinkycollie/fibonrose) - Blockchain trust layer
+- [pinkycollie/pinkflow](https://github.com/pinkycollie/pinkflow) - Hub pipeline integrator
+
+## 🧪 Testing & Validation
+
+### Automated API Testing
+
+Run comprehensive API tests for all services:
+
+```bash
+# Install dependencies
+npm install
+
+# Run all tests
+npm test
+
+# Run tests with coverage
+npm run test:coverage
+
+# Run specific service tests
+npm test -- tests/deafauth
+npm test -- tests/pinksync
+npm test -- tests/magicians
+```
+
+See [tests/README.md](tests/README.md) for detailed testing documentation.
+
+### OpenAPI Validation
+
+Validate all OpenAPI specifications:
+
+```bash
+# Validate specs
+npm run validate:openapi
+```
+
+All specifications are validated and ready for:
+
+- Documentation generation
+- SDK generation (TypeScript, Python, Go, etc.)
+- API gateway configuration
+- Testing and mocking
+
+### SDK Generation
+
+Generate client SDKs from OpenAPI specifications:
+
+```bash
+# Generate TypeScript SDK
+npm run generate:sdk:typescript
+
+# Generate Python SDK
+npm run generate:sdk:python
+
+# Generate all SDKs
+npm run generate:sdk
+```
+
+Generated SDKs will be in the `sdks/` directory. See [SDK.md](SDK.md) for detailed documentation and usage examples.
+
+## 📚 Middleware Examples
+
+### DeafAUTH Middleware (Node.js/Express)
+
+```javascript
+const deafAuthMiddleware = async (req, res, next) => {
+ const token = req.headers.authorization?.split(' ')[1];
+
+ if (!token) {
+ return res.status(401).json({ error: 'No token provided' });
+ }
+
+ try {
+ const decoded = await verifyDeafAuthToken(token);
+ req.user = decoded;
+ next();
+ } catch (error) {
+ return res.status(403).json({ error: 'Invalid token' });
+ }
+};
+
+module.exports = deafAuthMiddleware;
+```
+
+### PinkSync Middleware (Node.js/Express)
+
+```javascript
+const pinkSyncMiddleware = async (req, res, next) => {
+ const userId = req.user?.id;
+
+ if (userId) {
+ const preferences = await getPinkSyncPreferences(userId);
+ req.accessibilityPrefs = preferences;
+ }
+
+ next();
+};
+
+module.exports = pinkSyncMiddleware;
+```
+
+## 🎯 Quick Start for Developers
+
+### 1. Clone and Install
+
+```bash
+# Clone the repository
+git clone https://github.com/pinkycollie/DEAF-FIRST-PLATFORM.git
+cd DEAF-FIRST-PLATFORM
+
+# Install dependencies
+npm install
+```
+
+### 2. Validate OpenAPI Specifications
+
+```bash
+npm run validate:openapi
+```
+
+### 3. Run Tests
+
+```bash
+# Run all tests
+npm test
+
+# Run with coverage
+npm run test:coverage
+```
+
+### 4. Generate SDKs
+
+```bash
+# Generate TypeScript SDK
+npm run generate:sdk:typescript
+
+# Generate Python SDK
+npm run generate:sdk:python
+```
+
+### 5. Use Generated SDKs
+
+See [SDK.md](SDK.md) for usage examples with TypeScript and Python.
+
+## 🎯 Next Steps
+
+### Generate Documentation
+
+Generate interactive API documentation:
+
+```bash
+# TypeScript SDK
+openapi-generator-cli generate \
+ -i services/deafauth/openapi/openapi.yaml \
+ -g typescript-axios \
+ -o sdks/typescript/deafauth
+
+# Python SDK
+openapi-generator-cli generate \
+ -i services/deafauth/openapi/openapi.yaml \
+ -g python \
+ -o sdks/python/deafauth
+```
+
+### Option 2: Deploy with Cloudflare Workers
+
+Each service can be deployed as a Cloudflare Worker for edge computing benefits.
+
+### Option 3: Generate API Documentation
+
+Use Redoc, Swagger UI, or other documentation tools to generate interactive API documentation.
+
+### Option 4: Set Up CI/CD
+
+Implement automated testing, validation, and deployment for all services.
+
+## 📖 Additional Documentation
+
+- [Complete Infrastructure Overview](infrastructure.md)
+- Individual service README files in each service directory
+- OpenAPI specifications in `services/*/openapi/openapi.yaml`
+
+## 🤝 Contributing
+
+Contributions are welcome! Please ensure all changes maintain accessibility standards and deaf-first principles.
+
+## 📄 License
+
+See LICENSE file for details.
+
+## 🌟 Acknowledgments
+
+Built with deaf-first principles and a commitment to accessibility for all.
+>>>>>>> e961430
From d2fed899082594008037f4f66081816b499679f9 Mon Sep 17 00:00:00 2001
From: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
Date: Thu, 21 May 2026 06:08:33 -0500
Subject: [PATCH 18/19] Update FETCH-API-EXAMPLES.md
Signed-off-by: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
---
docs/FETCH-API-EXAMPLES.md | 42 +++++++++++++++++++-------------------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/docs/FETCH-API-EXAMPLES.md b/docs/FETCH-API-EXAMPLES.md
index e1cf95d..85afe70 100644
--- a/docs/FETCH-API-EXAMPLES.md
+++ b/docs/FETCH-API-EXAMPLES.md
@@ -1,6 +1,6 @@
# Fetch API Examples
-This document provides browser-compatible Fetch API examples for all MBTQ Universe services. These examples work in modern browsers and can be used directly in web applications.
+This document provides browser-compatible Fetch API examples for all DEAF-FIRST services. These examples work in modern browsers and can be used directly in web applications.
## Table of Contents
@@ -19,7 +19,7 @@ This document provides browser-compatible Fetch API examples for all MBTQ Univer
```javascript
async function registerUser(email, password) {
- const response = await fetch('https://api.mbtquniverse.com/auth/register', {
+ const response = await fetch('https://api.mbtq.DEV/auth/register', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -51,7 +51,7 @@ try {
```javascript
async function loginUser(email, password) {
- const response = await fetch('https://api.mbtquniverse.com/auth/login', {
+ const response = await fetch('https://api.mbtq.dev/auth/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -91,7 +91,7 @@ try {
async function verifyToken() {
const accessToken = localStorage.getItem('accessToken');
- const response = await fetch('https://api.mbtquniverse.com/auth/verify', {
+ const response = await fetch('https://api.mbtq.dev/auth/verify', {
method: 'GET',
headers: {
'Authorization': `Bearer ${accessToken}`
@@ -120,7 +120,7 @@ if (verification.valid) {
async function refreshTokens() {
const refreshToken = localStorage.getItem('refreshToken');
- const response = await fetch('https://api.mbtquniverse.com/auth/refresh', {
+ const response = await fetch('https://api.mbtq.dev/auth/refresh', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -157,7 +157,7 @@ async function refreshTokens() {
async function getSyncStatus() {
const accessToken = localStorage.getItem('accessToken');
- const response = await fetch('https://api.mbtquniverse.com/sync/status', {
+ const response = await fetch('https://api.mbtq.dev/sync/status', {
method: 'GET',
headers: {
'Authorization': `Bearer ${accessToken}`
@@ -183,7 +183,7 @@ console.log('Latency:', status.latencyMs, 'ms');
async function updatePreferences(preferences) {
const accessToken = localStorage.getItem('accessToken');
- const response = await fetch('https://api.mbtquniverse.com/sync/preferences', {
+ const response = await fetch('https://api.mbtq.dev/sync/preferences', {
method: 'POST',
headers: {
'Authorization': `Bearer ${accessToken}`,
@@ -215,7 +215,7 @@ console.log('Preferences updated:', prefs);
async function getFeatures() {
const accessToken = localStorage.getItem('accessToken');
- const response = await fetch('https://api.mbtquniverse.com/sync/features', {
+ const response = await fetch('https://api.mbtq.dev/sync/features', {
method: 'GET',
headers: {
'Authorization': `Bearer ${accessToken}`
@@ -246,7 +246,7 @@ features.forEach(feature => {
async function verifyTransaction(txId) {
const accessToken = localStorage.getItem('accessToken');
- const response = await fetch('https://api.mbtquniverse.com/blockchain/verify', {
+ const response = await fetch('https://api.mbtq.dev/blockchain/verify', {
method: 'POST',
headers: {
'Authorization': `Bearer ${accessToken}`,
@@ -273,7 +273,7 @@ console.log('Transaction valid:', verification.valid);
async function getTrustScore() {
const accessToken = localStorage.getItem('accessToken');
- const response = await fetch('https://api.mbtquniverse.com/blockchain/trust-score', {
+ const response = await fetch('https://api.mbtq.dev/blockchain/trust-score', {
method: 'GET',
headers: {
'Authorization': `Bearer ${accessToken}`
@@ -298,8 +298,8 @@ console.log('Last Updated:', score.lastUpdated);
```javascript
async function recordTransaction(transaction) {
const accessToken = localStorage.getItem('accessToken');
-
- const response = await fetch('https://api.mbtquniverse.com/blockchain/record', {
+
+ const response = await fetch('https://api.mbtq.dev/blockchain/record', {
method: 'POST',
headers: {
'Authorization': `Bearer ${accessToken}`,
@@ -337,7 +337,7 @@ console.log('Transaction recorded:', tx);
async function createAgent(name, model) {
const accessToken = localStorage.getItem('accessToken');
- const response = await fetch('https://api.mbtquniverse.com/ai/agents', {
+ const response = await fetch('https://api.mbtq.dev/ai/agents', {
method: 'POST',
headers: {
'Authorization': `Bearer ${accessToken}`,
@@ -364,7 +364,7 @@ console.log('Agent created:', agent.id);
async function listAgents() {
const accessToken = localStorage.getItem('accessToken');
- const response = await fetch('https://api.mbtquniverse.com/ai/agents', {
+ const response = await fetch('https://api.mbtq.dev/ai/agents', {
method: 'GET',
headers: {
'Authorization': `Bearer ${accessToken}`
@@ -391,7 +391,7 @@ agents.forEach(agent => {
async function executeAgent(agentId, input) {
const accessToken = localStorage.getItem('accessToken');
- const response = await fetch(`https://api.mbtquniverse.com/ai/agents/${agentId}/execute`, {
+ const response = await fetch(`https://api.mbtq.dev/ai/agents/${agentId}/execute`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${accessToken}`,
@@ -420,7 +420,7 @@ console.log('Output:', run.output);
async function getRunStatus(runId) {
const accessToken = localStorage.getItem('accessToken');
- const response = await fetch(`https://api.mbtquniverse.com/ai/runs/${runId}`, {
+ const response = await fetch(`https://api.mbtq.dev/ai/runs/${runId}`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${accessToken}`
@@ -461,7 +461,7 @@ async function waitForCompletion(runId, maxAttempts = 30) {
async function listTools() {
const accessToken = localStorage.getItem('accessToken');
- const response = await fetch('https://api.mbtquniverse.com/ai/tools', {
+ const response = await fetch('https://api.mbtq.dev/ai/tools', {
method: 'GET',
headers: {
'Authorization': `Bearer ${accessToken}`
@@ -492,7 +492,7 @@ tools.forEach(tool => {
async function listProposals() {
const accessToken = localStorage.getItem('accessToken');
- const response = await fetch('https://api.mbtquniverse.com/dao/proposals', {
+ const response = await fetch('https://api.mbtq.dev/dao/proposals', {
method: 'GET',
headers: {
'Authorization': `Bearer ${accessToken}`
@@ -520,7 +520,7 @@ proposals.forEach(proposal => {
async function submitVote(proposalId, vote) {
const accessToken = localStorage.getItem('accessToken');
- const response = await fetch('https://api.mbtquniverse.com/dao/vote', {
+ const response = await fetch('https://api.mbtq.dev/dao/vote', {
method: 'POST',
headers: {
'Authorization': `Bearer ${accessToken}`,
@@ -548,7 +548,7 @@ console.log('Vote submitted successfully');
async function listMembers() {
const accessToken = localStorage.getItem('accessToken');
- const response = await fetch('https://api.mbtquniverse.com/dao/members', {
+ const response = await fetch('https://api.mbtq.dev/dao/members', {
method: 'GET',
headers: {
'Authorization': `Bearer ${accessToken}`
@@ -579,7 +579,7 @@ Here's a complete example of an MBTQ API client using the Fetch API:
* Complete browser-compatible client using Fetch API
*/
class MBTQClient {
- constructor(baseUrl = 'https://api.mbtquniverse.com') {
+ constructor(baseUrl = 'https://api.mbtq.dev') {
this.baseUrl = baseUrl;
this.accessToken = localStorage.getItem('accessToken');
this.refreshToken = localStorage.getItem('refreshToken');
From dc7c828e56e2f4ab0c75fc58ad0d3877ddea5390 Mon Sep 17 00:00:00 2001
From: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
Date: Thu, 21 May 2026 06:11:06 -0500
Subject: [PATCH 19/19] Update ARCHITECTURE.md
Signed-off-by: Pinky Collie <199848471+pinkycollie@users.noreply.github.com>
---
docs/ARCHITECTURE.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index a9564e1..0416bc2 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -8,7 +8,7 @@ The MBTQ Deaf-First Platform is a comprehensive microservices architecture desig
```
┌─────────────────────────────────────────────────────────────────────────────┐
-│ MBTQ Universe Platform │
+│ MBTQ.dev Platform │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
@@ -74,7 +74,7 @@ The MBTQ Deaf-First Platform is a comprehensive microservices architecture desig
## Service Components
### 1. DeafAUTH (Identity Cortex)
-**Base URL:** `https://api.mbtquniverse.com/auth`
+**Base URL:** `https://api.mbtq.DEV/auth`
DeafAUTH is the central authentication and identity management service designed with deaf-first principles.
@@ -141,7 +141,7 @@ Fibonrose provides blockchain-based trust verification and transaction recording
| POST | `/record` | Record new transaction |
### 4. 360Magicians (AI Agent Platform)
-**Base URL:** `https://api.mbtquniverse.com/ai`
+**Base URL:** `https://api.mbtq.dev/ai`
The comprehensive AI agent platform with 62 endpoints covering agent lifecycle, execution, tools, memory, and workflows.
@@ -153,7 +153,7 @@ The comprehensive AI agent platform with 62 endpoints covering agent lifecycle,
- **Workflows:** DAG-based workflow orchestration
### 5. DAO (Governance)
-**Base URL:** `https://api.mbtquniverse.com/dao`
+**Base URL:** `https://api.mbtq.dev/dao`
Decentralized governance for platform decisions.