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