Skip to main content

Specialized Domain Archetypes

Specialized archetypes designed for specific business domains, organizational patterns, and technical use cases that require domain-specific expertise and configurations.

Overview

Our specialized domain collection provides targeted templates for specific business contexts and technical scenarios. These archetypes encapsulate domain expertise and best practices for particular industries, organizational structures, and specialized technical requirements.

Available Specialized Archetypes

Organizational Setup

Organization Prompts

Enterprise Setup

Standardized organizational configuration prompts for setting up enterprise naming conventions, structure, and governance.

Naming ConventionsGovernanceStandards

Consistent organizational setup across projects

Project Configuration

Project Prompts

Project Setup

Comprehensive project configuration prompts for consistent project structure, naming, and configuration across teams.

Project StructureConfigurationConsistency

Standardized project initialization

Data Processing Prompts

Data Prompts

Data Configuration

Specialized prompts for data processing configuration, including data sources, formats, and processing requirements.

Data SourcesProcessingFormats

Streamlined data project configuration

Driver Libraries

Driver Library Templates

Connectivity

Template library for creating standardized drivers for various external systems, APIs, and data sources.

API ClientsData DriversStandards

Consistent external system connectivity

Domain-Specific Features

Enterprise Standards

  • Naming Conventions: Standardized naming across all artifacts
  • Governance Compliance: Built-in compliance with enterprise governance
  • Security Standards: Enterprise security requirements integration
  • Audit Trails: Comprehensive audit and tracking capabilities

Configuration Management

  • Environment-Specific: Different configurations for different environments
  • Template-Based: Reusable configuration templates
  • Validation: Configuration validation and verification
  • Documentation: Auto-generated configuration documentation

Integration Patterns

  • Standard Interfaces: Consistent interface patterns
  • Error Handling: Standardized error handling approaches
  • Logging: Uniform logging and monitoring patterns
  • Testing: Consistent testing strategies and patterns

Organizational Setup Patterns

Enterprise Naming Conventions

# Organization configuration template
organization:
name: "{{ org_name }}"
prefix: "{{ org_prefix }}"
domain: "{{ org_domain }}"

naming_conventions:
projects: "{{ prefix }}-{{ domain }}-{{ project_name }}"
repositories: "{{ prefix }}-{{ project_type }}-{{ project_name }}"
artifacts: "{{ org_prefix }}.{{ domain }}.{{ artifact_name }}"

standards:
version_format: "semantic" # semantic, date-based, custom
branch_strategy: "git-flow" # git-flow, github-flow, custom
commit_format: "conventional" # conventional, custom

Project Structure Templates

# Project configuration template
project:
name: "{{ project_name }}"
type: "{{ project_type }}" # service, library, application
language: "{{ primary_language }}"
framework: "{{ framework_choice }}"

structure:
source_dir: "src"
test_dir: "tests"
docs_dir: "docs"
config_dir: "config"

dependencies:
package_manager: "{{ package_manager }}"
dependency_file: "{{ dependency_file_name }}"
lock_file: "{{ lock_file_name }}"

Data Processing Configuration

Data Source Configuration

# Data source configuration template
data_sources:
- name: "{{ source_name }}"
type: "{{ source_type }}" # database, api, file, stream
connection:
host: "{{ source_host }}"
port: "{{ source_port }}"
credentials: "{{ credentials_reference }}"

schema:
format: "{{ data_format }}" # json, csv, parquet, avro
validation: "{{ validation_schema }}"

processing:
batch_size: "{{ batch_size }}"
parallel_workers: "{{ worker_count }}"
error_handling: "{{ error_strategy }}" # retry, skip, fail

output:
destination: "{{ output_destination }}"
format: "{{ output_format }}"
partitioning: "{{ partition_strategy }}"

Processing Pipeline Templates

# Processing pipeline configuration
pipeline:
name: "{{ pipeline_name }}"
schedule: "{{ schedule_expression }}"

stages:
- name: "ingestion"
type: "data_ingestion"
config:
sources: "{{ configured_sources }}"
validation: true

- name: "transformation"
type: "data_transformation"
config:
transformations: "{{ transformation_list }}"
quality_checks: true

- name: "output"
type: "data_output"
config:
destinations: "{{ output_destinations }}"
format_validation: true

Driver Library Patterns

Standard Driver Interface

# Standard driver interface template
from abc import ABC, abstractmethod
from typing import Any, Dict, List, Optional
from dataclasses import dataclass

@dataclass
class ConnectionConfig:
"""Standard connection configuration."""
host: str
port: int
username: Optional[str] = None
password: Optional[str] = None
ssl: bool = True
timeout: int = 30

class BaseDriver(ABC):
"""Base driver interface for all external systems."""

def __init__(self, config: ConnectionConfig):
self.config = config
self._connection = None

@abstractmethod
async def connect(self) -> bool:
"""Establish connection to external system."""
pass

@abstractmethod
async def disconnect(self) -> bool:
"""Close connection to external system."""
pass

@abstractmethod
async def execute(self, operation: str, params: Dict[str, Any]) -> Any:
"""Execute operation on external system."""
pass

@abstractmethod
async def health_check(self) -> bool:
"""Check if connection is healthy."""
pass

