Skip to content

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:

  1. Database layer — implement the store interface
  2. Configuration — set environment variables
  3. Routes — adjust prefix if needed

4. Run It

bash
# Run tests
cd yourproject/internal/auth
go test -v ./...

Available Modules

ModuleDescription
AuthJWT authentication with bcrypt
CRUDGeneric CRUD with pagination
MiddlewareRecovery, CORS, logging, timeout
RBACRole-based access control
Rate LimitFixed/sliding window, token bucket
ValidationChainable request validation
File UploadSecure file upload handler
HealthLiveness/readiness probes
CacheTTL + LRU in-memory cache
PaginationOffset/cursor pagination
MailSMTP 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

Released under the MIT License.