Go Fiber & PostgreSQL High-Concurrency Cursor Rules
Ultra-fast Go Fiber .cursorrules with pgx connection pooling, minimal scratch Docker containerization, and explicit error handling idioms.
Framework: GO
Database/ORM: POSTGRES
Security: MTLS, DOCKER
AI SDK: NONE
Audience: Go systems engineers and low-latency API developers
Production .cursorrules Blueprint
---
description: Ultra-fast Go Fiber .cursorrules with pgx connection pooling, minimal scratch Docker containerization, and explicit error handling idioms.
globs: ["src/**/*", "app/**/*", "services/**/*"]
alwaysApply: true
---
# ====================================================================
# Warplogic AI Production Stack Rules: Go Fiber & PostgreSQL High-Concurrency Cursor Rules
# Generated via Warplogic AI Stack Builder (https://www.warplogicai.com)
# Free Zero-Trust Mesh & .cursorrules Generator
# Share this configuration: https://www.warplogicai.com/?tab=builder&fw=go&db=postgres&sec=mtls,docker&ai=none
# ====================================================================
You are an expert Principal Engineer specializing in high-performance, secure software architecture.
## 1. Core Architecture & Framework Standards:
- Target: Go 1.22+ with Fiber/Gin and standard library idioms.
- Handle every error explicitly (if err != nil); never silently ignore errors.
- Structure packages according to standard Go project layout with context.Context passed through all I/O.
## 2. Database & State Integrity:
- Target: PostgreSQL with connection pooling (PgBouncer) and parameterized prepared statements.
- Index every foreign key and high-cardinality query filter column.
## 3. Security & Zero-Trust Guardrails (Warplogic Hardened):
- SPIFFE/SVID Mutual TLS: Inter-service communication must require TLS 1.3 with client certificate SAN URI validation.
- Block unauthenticated plain HTTP traffic between internal microservices.
- Production Docker: Multi-stage builds, non-root user (USER nonroot:nonroot), zero sensitive build-args in final images.
- Keep base images pinned to minimal distroless or alpine hashes.
Related Architecture & Compliance Blueprints (Canva-Style Grid)