Implement Exa reference architecture with best-practice project layout. Use when designing new Exa integrations, reviewing project structure, or establishing architecture standards for Exa applications. Trigger with phrases like "exa architecture", "exa best practices", "exa project structure", "how to organize exa", "exa layout".
View on GitHubjeremylongshore/claude-code-plugins-plus-skills
exa-pack
plugins/saas-packs/exa-pack/skills/exa-reference-architecture/SKILL.md
February 1, 2026
Select agents to install to:
npx add-skill https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/main/plugins/saas-packs/exa-pack/skills/exa-reference-architecture/SKILL.md -a claude-code --skill exa-reference-architectureInstallation paths:
.claude/skills/exa-reference-architecture/# Exa Reference Architecture
## Overview
Production-ready architecture patterns for Exa integrations.
## Prerequisites
- Understanding of layered architecture
- Exa SDK knowledge
- TypeScript project setup
- Testing framework configured
## Project Structure
```
my-exa-project/
├── src/
│ ├── exa/
│ │ ├── client.ts # Singleton client wrapper
│ │ ├── config.ts # Environment configuration
│ │ ├── types.ts # TypeScript types
│ │ ├── errors.ts # Custom error classes
│ │ └── handlers/
│ │ ├── webhooks.ts # Webhook handlers
│ │ └── events.ts # Event processing
│ ├── services/
│ │ └── exa/
│ │ ├── index.ts # Service facade
│ │ ├── sync.ts # Data synchronization
│ │ └── cache.ts # Caching layer
│ ├── api/
│ │ └── exa/
│ │ └── webhook.ts # Webhook endpoint
│ └── jobs/
│ └── exa/
│ └── sync.ts # Background sync job
├── tests/
│ ├── unit/
│ │ └── exa/
│ └── integration/
│ └── exa/
├── config/
│ ├── exa.development.json
│ ├── exa.staging.json
│ └── exa.production.json
└── docs/
└── exa/
├── SETUP.md
└── RUNBOOK.md
```
## Layer Architecture
```
┌─────────────────────────────────────────┐
│ API Layer │
│ (Controllers, Routes, Webhooks) │
├─────────────────────────────────────────┤
│ Service Layer │
│ (Business Logic, Orchestration) │
├─────────────────────────────────────────┤
│ Exa Layer │
│ (Client, Types, Error Handling) │
├─────────────────────────────────────────┤
│ Infrastructure Layer │
│ (Cache, Queue, Monitoring) │
└─────────────────────────────────────────┘
```
## Key Components
### Step 1: Client Wrapper
```typescript
// src/exa/client.ts
export class ExaService {
private client: ExaClient;
private cache