twinmind-reference-architecture
Implement TwinMind reference architecture with best-practice project layout. Use when designing new TwinMind integrations, reviewing project structure, or establishing architecture standards for meeting AI applications. Trigger with phrases like "twinmind architecture", "twinmind best practices", "twinmind project structure", "how to organize twinmind", "twinmind layout".
- License 许可
- MIT
- 最近更新
- 2026-03-20
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- twinmind-reference-architecture
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- Implement TwinMind reference architecture with best-practice project layout. Use when designing new TwinMind integrations, reviewing project structure, or establishing architecture standards for meeting AI applications. Trigger with phrases like "twinmind architecture", "twinmind best practices", "twinmind project structure", "how to organize twinmind", "twinmind layout".
- allowed-tools
- Read, Grep
- compatible-with
- claude-code, codex, openclaw
02 资源文件 1
- 参考文档references/implementation.md5.9 KB
03 SKILL.md 正文
TwinMind Reference Architecture
Contents
Overview
Production-ready architecture patterns for TwinMind meeting AI integrations with layered architecture (API -> Service -> TwinMind -> Integration -> Infrastructure), singleton client wrapper, service orchestration, error boundaries, and health checks.
Prerequisites
- Understanding of layered architecture
- TwinMind API knowledge
- TypeScript project setup
- Testing framework configured
Instructions
Step 1: Project Structure
Organize into layers: src/twinmind/ (client, config, types, errors, handlers), src/services/meeting/ (transcription, summary, actions, cache), src/integrations/ (calendar, slack, linear, email), src/api/ (routes, middleware), src/jobs/ (sync, cleanup, reports), src/utils/ (audio, logging, metrics), plus tests/, config/, and docs/.
Step 2: Client Wrapper
Build a singleton TwinMindService with Axios, caching via TranscriptCache, metrics via MetricsCollector, and request/response interceptors for logging and error tracking.
Step 3: Service Layer
Create MeetingService that orchestrates transcription, summary generation, action item extraction, speaker identification, and Slack notification. Run summary + action items in parallel for performance.
Step 4: Error Boundary
Implement TwinMindError with error codes (AUTH_FAILED, RATE_LIMITED, SERVER_ERROR), retryable flag, and factory method fromApiError() for consistent error handling.
Step 5: Health Checks
Build checkHealth() that validates TwinMind API connectivity, cache availability, and database status. Return overall status (healthy/degraded/unhealthy) with per-check latency.
Step 6: Configuration Management
Create environment-specific JSON config files with loadConfig() that merges environment variables with file-based defaults for API URL, timeout, retries, cache TTL, and feature flags.
See detailed implementation for complete client wrapper, service layer, error boundary, health check, and config management code.
Output
- Structured project layout
- Client wrapper with caching and metrics
- Service layer with business logic
- Error boundary implemented
- Health checks configured
- Configuration management
Error Handling
| Issue | Cause | Solution |
|---|---|---|
| Circular dependencies | Wrong layering | Separate concerns by layer |
| Config not loading | Wrong paths | Verify config file locations |
| Type errors | Missing types | Add TwinMind type definitions |
| Test isolation | Shared state | Use dependency injection |
Examples
Basic usage: Apply twinmind reference architecture to a standard project setup with default configuration options.
Advanced scenario: Customize twinmind reference architecture for production environments with multiple constraints and team-specific requirements.
Resources
Next Steps
For multi-environment setup, see twinmind-multi-env-setup.
04 同仓库更多 Skills
azure-apim-architecture
Analyzes and explains Azure API Management architecture decisions for enterprise API marketplace implementations using VNet Internal mode, Front Door, hybrid authentication, and multi-environment strategies. Use when discussing APIM component selection, network topology, cost optimization, or comparing alternatives like workspaces vs instances, VNet Internal vs External mode, or Front Door vs Application Gateway.
apiops-deployment
Guides deployment of Azure API Management infrastructure using Infrastructure as Code (Bicep/Terraform), CI/CD pipelines (GitHub Actions/Azure DevOps), and APIOps workflows. Use when deploying APIM, creating pipelines, or implementing dev→test→prod promotion strategies.
apim-policy-authoring
Creates production-ready Azure API Management policy XML for authentication (OAuth 2.0, JWT validation, subscription keys), rate limiting, CORS configuration, error handling, and API transformations. Use when implementing API security, access control, or request/response processing logic.
api-security-review
Reviews Azure API Management configurations for security vulnerabilities, OWASP API Security Top 10 compliance, VNet Internal mode validation, Private Link verification, and Azure Security Benchmark alignment. Use when performing security audits, pre-deployment validation, or compliance reviews.
jira-cli
Interact with Jira from the command line to create, list, view, edit, and transition issues, manage sprints and epics, and perform common Jira workflows. Use when the user asks about Jira tasks, tickets, issues, sprints, or needs to manage project work items.
calculator
Performs arbitrary-precision arithmetic calculations including addition, subtraction, multiplication, division, and exponents. Use when the user asks to calculate, compute, or evaluate math expressions, or when precise decimal arithmetic is needed to avoid floating-point errors.