npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@stacksolo/plugin-cloudflare

v0.1.0

Published

Cloudflare plugin for StackSolo - provides DNS and CDN resource definitions using CDK for Terraform

Readme

@stacksolo/plugin-cloudflare

Cloudflare DNS integration for StackSolo. Automatically create DNS records pointing to your GCP load balancer.

Features

  • Automatic DNS setup - No manual Cloudflare dashboard configuration
  • Cloudflare proxy - Enable orange-cloud CDN and DDoS protection
  • Load balancer integration - Automatically point domain to LB IP
  • Free tier - Cloudflare DNS is free

Installation

pnpm add @stacksolo/plugin-cloudflare

Quick Start

  1. Get your Cloudflare Zone ID from the dashboard (Overview tab, bottom right)
  2. Create an API token with "Edit zone DNS" permissions
  3. Store the token as a secret
# Store Cloudflare API token
echo -n "your-cloudflare-api-token" | gcloud secrets create cloudflare-api-token --data-file=-
  1. Add to your config:
{
  "project": {
    "plugins": [
      "@stacksolo/plugin-gcp-cdktf",
      "@stacksolo/plugin-cloudflare"
    ],
    "cloudflare": {
      "zoneId": "your-zone-id",
      "apiToken": "@secret/cloudflare-api-token"
    },
    "networks": [{
      "name": "main",
      "loadBalancer": {
        "name": "gateway",
        "domain": "app.example.com",
        "enableHttps": true,
        "dns": {
          "provider": "cloudflare",
          "proxied": true
        }
      }
    }]
  }
}

Resources

DNS Record (cloudflare:dns_record)

Create DNS records in Cloudflare.

{
  type: 'cloudflare:dns_record',
  name: 'app-dns',
  config: {
    zoneId: 'abc123',
    recordName: 'app',
    type: 'A',
    value: '${gatewayIp.address}',  // Reference to load balancer IP
    proxied: true,
    ttl: 1  // Auto TTL when proxied
  }
}

Configuration Reference

DNS Record Options

| Property | Type | Required | Default | Description | |----------|------|----------|---------|-------------| | name | string | Yes | - | Resource name | | zoneId | string | Yes | - | Cloudflare Zone ID | | recordName | string | Yes | - | DNS name (e.g., "app" for app.example.com) | | type | string | Yes | A | Record type: A, AAAA, or CNAME | | value | string | Yes | - | IP address or CDKTF reference | | proxied | boolean | No | true | Enable Cloudflare proxy (orange cloud) | | ttl | number | No | 1 | TTL in seconds (1 = auto when proxied) |

Load Balancer Integration

When using with @stacksolo/plugin-gcp-cdktf, add dns config to your load balancer:

{
  "loadBalancer": {
    "name": "gateway",
    "domain": "app.example.com",
    "enableHttps": true,
    "dns": {
      "provider": "cloudflare",
      "proxied": true
    }
  }
}

The load balancer will automatically:

  1. Create a Cloudflare DNS record
  2. Point it to the load balancer IP
  3. Enable Cloudflare proxy if specified

Prerequisites

  1. Cloudflare account - Free tier works
  2. Domain on Cloudflare - DNS must be managed by Cloudflare
  3. API token - With "Edit zone DNS" permission
  4. Terraform - Required for CDKTF deployment

Getting Your Zone ID

  1. Log into Cloudflare dashboard
  2. Select your domain
  3. Scroll down on the Overview page
  4. Zone ID is in the right sidebar under "API"

Creating an API Token

  1. Go to Cloudflare dashboard → Profile → API Tokens
  2. Click "Create Token"
  3. Use "Edit zone DNS" template
  4. Select your zone under "Zone Resources"
  5. Create token and save it securely

Cost

| Resource | Monthly Cost | |----------|-------------| | DNS Records | Free | | Cloudflare Proxy | Free (Pro features paid) |

License

MIT