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