Welcome to Porygon
Tested backend patterns for APIs, data access, and services - designed for enterprise user testing.
Claude Code agent skill with guardrails and patterns to build aligned with Porygon - preventing drift automatically.
This /porygon/ site helps engineers understand capabilities and direct AI agents effectively.
Workflow: Workflow: Explore docs, then direct AI using pattern names. The skill ensures correct implementation.
Engineering Goals
Every Porygon topic maps to one or more engineering pillars:
Security-first development prevents vulnerabilities, protects user data, and ensures compliance.
Performance optimization minimizes latency, maximizes throughput, and scales efficiently.
Consistent behavior, predictable responses, and comprehensive error handling build trust.
Foundations
Core infrastructure patterns every backend feature depends on
Services
External service integrations
Security
Authentication, authorization, and protection
Architecture
System design and structure patterns
Operations
Deployment, monitoring, and testing
Pattern Quick Reference
Request these patterns by name when directing AI agents.
Response Envelope ok/data object format
validateRequest() Zod body validation
handleError() Error response wrapper
Repository Pattern Data access layer
prisma client Type-safe ORM
Transactions Atomic operations
logger Structured logging
Error Classes Typed HTTP errors
Zod Schemas Runtime validation
When directing AI agents to build backend features: Ditto Design System
AI Direction Tips
When directing AI agents to build backend features:
- Reference pattern names: 'Use the response envelope pattern' or 'Follow the repository pattern'
- Specify pillars: 'Prioritize safety' or 'This needs to be fast'
- Link to examples: 'See /examples/api/example-route.ts for the pattern'
- Call out anti-patterns: 'Do NOT use console.log, use logger'
- Reference this site: 'See /porygon/validation for the validation patterns'