Getting Started
1. Choose a Module
Browse the Modules section or the registry/ directory to find what you need.
2. Copy It
bash
# Example: copy the auth module
cp -r registry/auth/src/go/* yourproject/internal/auth/3. Adapt It
Each module has a README.md with an adaptation checklist:
- Database layer — implement the store interface
- Configuration — set environment variables
- Routes — adjust prefix if needed
4. Run It
bash
# Run tests
cd yourproject/internal/auth
go test -v ./...Available Modules
| Module | Description |
|---|---|
| Auth | JWT authentication with bcrypt |
| CRUD | Generic CRUD with pagination |
| Middleware | Recovery, CORS, logging, timeout |
| RBAC | Role-based access control |
| Rate Limit | Fixed/sliding window, token bucket |
| Validation | Chainable request validation |
| File Upload | Secure file upload handler |
| Health | Liveness/readiness probes |
| Cache | TTL + LRU in-memory cache |
| Pagination | Offset/cursor pagination |
| SMTP email with templates |
Project Structure
Each module follows this structure:
registry/<module>/
├── src/go/
│ ├── go.mod # module <name>, go 1.22
│ ├── config.go # Options struct, Defaults(), FromEnv()
│ ├── handler.go # HTTP handlers
│ ├── <core>.go # Core logic
│ ├── <core>_test.go # Functional tests
│ └── pentest_test.go # Penetration test cases
├── README.md # Human-readable adaptation guide
└── __llms__.md # AI-readable summary (~150 tokens)Next Steps
- Read Why Copy-Paste? to understand the philosophy
- Check Security Design for security best practices
- Browse Modules to find what you need