Error Handling Patterns

# Standard error handling for drivers
from enum import Enum
from typing import Optional
import logging

class ErrorSeverity(Enum):
LOW = "low"
MEDIUM = "medium"
HIGH = "high"
CRITICAL = "critical"

class DriverError(Exception):
"""Base exception for all driver errors."""

def __init__(
self,
message: str,
severity: ErrorSeverity = ErrorSeverity.MEDIUM,
retry_able: bool = True,
original_error: Optional[Exception] = None
):
super().__init__(message)
self.severity = severity
self.retry_able = retry_able
self.original_error = original_error

# Log the error
logger = logging.getLogger(self.__class__.__module__)
logger.error(f"Driver error: {message}", extra={
"severity": severity.value,
"retry_able": retry_able,
"original_error": str(original_error) if original_error else None
})

Configuration Management

Environment-Specific Configuration

# Environment configuration template
environments:
development:
database:
host: "dev-db.internal"
pool_size: 5
logging:
level: "DEBUG"
features:
debug_mode: true

staging:
database:
host: "staging-db.internal"
pool_size: 10
logging:
level: "INFO"
features:
debug_mode: false

production:
database:
host: "prod-db.internal"
pool_size: 20
logging:
level: "WARN"
features:
debug_mode: false

# Feature flags configuration
feature_flags:
new_api_version: "{{ feature_new_api }}"
enhanced_logging: "{{ feature_enhanced_logging }}"
experimental_features: "{{ feature_experimental }}"

Configuration Validation

# Configuration validation template
from pydantic import BaseModel, validator
from typing import Dict, Any, Optional
import os

class DatabaseConfig(BaseModel):
host: str
port: int = 5432
username: str
password: str
pool_size: int = 10

@validator('port')
def port_must_be_valid(cls, v):
if not 1 <= v <= 65535:
raise ValueError('Port must be between 1 and 65535')
return v

class AppConfig(BaseModel):
app_name: str
environment: str
database: DatabaseConfig
debug_mode: bool = False

@validator('environment')
def environment_must_be_valid(cls, v):
valid_envs = ['development', 'staging', 'production']
if v not in valid_envs:
raise ValueError(f'Environment must be one of {valid_envs}')
return v

@classmethod
def from_env(cls) -> 'AppConfig':
"""Load configuration from environment variables."""
return cls(
app_name=os.getenv('APP_NAME', 'default-app'),
environment=os.getenv('ENVIRONMENT', 'development'),
database=DatabaseConfig(
host=os.getenv('DB_HOST', 'localhost'),
port=int(os.getenv('DB_PORT', '5432')),
username=os.getenv('DB_USERNAME'),
password=os.getenv('DB_PASSWORD'),
pool_size=int(os.getenv('DB_POOL_SIZE', '10'))
),
debug_mode=os.getenv('DEBUG_MODE', 'false').lower() == 'true'
)

Getting Started

Prerequisites

  • Understanding of organizational requirements
  • Knowledge of target domains and use cases
  • Access to enterprise configuration standards
  • Team alignment on naming conventions

Quick Start - Organization Setup

# Install Archetect CLI
npm install -g @archetect/archetect

# Generate organization prompts
archetect render git@github.com:p6m-archetypes/org-prompts.archetype.git org-config
cd org-config

# Review generated configuration
cat organization-config.yaml

Quick Start - Project Setup

# Generate project configuration
archetect render git@github.com:p6m-archetypes/project-prompts.archetype.git my-project
cd my-project

# Apply project standards
./apply-standards.sh

Quick Start - Driver Library

# Generate driver library
archetect render git@github.com:p6m-archetypes/driver-library.archetype.git my-driver
cd my-driver

# Implement specific driver
python generate_driver.py --type=database --target=postgresql

Best Practices

Organizational Standards

  • Establish clear naming conventions early
  • Document all organizational decisions
  • Ensure consistency across all projects
  • Regular review and updates of standards

Configuration Management

  • Use environment-specific configurations
  • Implement configuration validation
  • Maintain configuration documentation
  • Version control all configuration templates

Driver Development

  • Follow standard interface patterns
  • Implement comprehensive error handling
  • Include proper logging and monitoring
  • Write thorough tests for all drivers

Documentation

  • Keep documentation current with changes
  • Include examples for all configurations
  • Provide troubleshooting guides
  • Maintain decision records

Integration Strategies

Enterprise Integration

  • Align with enterprise architecture standards
  • Integrate with existing governance processes
  • Use established security and compliance frameworks
  • Follow change management procedures

Tool Integration

  • Integrate with existing development tools
  • Support multiple IDE environments
  • Provide CLI and GUI options
  • Enable automation and scripting

Team Integration

  • Provide training on specialized archetypes
  • Establish clear usage guidelines
  • Create feedback and improvement processes
  • Support cross-team collaboration

Support and Resources

  • Domain Expertise: Access to domain-specific expertise
  • Best Practices: Industry-proven practices and patterns
  • Training: Specialized training for domain-specific requirements
  • Community: Domain-specific communities and support groups

Leverage specialized domain expertise with purpose-built archetypes. Accelerate development in specific domains with proven patterns and configurations.