PHPackages                             nawasara/cloudflare - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. nawasara/cloudflare

ActiveLibrary[Security](/categories/security)

nawasara/cloudflare
===================

Cloudflare management dashboard for Nawasara — DNS records, zones, firewall rules, page rules, SSL settings, and analytics, with DB-cached snapshots and queue-backed mutations.

v0.1.0(1mo ago)044MITPHPPHP ^8.1

Since May 8Pushed yesterdayCompare

[ Source](https://github.com/nawasara/cloudflare)[ Packagist](https://packagist.org/packages/nawasara/cloudflare)[ RSS](/packages/nawasara-cloudflare/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (7)Versions (2)Used By (0)

Nawasara Cloudflare
===================

[](#nawasara-cloudflare)

Cloudflare management dashboard for the Nawasara superapp framework — DNS records, zones, firewall rules, page rules, SSL settings, cache, and analytics, all read from a local DB snapshot for speed and mutated through queue jobs for auditability.

Features
--------

[](#features)

- **Zone management** — list domains with SSL mode, security level, plan, name servers, and per-zone settings
- **DNS records** — full CRUD across A, AAAA, CNAME, MX, TXT, NS, and SRV types, with comment + tags preserved on update
- **Firewall rules** — CRUD WAF custom rules per zone
- **Page rules** — CRUD URL-pattern rules
- **Analytics** — request volume, bandwidth, threats blocked, and unique visitors with per-OPD rollup
- **Cache purge** — purge entire cache or specific URLs
- **Under Attack mode** — toggle the security level when a zone is under DDoS pressure
- **Sync info bar** on every page showing the last successful sync time, pending mutation count, and a link to the audit log

The package follows the DB-cache + queue pattern from `nawasara/sync`: reads come from local snapshot tables (paginated, fast); writes dispatch queue jobs that update Cloudflare and the snapshot via content-hash conflict detection.

Installation
------------

[](#installation)

```
composer require nawasara/cloudflare
php artisan migrate
php artisan db:seed --class="Nawasara\Cloudflare\Database\Seeders\PermissionSeeder" --force
```

The package is auto-discovered by Laravel — no manual provider registration required.

Cloudflare API Token Setup
--------------------------

[](#cloudflare-api-token-setup)

### 1. Sign in to the Cloudflare dashboard

[](#1-sign-in-to-the-cloudflare-dashboard)

Go to [dash.cloudflare.com](https://dash.cloudflare.com) and sign in to the account that manages your domains.

### 2. Open the API Tokens page

[](#2-open-the-api-tokens-page)

Click your **profile icon** (top right) → **My Profile** → **API Tokens** tab.

### 3. Create a custom token

[](#3-create-a-custom-token)

Click **Create Token** → choose **Create Custom Token** at the bottom of the templates list.

### 4. Configure permissions

[](#4-configure-permissions)

Name the token (e.g. `Nawasara Dashboard`) and add the following permissions depending on which features you plan to use:

PermissionAccessUsed forZone → ZoneReadList zones, zone detailZone → Zone SettingsEditSSL mode, security level, Under Attack modeZone → DNSEditCRUD DNS recordsZone → Firewall ServicesEditCRUD firewall rulesZone → AnalyticsReadDashboard analyticsZone → Cache PurgePurgeCache purge (all / per URL)> *Edit* permission already implies *Read*, so there's no need to add Read separately for DNS, Firewall, or Zone Settings.

### 5. Zone Resources

[](#5-zone-resources)

Choose the scope:

- **All zones** — the token can access every domain in the account
- **Specific zone** — restrict to one or a few domains (recommended if you only manage a subset)

### 6. (Optional) IP Address Filtering

[](#6-optional-ip-address-filtering)

If your Nawasara server has a static IP, add **Client IP Address Filtering** → **Is in** → enter the IP. This protects against the token being used from anywhere else if it leaks.

### 7. (Optional) Token lifetime

[](#7-optional-token-lifetime)

Set **Start Date** and **End Date** for a temporary token. Leave blank for a permanent one.

### 8. Create the token

[](#8-create-the-token)

Click **Continue to summary**, review, then **Create Token**.

**Copy the displayed token immediately** — Cloudflare only shows it once.

### 9. Note the Account ID

[](#9-note-the-account-id)

Find your Account ID:

- Open any zone's **Overview** page
- The Account ID is in the right sidebar under **API**

Or read it from any dashboard URL: `dash.cloudflare.com/{ACCOUNT_ID}/...`

Storing credentials in Vault
----------------------------

[](#storing-credentials-in-vault)

1. Open Nawasara → `/nawasara-vault`
2. Choose the **Cloudflare** group
3. Fill in:
    - **API Token** — paste the token from step 8
    - **Account ID** — from step 9
4. Save

The package picks up credentials from Vault automatically.

Verification
------------

[](#verification)

Open **Cloudflare → Zones** in the sidebar. Your domain list should appear after the first sync.

If it doesn't, check:

- The token is pasted exactly (no leading or trailing whitespace)
- Account ID matches the destination account
- Token permissions include every feature you want to use
- Zone Resources includes the domains you intend to manage

Permissions
-----------

[](#permissions)

PermissionDescription`cloudflare.zone.view`View zone list`cloudflare.dns.view`View DNS records`cloudflare.dns.create`Create a DNS record`cloudflare.dns.edit`Edit a DNS record`cloudflare.dns.delete`Delete a DNS record`cloudflare.waf.view`View firewall rules`cloudflare.waf.create`Create a firewall rule`cloudflare.waf.edit`Edit a firewall rule`cloudflare.waf.delete`Delete a firewall rule`cloudflare.ssl.view`View SSL status`cloudflare.ssl.manage`Change SSL mode`cloudflare.analytics.view`View analytics`cloudflare.cache.purge`Purge cache`cloudflare.ddos.view`View security level`cloudflare.ddos.manage`Change security level / Under Attack modeAll permissions are auto-assigned to the `developer` role by the seeder.

Author
------

[](#author)

**Pringgo J. Saputro** &lt;&gt;

License
-------

[](#license)

MIT

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance97

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

32d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16914951?v=4)[Pringgo J. Saputro](/maintainers/pringgojs)[@pringgojs](https://github.com/pringgojs)

![](https://www.gravatar.com/avatar/edcf770bde3babcc9fa554e305e361b8614c1e505470e75842de75ea3e502548?d=identicon)[nawasara](/maintainers/nawasara)

---

Top Contributors

[![pringgojs](https://avatars.githubusercontent.com/u/16914951?v=4)](https://github.com/pringgojs "pringgojs (40 commits)")

---

Tags

laraveldnssslcloudflareanalyticscdnfirewallwafNawasara

### Embed Badge

![Health badge](/badges/nawasara-cloudflare/health.svg)

```
[![Health](https://phpackages.com/badges/nawasara-cloudflare/health.svg)](https://phpackages.com/packages/nawasara-cloudflare)
```

###  Alternatives

[venturedrake/laravel-crm

A free open source CRM built as a package for laravel projects

39910.0k](/packages/venturedrake-laravel-crm)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

719160.4k12](/packages/tallstackui-tallstackui)[nexxai/laravel-cfcache

A handful of Cloudflare cache helpers for Laravel

13011.9k](/packages/nexxai-laravel-cfcache)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.2k](/packages/tomshaw-electricgrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
