Developer Starter Templates
Jumpstart your infrastructure, databases, and pipelines with zero-dependency verified configurations. Fork any snippet directly into your workspace.
Nginx Reverse Proxy with SSL & Security Headers
Production-ready reverse proxy with TLS 1.3, Brotli, and strict security headers.
# Production Nginx Reverse Proxy Configuration
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name api.example.com;
# SSL Certificates & Modern Ciphers
ssl_certificate...
Docker Compose Production Web Stack
Full-stack production docker-compose with web app, Postgres, and Redis.
version: '3.8'
services:
web:
build: .
restart: always
environment:
NODE_ENV: production
DATABASE_URL: ${DATABASE_URL}
REDIS_URL: ${REDIS_URL}
ports:
- "3000:3000"
depends_on:
- db
- redis
...
High-Performance SQLite Production PRAGMAs
Maximum performance SQLite pragmas for WAL mode, concurrency, and memory buffers.
-- High-Performance Concurrent SQLite Configuration
-- Run immediately after opening database connection
-- 1. Enable Write-Ahead Logging (concurrent readers + writer)
PRAGMA journal_mode = WAL;
-- 2. Synchronous NORMAL is safe in WAL mode and...
Modern HTML5 Responsive Boilerplate
Zero-dependency responsive boilerplate with system fonts, dark mode, and mobile support.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Modern Web Application</title>
<meta name="description" content="Lightweight modern responsive HTML5...
GitHub Actions Node.js CI/CD Matrix Pipeline
Multi-stage GitHub Actions matrix CI/CD pipeline with Node.js and cache.
name: CI/CD Pipeline
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- name: Checkout Code
...
Nginx WebSocket Reverse Proxy Configuration
Production reverse proxy configuration with WebSocket upgrade headers, HTTP/1.1 keepalive, and timeout tuning.
# Nginx Reverse Proxy with Full WebSocket Support
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream websocket_backend {
server 127.0.0.1:4000;
keepalive 64;
}
server {
listen 443 ssl http2;
...
Nginx SPA Single-Page App Fallback & Caching Routing
Optimized configuration for React, Vue, Vite, and Next export SPAs with aggressive asset caching and index.html fallback.
# Nginx Single Page Application (SPA) Routing & Caching
server {
listen 80;
listen [::]:80;
server_name app.example.com;
root /var/www/app/dist;
index index.html;
# Gzip & Brotli Compression
gzip on;
gzip_types...
Docker Compose Next.js Stack with Caddy Auto-SSL
Containerized Next.js production deployment with Caddy reverse proxy providing automatic Let's Encrypt certificates.
version: '3.8'
services:
caddy:
image: caddy:2-alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
...
Systemd Production Service Unit for Node.js Application
Hardened systemd unit file with automatic restart on failure, resource limits, unprivileged user execution, and environment variable loading.
[Unit]
Description=Node.js Production Application Service
After=network.target postgresql.service
Wants=postgresql.service
[Service]
Type=simple
User=deploy
Group=deploy
WorkingDirectory=/var/www/app
ExecStart=/usr/bin/node...
Multi-Stage Production Node.js Dockerfile with Distroless
Secure, minimal Node.js Dockerfile using multi-stage build, npm cache mounting, non-root user, and Google distroless runtime.
# Stage 1: Dependency resolution and compilation
FROM node:20-alpine AS deps
WORKDIR /app
COPY package*.json ./
RUN --mount=type=cache,target=/root/.npm \
npm ci --omit=dev --ignore-scripts
# Stage 2: Application builder (if TypeScript/bundler...
SQLite FTS5 Full-Text Search Schema & Sync Triggers
External content FTS5 virtual table with unicode61 tokenizer and insert, update, and delete synchronization triggers.
-- High-Performance SQLite FTS5 External Content Virtual Table
-- Synchronizes search index with the primary 'articles' table
-- 1. Create FTS5 Virtual Table
CREATE VIRTUAL TABLE IF NOT EXISTS articles_fts USING fts5(
title,
body,
...
Production PgBouncer Transaction Connection Pooling Config
Battle-tested pgbouncer.ini configuration for high-traffic PostgreSQL workloads with transaction pooling and keepalive tuning.
;; Production PgBouncer Configuration
[databases]
app_db = host=127.0.0.1 port=5432 dbname=app_production auth_user=postgres
[pgbouncer]
logfile = /var/log/postgresql/pgbouncer.log
pidfile = /var/run/postgresql/pgbouncer.pid
listen_addr =...
Redis In-Memory Production Cache & Eviction Config
Redis 7 configuration optimized for high-throughput cache tier with memory caps, volatile-lru eviction, and disabled persistence.
# Redis In-Memory Production Cache Tier
# Optimized for zero disk bottleneck and LRU eviction
port 6379
bind 127.0.0.1 ::1
protected-mode yes
timeout 300
tcp-keepalive 60
# Max Memory Limit & Eviction Policy
maxmemory 2gb
maxmemory-policy...
GitHub Actions Multi-Arch Docker Build & Push to GHCR
Automated GitHub Actions workflow to build multi-architecture (linux/amd64, linux/arm64) Docker images and push to GitHub Container Registry.
name: Build and Publish Docker Image
on:
push:
branches: [main]
tags: ['v*.*.*']
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
...
Modern Open-Source GitHub README.md Specification Template
Clean, comprehensive developer README template featuring status badges, live preview section, architecture overview, and quick-start.
# Project Name 🚀
> A fast, lightweight, and modern application built for developers.
[,
and this project adheres to [Semantic...
GitHub Pull Request & Issue Quality Checklist Template
Production .github/pull_request_template.md featuring breaking changes detection, test checklists, and architectural context.
## 📌 Summary of Changes
A concise description of what this pull request accomplishes and the problem it solves.
- Relates to issue: #142
- Closes issue: #158
---
## 🛠 Type of Change
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
-...
Architecture Decision Record (ADR) Engineering Template
Standard ADR template (Michael Nygard format) documenting architectural decisions, status, context, consequences, and tradeoffs.
# ADR 007: Adoption of SQLite WAL Mode for Single-Node Workloads
## 📊 Status
**Accepted** (Supersedes ADR 003) — 2026-10-09
## 👥 Deciders
- Architecture Team
- Core Infrastructure Lead
---
## 🔍 Context & Problem Statement
Our application...
Open-Source Contributing Guidelines (CONTRIBUTING.md) Template
Comprehensive guidelines for open-source contributors covering issue reporting, branch naming conventions, and local dev setup.
# Contributing to Project Name
Thank you for investing your time in improving this open-source project!
## 📜 Code of Conduct
This project adheres to the Contributor Covenant. By participating, you are expected to uphold this code. Please report...
GitHub Security Policy (SECURITY.md) Vulnerability Template
Standard GitHub SECURITY.md template outlining supported versions, responsible disclosure SLA, and PGP key fingerprint.
# Security Policy
We take the security of our codebase, infrastructure, and user data extremely seriously. We appreciate the responsible disclosure of any security vulnerability.
---
## 🛡 Supported Versions
Security updates and patches are...
llms.txt Standard Specification Template for AI Agents
Clean llms.txt standard layout for LLM crawlers and AI coding assistants like Claude, Cursor, and ChatGPT.
# Project Name — AI Agent & LLM Context Guide
> Project Name is a high-speed, lightweight developer snippet repository with zero client-side tracking, native Markdown rendering, and instant raw API endpoints.
This file provides structured context...
Sample Nginx Combined Access and Error Log Dataset
Real-world Nginx access and error log snippet with HTTP status codes, response times, and SSL errors for log parsing tests.
192.168.1.105 - - [09/Oct/2026:08:14:22 +0000] "GET / HTTP/2.0" 200 4812 "https://google.com" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" 0.012
10.0.4.12 - -...
Sample Docker Container Structured JSON Log Stream
Newline-delimited structured Docker container logs with stdout/stderr streams, ISO 8601 timestamps, and JSON payloads.
[
{
"log": "{\"level\":\"info\",\"time\":1728461660124,\"pid\":1,\"hostname\":\"app-worker-1\",\"msg\":\"HTTP server listening on 0.0.0.0:3000\"}\n",
"stream": "stdout",
"time": "2026-10-09T08:14:20.124892015Z"
},
{
"log":...
Sample E-Commerce Customer Orders Transaction CSV Dataset
Realistic 25-row e-commerce orders CSV with order IDs, customer names, SKUs, amounts, currencies, payment methods, and statuses.
order_id,customer_name,email,sku,quantity,amount,currency,payment_status,country,created_at
ORD-1001,Elena Rostova,elena.r@example.com,SKU-PRO-DESK,1,349.00,USD,completed,US,2026-10-01 09:14:22
ORD-1002,Marcus...
Sample SaaS Subscription MRR & Retention Metrics CSV Dataset
Quarterly SaaS performance metrics dataset with MRR, ARR, expansion revenue, churn rates, and LTV calculations formatted in CSV.
month,starting_mrr,new_mrr,expansion_mrr,churned_mrr,net_mrr,active_customers,churn_rate_pct,arpu_usd,ltv_usd
2026-01,42500,6800,2100,1200,50200,412,2.82,121.84,4320
2026-02,50200,7400,2600,1450,58750,478,2.89,122.90,4252
2026-03,58750,8900,3100,1600...
Sample Responsive Transactional HTML Email Boilerplate
Production single-file HTML email with table resets, inline styles, dark mode media queries, and bulletproof action buttons.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Your Account Confirmation — Supanote</title>
<style>
body { margin: 0; padding: 0;...
Sample Minimalist Developer SVG Icon Collection
Set of 5 clean 24x24 vector SVG icons (Terminal, Database, Lock, Key, Server) optimized for instant embedding and preview.
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<!-- 1. Terminal Icon -->
<symbol id="icon-terminal" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
...
Production Caddyfile Reverse Proxy with Automatic HTTPS
Minimal, hardened Caddyfile configuration featuring automatic Let's Encrypt certificates, HSTS, Brotli, and reverse proxy.
# Global Caddy Configuration
{
email ops@example.com
admin off
}
# Production Domain Reverse Proxy
example.com {
# Automatic TLS and HTTP to HTTPS redirection is built-in
# Security & Protection Headers
header {
...
Prometheus Alertmanager Production Alert Rules Template
Essential Prometheus alerting rules for host CPU usage (>85%), high RAM exhaustion, disk space threshold (<10%), and service down.
groups:
- name: host_infrastructure_alerts
rules:
- alert: HostHighCpuUsage
expr: 100 - (avg by (instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) > 85
for: 5m
labels:
severity: warning
...
PostgreSQL Slow Query Logging & auto_explain Configuration
Production postgresql.conf snippet to log queries exceeding 250ms with execution plans, buffer usage, and lock wait times.
-- PostgreSQL 16 Slow Query Logging & Auto Explain
-- Append these directives to postgresql.conf or run as ALTER SYSTEM
-- 1. Log Queries Exceeding 250ms
log_min_duration_statement = 250
-- 2. Detail Logging for Slow Statements
log_checkpoints =...
MySQL 8.0 InnoDB Production Performance Tuning Configuration
Hardened my.cnf parameters for InnoDB buffer pool size, redo log capacity, thread cache, and connection limits.
# MySQL 8.0 / Percona Server Production InnoDB Tuning
# /etc/mysql/mysql.conf.d/mysqld.cnf
[mysqld]
# Basic Network & Connection Settings
bind-address = 127.0.0.1
max_connections = 500
max_connect_errors = 10000
wait_timeout ...
Production .cursorrules Specification for Full-Stack TypeScript
Hardened, battle-tested .cursorrules for Next.js, TypeScript, Tailwind CSS, and SQLite with strict code invariants.
# .cursorrules - Production Full-Stack TypeScript Guidelines
You are an expert principal software engineer specializing in TypeScript, Next.js, Tailwind CSS, and SQLite.
## Code Quality & Architecture Invariants
- Prefer explicit types over any....
Claude Code & AI Assistant Instructions (CLAUDE.md)
Standardized CLAUDE.md developer guide with build steps, testing guidelines, code architecture, and style conventions.
# CLAUDE.md - Development & Project Guidance
This file provides architectural guidelines and operational instructions for Claude Code and autonomous agent assistants working in this repository.
## Commands & Workflows
- Development Server: npm run...
Model Context Protocol (MCP) Server Docker & SSE Setup
Production Docker Compose and configuration for hosting an MCP server over Server-Sent Events (SSE).
version: '3.8'
services:
mcp-server:
image: node:20-alpine
container_name: mcp-knowledge-server
restart: unless-stopped
working_dir: /app
environment:
- NODE_ENV=production
- PORT=8080
- MCP_TRANSPORT=sse
...
OpenAI & Anthropic Strict Structured Outputs JSON Schema
Strict JSON Schema definitions for LLM function calling, data extraction, and deterministic JSON responses.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExtractedTechnicalSnippet",
"type": "object",
"additionalProperties": false,
"required": ["title", "language", "code", "explanation", "tags", "confidence_score"],
...
PostgreSQL with pgvector & Redis RAG Embedding Stack
Docker Compose configuration with PostgreSQL 16, pgvector extension, HNSW indexing, and Redis cache for AI embeddings.
version: '3.8'
services:
pgvector-db:
image: pgvector/pgvector:pg16
container_name: postgres-pgvector
restart: unless-stopped
environment:
POSTGRES_USER: ${DB_USER:-vector_user}
POSTGRES_PASSWORD:...
Security.txt Standard Policy (RFC 9116)
Standard RFC 9116 security policy template for /.well-known/security.txt with PGP key and vulnerability disclosure guidelines.
# /.well-known/security.txt
# Conforms to RFC 9116: https://www.rfc-editor.org/rfc/rfc9116
Contact: mailto:security@example.com
Expires: 2027-12-31T23:59:59.000Z
Encryption: https://example.com/pgp-key.txt
Preferred-Languages: en, tr
Canonical:...
Cloudflare Turnstile Server-Side Verification (Node.js)
Zero-dependency Cloudflare Turnstile token validation middleware with timeout and client IP passing.
'use strict';
/**
* Validates Cloudflare Turnstile CAPTCHA response token
* @param {string} token - The cf-turnstile-response string from form body
* @param {string} remoteIp - Optional remote client IP address
* @returns {Promise<{ success:...
Stripe Webhook Signature Verification & Event Dispatcher
Production-ready Stripe webhook handler verifying HMAC signatures, idempotent processing, and subscription lifecycle.
'use strict';
const crypto = require('crypto');
/**
* Securely verify Stripe webhook signature without external heavy dependencies
* @param {string|Buffer} payload - Raw HTTP request body buffer
* @param {string} sigHeader - 'stripe-signature'...
Polar.sh Webhook Signature Verification & License Handler
Polar.sh billing webhook handler verifying webhook signatures and granting Pro customer licenses.
'use strict';
const crypto = require('crypto');
/**
* Verify Polar.sh webhook signature using Standard Webhooks HMAC-SHA256
*/
function verifyPolarWebhook(rawBody, headers, webhookSecret) {
const webhookId = headers['webhook-id'];
const...
Caddyfile Multi-Domain Production TLS Reverse Proxy
Zero-configuration automatic Let's Encrypt TLS, Brotli/Zstandard compression, and security headers with Caddy.
# Production Caddy Multi-Domain Proxy
{
email admin@example.com
admin off
}
app.example.com {
encode zstd gzip
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
X-Content-Type-Options...
Vector.dev Log Shipping Pipeline Configuration (vector.toml)
High-throughput log aggregator routing Docker & Syslog streams into Grafana Loki, Datadog, or S3.
# vector.toml - High-Performance Log Shipping Pipeline
[sources.docker_logs]
type = "docker_logs"
include_units = ["app-*", "nginx-*"]
[transforms.parse_json]
type = "remap"
inputs = ["docker_logs"]
source = '''
. = parse_json(.message) ?? .
...
Tailscale Subnet Router & Exit Node Docker Compose
Lightweight Docker container exposing internal VPC subnets and homelabs securely via Tailscale overlay network.
version: '3.8'
services:
tailscale:
image: tailscale/tailscale:latest
container_name: tailscale-subnet-router
hostname: vpc-subnet-router
restart: unless-stopped
cap_add:
- NET_ADMIN
- NET_RAW
network_mode:...
Shadcn UI HSL Color Tokens & Modern CSS Variables
Clean CSS variable system with light/dark theme tokens, border radii, and accessible contrasts for Tailwind CSS.
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 240 10% 3.9%;
--card: 0 0% 100%;
--card-foreground: 240 10% 3.9%;
--popover: 0 0% 100%;
--popover-foreground: 240 10% 3.9%;
--primary: 240 5.9% 10%;
...
Biome.json Modern Linter & Formatter Configuration
Ultra-fast Biome configuration replacing ESLint and Prettier with import sorting and strict JavaScript/TypeScript rules.
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUnusedVariables": "error",
...
ClickHouse Single-Node Analytics Container Stack
High-performance columnar database setup with ClickHouse, Tabix web client, and persistent data volumes.
version: '3.8'
services:
clickhouse:
image: clickhouse/clickhouse-server:24.3
container_name: clickhouse-analytics
restart: unless-stopped
ports:
- "8123:8123"
- "9000:9000"
environment:
CLICKHOUSE_DB:...
PostgreSQL Logical Replication & CDC WAL Settings
Optimized postgresql.conf and publication/subscription SQL statements for change data capture and replication.
-- PostgreSQL Logical Replication & Change Data Capture (CDC) Setup
-- Step 1: Ensure postgresql.conf settings are applied:
-- wal_level = logical
-- max_wal_senders = 10
-- max_replication_slots = 10
-- Step 2: On PRIMARY Publisher...
GitHub Actions Playwright Parallel E2E Test Workflow
Production GitHub Actions CI matrix running multi-browser Playwright tests in parallel with HTML report uploads.
name: Playwright Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2, 3]
...
GitHub Actions npm Package Publish with Sigstore Provenance
Secure npm publishing workflow utilizing OIDC token authentication, Sigstore build provenance, and automated semantic releases.
name: Publish to npm
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
...