# Munder Difflin Hive Directory Structure: Key Files and Integration Templates

> Explore the Munder Difflin hive directory structure and discover key files like HIVE.md and integration-templates.md. Understand its role in the broker's build process.

- Repository: [Chaitanya Giri/munder-difflin](https://github.com/chaitanyagiri/munder-difflin)
- Tags: architecture
- Published: 2026-08-22

---

**The Munder Difflin hive directory structure consists of two Markdown documentation files—[`HIVE.md`](https://github.com/chaitanyagiri/munder-difflin/blob/main/HIVE.md) and [`hive/docs/integration-templates.md`](https://github.com/chaitanyagiri/munder-difflin/blob/main/hive/docs/integration-templates.md)—that define the platform’s integration-template catalog consumed by the broker at build-time.**

The *Munder Difflin* repository organizes its integration metadata within a dedicated **Hive** directory according to the chaitanyagiri/munder-difflin source code. This intentionally minimal structure serves as the single source of truth for the platform’s broker, enabling dynamic third-party API routing without requiring per-service client implementations.

## Core Files in the Hive Directory

The `hive/` folder contains no executable source code. Instead, it houses two Markdown files that together form the complete Hive payload, separating human-readable documentation from the data schemas that drive the system.

### [`HIVE.md`](https://github.com/chaitanyagiri/munder-difflin/blob/main/HIVE.md): Conceptual Overview

Located at the repository root, **[`HIVE.md`](https://github.com/chaitanyagiri/munder-difflin/blob/main/HIVE.md)** provides the high-level architecture documentation for the Hive concept. This file explains the purpose of the integration-template catalog and documents how developers should interact with the system. It serves as the primary entry point for understanding why the **Munder Difflin hive directory structure** exists and how the broker consumes these definitions at runtime.

### [`hive/docs/integration-templates.md`](https://github.com/chaitanyagiri/munder-difflin/blob/main/hive/docs/integration-templates.md): Template Specification

The file **[`hive/docs/integration-templates.md`](https://github.com/chaitanyagiri/munder-difflin/blob/main/hive/docs/integration-templates.md)** contains the concrete specification for all supported third-party services. This document enumerates first-wave YC integration templates including **Linear**, **Jira**, **Notion**, **Stripe**, **Confluence**, **Sentry**, and **HubSpot**.

Each template defines a canonical JSON-compatible shape with specific fields:

- **`kind`** – The service identifier used for routing
- **`baseUrl`** – The API endpoint root for the service
- **`authType`** – Classification of the authentication mechanism
- **`authHeader`** – The header key used for credential transmission
- **`secretLabel`** – The environment variable or secret manager key reference
- **Supporting documentation URLs** – Links to official API documentation

## Consuming Hive Data at Runtime

While the Hive files are static Markdown, the platform parses them as data assets during the build process. The following examples demonstrate how a worker or UI component might load and utilize the integration templates without hard-coded plumbing for each third-party service.

```javascript
// Load the integration-template catalog (Node.js)
import path from 'node:path';
import { readFileSync } from 'node:fs';

// Resolve the path to the Hive docs file
const catalogPath = path.resolve(
  __dirname,
  '..',
  'hive',
  'docs',
  'integration-templates.md'
);

// Parse the markdown file and extract the JSON block (simplified)
const raw = readFileSync(catalogPath, 'utf-8');
const jsonStart = raw.indexOf('```json');
const jsonEnd   = raw.indexOf('```', jsonStart + 7);
const jsonText  = raw.slice(jsonStart + 7, jsonEnd).trim();

const integrationTemplates = JSON.parse(jsonText);
console.log(integrationTemplates[0]); // First template (Linear)

```

```typescript
// Type-safe access in TypeScript using shared type definitions
import type { IntegrationTemplate } from '../src/shared/integrations';

// Assuming the Markdown file has been transformed into a plain JSON file
import templates from '../hive/docs/integration-templates.json' as IntegrationTemplate[];

templates.forEach(t => {
  console.log(`${t.kind} – ${t.baseUrl} (${t.authType})`);
});

```

## Summary

- The **Munder Difflin hive directory structure** comprises exactly two files: [`HIVE.md`](https://github.com/chaitanyagiri/munder-difflin/blob/main/HIVE.md) and [`hive/docs/integration-templates.md`](https://github.com/chaitanyagiri/munder-difflin/blob/main/hive/docs/integration-templates.md).
- [`HIVE.md`](https://github.com/chaitanyagiri/munder-difflin/blob/main/HIVE.md) provides architectural context and usage guidelines for the Hive concept.
- [`hive/docs/integration-templates.md`](https://github.com/chaitanyagiri/munder-difflin/blob/main/hive/docs/integration-templates.md) specifies the JSON-compatible schema for third-party integrations including Linear, Jira, and Stripe.
- All runnable code resides outside the `hive/` directory; these files are consumed as data assets at build-time.
- The broker uses these definitions to forward API calls without maintaining per-tool client implementations.

## Frequently Asked Questions

### What is the purpose of the Hive in Munder Difflin?

The Hive acts as a documentation-as-data catalog that defines how the platform’s broker (Jim) interacts with third-party services. It eliminates the need for hard-coded integration logic by providing a standardized schema for API endpoints, authentication methods, and metadata, allowing the system to remain agnostic to specific service implementations.

### How does the broker use the integration templates?

The broker consumes the templates defined in [`hive/docs/integration-templates.md`](https://github.com/chaitanyagiri/munder-difflin/blob/main/hive/docs/integration-templates.md) to route API calls dynamically. Each template specifies the `baseUrl`, `authType`, and required headers, allowing the broker to forward requests to services like Linear or Jira without maintaining service-specific client code in the runtime.

### Why are there no source code files in the hive directory?

The `hive/` directory intentionally contains only Markdown documentation to ensure that integration definitions remain language-agnostic and human-readable. All executable logic lives in other parts of the repository, while the build system transforms these Markdown files into consumable data assets that the broker loads at initialization.

### What fields are defined in each integration template?

Every template in [`hive/docs/integration-templates.md`](https://github.com/chaitanyagiri/munder-difflin/blob/main/hive/docs/integration-templates.md) includes **`kind`**, **`baseUrl`**, **`authType`**, **`authHeader`**, **`secretLabel`**, and supporting documentation URLs. These fields provide the broker with complete routing and authentication information required to communicate with each supported service.