Implement Perplexity reference architecture with best-practice project layout. Use when designing new Perplexity integrations, reviewing project structure, or establishing architecture standards for Perplexity applications. Trigger with phrases like "perplexity architecture", "perplexity best practices", "perplexity project structure", "how to organize perplexity", "perplexity layout".
View on GitHubjeremylongshore/claude-code-plugins-plus-skills
perplexity-pack
plugins/saas-packs/perplexity-pack/skills/perplexity-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/perplexity-pack/skills/perplexity-reference-architecture/SKILL.md -a claude-code --skill perplexity-reference-architectureInstallation paths:
.claude/skills/perplexity-reference-architecture/# Perplexity Reference Architecture
## Overview
Production-ready architecture patterns for Perplexity integrations.
## Prerequisites
- Understanding of layered architecture
- Perplexity SDK knowledge
- TypeScript project setup
- Testing framework configured
## Project Structure
```
my-perplexity-project/
├── src/
│ ├── perplexity/
│ │ ├── 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/
│ │ └── perplexity/
│ │ ├── index.ts # Service facade
│ │ ├── sync.ts # Data synchronization
│ │ └── cache.ts # Caching layer
│ ├── api/
│ │ └── perplexity/
│ │ └── webhook.ts # Webhook endpoint
│ └── jobs/
│ └── perplexity/
│ └── sync.ts # Background sync job
├── tests/
│ ├── unit/
│ │ └── perplexity/
│ └── integration/
│ └── perplexity/
├── config/
│ ├── perplexity.development.json
│ ├── perplexity.staging.json
│ └── perplexity.production.json
└── docs/
└── perplexity/
├── SETUP.md
└── RUNBOOK.md
```
## Layer Architecture
```
┌─────────────────────────────────────────┐
│ API Layer │
│ (Controllers, Routes, Webhooks) │
├─────────────────────────────────────────┤
│ Service Layer │
│ (Business Logic, Orchestration) │
├─────────────────────────────────────────┤
│ Perplexity Layer │
│ (Client, Types, Error Handling) │
├─────────────────────────────────────────┤
│ Infrastructure Layer │
│ (Cache, Queue, Monitoring) │
└─────────────────────────────────────────┘
```
## Key Components
### Step 1: Client Wrapper