Declarative .mdcCursor/Claude/Windsurf 규칙 및 n8n 워크플로에이전트 스킬제로 비밀 유출 감사

Go 1.27 + gqlgen + pgx/v5 저메모리 마이크로서비스 기술

컴파일 타임 gqlgen 리졸버 및 제한된 pgxpool 연결을 사용하여 <50MB RSS Go GraphQL 백엔드를 구축하기 위한 선언적 CLAUDE.md 및 .mdc 엔지니어링 기술.

선언적 에이전트 및 IDE 규칙 파일

---
description: Go 1.27, gqlgen GraphQL resolvers, and pgx/v5 PostgreSQL pool patterns for sub-50MB microservices
globs: backend/**/*.{go,graphqls,yml}
alwaysApply: false
---

# Go 1.27 + gqlgen + pgx/v5 Production Architecture

- Configure `pgxpool` with `MaxConns = 10`, `MinConns = 1`, and `MaxConnIdleTime = 5 * time.Minute` to keep microservice RAM under 40–60 MB RSS.
- Propagate `context.Context` with explicit timeouts (`context.WithTimeout(ctx, 5*time.Second)`) across every SQL query and outbound HTTP request.
- Use parameterized `$1, $2` placeholders exclusively in `pgx` queries; never concatenate raw user input into SQL strings.
- Project localized JSONB payloads directly in PostgreSQL (`COALESCE(translations->$1, translations->'en')`) instead of unmarshaling all 26 locales in Go memory.
- Compile production binaries with `-ldflags='-s -w'` and bind internal API listeners strictly to `127.0.0.1:<PORT>` behind Nginx.

## Verification Check
```bash
go vet ./... && go build -ldflags='-s -w' ./cmd/server
```

커뮤니티 설정 참고 사항 및 제작 리뷰 (0)

아직 커뮤니티 메모가 없습니다. 아래에서 프로덕션 구성 팁을 공유하세요.

설정 메모 또는 확인 팁 게시

노출된 MCP 도구 및 리소스 스키마 검사기

도구/자원 식별자입력 매개변수실행 동작
bounded_pgxpool_configinternal/db/*.goEnforces MaxConns <= 10, context deadlines, and single-query JSONB projection.
compile_time_gqlgen_resolversgraph/*.goPrevents reflection bottlenecks and N+1 resolver loops.