Choose and implement Perplexity validated architecture blueprints for different scales. Use when designing new Perplexity integrations, choosing between monolith/service/microservice architectures, or planning migration paths for Perplexity applications. Trigger with phrases like "perplexity architecture", "perplexity blueprint", "how to structure perplexity", "perplexity project layout", "perplexity microservice".
View on GitHubjeremylongshore/claude-code-plugins-plus-skills
perplexity-pack
plugins/saas-packs/perplexity-pack/skills/perplexity-architecture-variants/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-architecture-variants/SKILL.md -a claude-code --skill perplexity-architecture-variantsInstallation paths:
.claude/skills/perplexity-architecture-variants/# Perplexity Architecture Variants
## Overview
Three validated architecture blueprints for Perplexity integrations.
## Prerequisites
- Understanding of team size and DAU requirements
- Knowledge of deployment infrastructure
- Clear SLA requirements
- Growth projections available
## Variant A: Monolith (Simple)
**Best for:** MVPs, small teams, < 10K daily active users
```
my-app/
├── src/
│ ├── perplexity/
│ │ ├── client.ts # Singleton client
│ │ ├── types.ts # Types
│ │ └── middleware.ts # Express middleware
│ ├── routes/
│ │ └── api/
│ │ └── perplexity.ts # API routes
│ └── index.ts
├── tests/
│ └── perplexity.test.ts
└── package.json
```
### Key Characteristics
- Single deployment unit
- Synchronous Perplexity calls in request path
- In-memory caching
- Simple error handling
### Code Pattern
```typescript
// Direct integration in route handler
app.post('/api/create', async (req, res) => {
try {
const result = await perplexityClient.create(req.body);
res.json(result);
} catch (error) {
res.status(500).json({ error: error.message });
}
});
```
---
## Variant B: Service Layer (Moderate)
**Best for:** Growing startups, 10K-100K DAU, multiple integrations
```
my-app/
├── src/
│ ├── services/
│ │ ├── perplexity/
│ │ │ ├── client.ts # Client wrapper
│ │ │ ├── service.ts # Business logic
│ │ │ ├── repository.ts # Data access
│ │ │ └── types.ts
│ │ └── index.ts # Service exports
│ ├── controllers/
│ │ └── perplexity.ts
│ ├── routes/
│ ├── middleware/
│ ├── queue/
│ │ └── perplexity-processor.ts # Async processing
│ └── index.ts
├── config/
│ └── perplexity/
└── package.json
```
### Key Characteristics
- Separation of concerns
- Background job processing
- Redis caching
- Circuit breaker pattern
- Structured error handling
### Code Pattern
```typescript
// Service layer abstraction
class PerplexityService {
co