# Diagram Templates

This directory contains diagram templates for the DeFi Oracle Meta Mainnet project.

## Available Templates

### Architecture Diagrams

1. **High-Level Architecture** (`high-level-architecture.drawio`)
   - Overview of the entire system
   - Components and their relationships
   - Data flow

2. **Network Architecture** (`network-architecture.drawio`)
   - Network topology
   - Subnets and security groups
   - Network connectivity

3. **Deployment Architecture** (`deployment-architecture.drawio`)
   - Deployment topology
   - Resource groups
   - Deployment regions

4. **Security Architecture** (`security-architecture.drawio`)
   - Security controls
   - Key Vault integration
   - Network security

5. **Data Flow Diagram** (`data-flow.drawio`)
   - Data flow through the system
   - Transaction flow
   - Oracle data flow

## Using Templates

### Draw.io / diagrams.net

1. Open [diagrams.net](https://app.diagrams.net/)
2. File → Open from → Device
3. Select the template file
4. Customize as needed
5. Export to SVG, PNG, or PDF

### Visio

1. Open Microsoft Visio
2. File → Open
3. Select the template file
4. Customize as needed
5. Export to desired format

## Customizing Templates

### Adding Azure Icons

1. Download Azure icons using `./scripts/assets/download-azure-icons.sh`
2. Import icons into your diagramming tool
3. Use icons from `assets/azure-icons/svg/` or `assets/azure-icons/png/`

### Icon Mapping

See `assets/azure-icons/metadata/icon-mapping.json` for icon names and mappings.

### Best Practices

1. **Use Consistent Icons**: Use the same icon set across all diagrams
2. **Label Components**: Label all components clearly
3. **Show Relationships**: Show connections and data flows
4. **Include Legends**: Add legends for complex diagrams
5. **Version Control**: Keep diagrams in version control
6. **Document Changes**: Document diagram changes in commits

## Creating New Templates

When creating new templates:

1. Use official Azure icons
2. Follow Azure Architecture Center guidelines
3. Maintain consistency with existing templates
4. Include legends and labels
5. Document the template purpose

## Diagram Tools

### Recommended Tools

1. **Draw.io / diagrams.net**: Free, web-based
2. **Lucidchart**: Professional diagramming
3. **Visio**: Microsoft's diagramming tool
4. **PlantUML**: Text-based diagramming

## References

- [Azure Architecture Center](https://docs.microsoft.com/azure/architecture/)
- [Azure Architecture Icons](https://docs.microsoft.com/azure/architecture/icons/)
- [Diagram Best Practices](https://docs.microsoft.com/azure/architecture/guide/)

