The MoCKA-KNOWLEDGE-GATE system provides a unified integration platform for managing AI simulations, metadata logging, and multi-platform synchronization. This guide documents the complete integration architecture.
-
React Demo UI Component (
pages/components/mocka-integration-demo.jsx)- 3-tab interface: Overview, API Integration, Sync Status
- Real-time platform status display
- API testing interface with metadata capture
-
API Endpoint (
pages/api/mocka-endpoint.js)- Handles requests from demo UI
- Supports 5 integration platforms
- Metadata enrichment and logging
- GitHub Actions webhook integration
-
GitHub Actions Workflow (
.github/workflows/ai-simulation.yml)- Automated AI simulation execution
- ISSUE-ID and ROD-NUMBER generation
- Metadata recording to Firestore
- Webhook notifications
- Auto-commit of deliverables
- NotebookLM: Google's AI notebook platform
- Mem.ai: Memory management system
- Notion: Collaborative workspace
- GitHub: Version control and delivery tracking
- Google Colab: Jupyter notebook environment
1. GitHub Actions Trigger (scheduled or manual)
↓
2. Generate ISSUE-ID and ROD-NUMBER metadata
↓
3. Run AI simulation in specified mode
↓
4. Log output to MoCKA API endpoint
↓
5. Record metadata to Firestore
↓
6. Sync results across platforms
↓
7. Auto-commit results to main branch
↓
8. Trigger webhook notifications
- Pattern:
ISSUE-{timestamp} - Example:
ISSUE-1734103400000 - Purpose: Unique identifier for AI simulation results
- Pattern:
ROD-{random 0-9999} - Example:
ROD-7138 - Purpose: Secondary tracking identifier
All API requests include:
timestamp: Request timestampapiVersion: API version (v1)processed: Processing timestampintegration: System identifierissueId: Associated ISSUE-IDrodNumber: Associated ROD-NUMBER
Request Body:
{
"endpoint": "NotebookLM",
"data": "Input data for processing",
"timestamp": "2024-11-19T08:00:00.000Z",
"metadata": {
"issueId": "ISSUE-1734103400000",
"rodNumber": "ROD-7138"
}
}Response:
{
"status": "success",
"endpoint": "NotebookLM",
"data": "Processing result",
"notebookUrl": "https://...",
"requestId": "uuid",
"duration": "45ms",
"metadata": {...}
}- Scheduled: Daily at UTC 0:00 (JST 09:00)
- Manual:
workflow_dispatchwith mode selection - Push: On changes to trigger files
fast: Quick validationstandard: Normal execution (default)comprehensive: Full analysis
ai_simulation_completed: Simulation finishedintegration_completed: Platform integration donemetadata_recorded: Metadata stored
/api/webhook-handler
- Node.js 18+
- React/Next.js environment
- GitHub repository with Actions enabled
- Firestore credentials (optional)
- Clone repository
- Install dependencies:
npm install lucide-react uuid - Deploy to Vercel or Next.js environment
- Configure environment variables
- Validate all incoming requests
- Verify webhook signatures
- Use HTTPS for all communications
- Protect API keys in environment variables
- Log all integration activities
- Navigate to
/pages/components/mocka-integration-demo(when deployed) - Use API Integration tab
- Select endpoint and submit test data
- Verify response in results panel
- Navigate to Actions tab
- Select "AI Simulation Auto Execution"
- Click "Run workflow"
- Monitor execution logs
- Invalid endpoint: Verify endpoint name matches supported list
- Metadata missing: Ensure ISSUE-ID and ROD-NUMBER are provided
- Webhook failures: Check webhook endpoint availability
- Firestore errors: Verify authentication credentials
- Real-time sync dashboard
- Advanced error recovery
- Rate limiting
- Webhook retry logic
- Enhanced monitoring
For issues or questions, please open an issue on the GitHub repository.