eternal-wall-monument

byBachir Djoukbala

# PROMPT: Build "The Eternal Wall" WordPress Plugin (v2.0) Build a complete, production-ready WordPress plugin ZIP called "The Eternal Wall" (eternal-wall-v2.0.0.zip). ## 1. Concept & Business Rules The Eternal Wall is a pay-to-enter digital monument where visitors pay to inscribe their name permanently on a 2D interactive stone wall. - Sealed Wall: The full wall is accessible ONLY to logged-in users who have at least 1 paid, permanent inscription (and admins). Visitors see a blurred teaser wall and a live counter of carved names. - Permanent: Confirmed inscriptions can NEVER be edited, updated, or deleted by anyone (including admins). Enforced via MySQL BEFORE UPDATE/DELETE triggers + PHP model guards. - Carve Again: Carvers can purchase additional inscriptions anytime. ## 2. Server-Authoritative Pricing - Base: $1.00 USD per 10 characters, rounded up (1-10 chars = $1, 11-20 = $2 ... 91-100 = $10). Max 100 characters. - Graphemes: Emojis and composite symbols count as 1 character (grapheme_strlen with PCRE \X fallback). - Premium: Optional +$20 USD upgrade (burnished gold slab, double width, glowing border). - Currency: Store price in USD, charge customer in DZD (Algerian Dinar) using an admin-configurable rate (default: 135 DZD/USD). ## 3. Payment Gateway: Chargily Pay v2 (Algeria) Support Algerian CIB & EDAHABIA cards. Do not hardcode secret keys. - Endpoints: https://pay.chargily.net/api/v2 (live) and /test/api/v2 (test). - Flow: Frontend selects text, coords, premium -> server quotes price and creates pending record -> server calls Chargily POST /checkouts with Bearer token -> returns checkout URL. - Webhook (/wp-json/eternal-wall/v1/webhook/chargily): Verify HMAC-SHA256 in "signature" header using webhook secret. Zero-trust: fetch checkout status directly from Chargily API. If status=paid, idempotently finalize inscription and assign sequential number. - Architecture: Abstract EW_Payment_Gateway interface so other providers can be added later. ## 4. File Structure (PHP 7.4+ compatible, prefix EW_ / ew_) eternal-wall/ ├── eternal-wall.php # Plugin header, constants (EW_VERSION 2.0.0), activation/deactivation ├── uninstall.php # Safe uninstall (never drops inscriptions table) ├── readme.txt # Setup guide, shortcode instructions ├── includes/ │ ├── class-ew-plugin.php # Singleton bootstrap │ ├── class-ew-settings.php # Options: Chargily keys, test mode, DZD rate, Google OAuth │ ├── class-ew-pricing.php # Server quote & grapheme counter │ ├── class-ew-security.php # Nonces, rate limits, access checks (can_view_wall) │ ├── class-ew-database.php # dbDelta tables & immutability triggers │ ├── class-ew-inscriptions.php # Model, 2D coordinates, viewport queries │ ├── class-ew-payment-gateway.php# Gateway interface │ ├── class-ew-chargily.php # Chargily Pay v2 implementation │ ├── class-ew-payments.php # Quote verification & checkout orchestration │ ├── class-ew-webhooks.php # Replay-protected webhook receiver │ ├── class-ew-auth.php # Native WP sign-up/login + Google OAuth │ ├── class-ew-rest-api.php # Endpoints: /count, /me, /wall, /checkout, /webhook/chargily │ └── class-ew-shortcode.php # [eternal_wall] shortcode dispatcher ├── admin/ │ ├── class-ew-admin.php # Admin menu & assets │ ├── class-ew-admin-dashboard.php# Counter stats & connection tester │ ├── class-ew-admin-inscriptions.php # Read-only inscription browser (no delete action) │ └── class-ew-admin-settings.php # Settings form with masked secret keys ├── public/ │ ├── css/eternal-wall.css # Scoped (.ew-root) dark stone & gold theme │ └── js/ │ ├── eternal-wall-canvas.js # 2D zoom/pan stone canvas with viewport culling │ ├── eternal-wall-carve.js # Live stone slab preview, grapheme counter, checkout │ └── eternal-wall-search.js # Search by text/#number with auto-pan to coordinates └── templates/ ├── landing.php # Ghost teaser wall, counter, "Pay to Enter" CTA ├── auth.php # Login/register tabs + Google OAuth button ├── carve.php # Carving workshop, slab preview, spot picker ├── wall.php # Interactive 2D pannable wall └── sealed.php # "The wall is sealed" gatekeeper message ## 5. Database Schema 1) wp_eternal_wall_inscriptions: - id (BIGINT UNSIGNED AUTO_INCREMENT PK) - number (BIGINT UNSIGNED UNIQUE NULLABLE) # Sequential #1, #2... assigned only on confirmation - user_id (BIGINT UNSIGNED) - content (VARCHAR(191)) - char_count (INT UNSIGNED) - is_premium (TINYINT(1) DEFAULT 0) - status (VARCHAR(20) DEFAULT 'pending') # pending, confirmed, failed - coord_x (INT), coord_y (INT) - amount_dzd (DECIMAL(10,2)), amount_usd (DECIMAL(10,2)) - gateway (VARCHAR(50) DEFAULT 'chargily') - payment_ref (VARCHAR(191) UNIQUE) - created_at (DATETIME), confirmed_at (DATETIME NULL) 2) wp_eternal_wall_events: - id, event_id (UNIQUE), gateway, payload (LONGTEXT), processed_at (DATETIME) 3) Triggers: ew_no_delete & ew_no_update on wp_eternal_wall_inscriptions. If OLD.status = 'confirmed', SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Permanent inscriptions cannot be modified or deleted.'. ## 6. Frontend & Shortcode: [eternal_wall] - Landing (Visitor): Monumental hero, live counter of inscribed souls, blurred teaser wall, "Pay to Enter" button. - Carve Room (Logged-in): Textarea (1-100 graphemes), real-time chiseled stone preview, premium toggle, 2D coordinate spot picker, live DZD/USD price, permanence agreement checkbox, "Pay & Carve Forever" button. - Wall View (Paid Carver/Admin): Full 2D canvas with drag-to-pan, pinch/scroll zoom, viewport culling (only renders visible slabs). Search box auto-pans to slab. Regular slabs = dark stone; Premium = gold double-width with glow. "Carve Again" top-bar button. ## 7. Design System - Scoped to .ew-root to avoid theme collisions. - Colors: Deep obsidian (#0B0E14, #121721), stone gray (#1E2533, #2A3447), burnished gold (#D4AF37, #F3E5AB, #996515). - Fonts: Monumental serif headings (Cinzel/Spectral), clean sans-serif body. Generate all code files following this structure, ensure syntax validity, and package into the final plugin ZIP.

landing.php
landing.php

Comments (0)

No comments yet. Be the first!

Project Tasks

129 tasks
#1

Generate system requirement document

1m 27s0.2 cr used
Done
#2

Generate personas & user flows

1m 6s0.2 cr used
Done
#7

Create flow for Visitor

1m 3sCredits in parent
Done
#8

Create flow for Carver

1m 3sCredits in parent
Done
#9

Create flow for Administrator

1m 3sCredits in parent
Done
#10

landing.php

Credits in subtasks
Cancelled
#20

landing.php

14m 5sCredits in subtasks
Done
#39

Fix landing.php review findings: Q1 as reviewed now: `Landing Teaser Wall.jsx` still maps… (+1 more)

1m 37s0.4 cr used
Error
#38

Fix landing.php review finding: Q1 as reviewed now: `Landing Teaser Wall.jsx` still renders…

4m 59s0.4 cr used
Done
#37

Fix landing.php review findings: Q1 as reviewed now: The wall now renders only confirmed… (+1 more)

1m 57s0.4 cr used
Done
#36

Fix landing.php review finding: frontend/src/components/Landing Teaser Wall.jsx and…

2m 0s0.4 cr used
Done
#32

landing.php / Navigation

0m 28s0.85 cr used
Done
#28

landing.php / Landing Teaser Wall

1m 0s0.85 cr used
Done
#29

landing.php / Landing Counter Gauge

0m 33s0.85 cr used
Done
#30

landing.php / Landing Specification Panel

0m 29s0.85 cr used
Done
#31

landing.php / Landing Pay To Enter Cta

0m 29s0.85 cr used
Done
#33

landing.php / Footer

0m 17s0.85 cr used
Done
#34

Navigation

0m 28sCredits in parent
Done
#35

Footer

0m 17sCredits in parent
Done
#42

landing.php

5m 9sCredits in subtasks
Done
#52

Fix landing.php review finding: Q1 as reviewed now: The mobile specification panel and CTA…

0m 40s0.4 cr used
Done
#51

Fix landing.php review findings: The landing composition does not match the explicit… (+2 more)

0m 54s0.4 cr used
Done
#43

landing.php / Navigation

Not recorded0.85 cr needed
Done
#44

landing.php / Landing Teaser Wall

0m 32s0.85 cr needed
Done
#45

landing.php / Landing Counter Gauge

0m 37s0.85 cr needed
Done
#46

landing.php / Landing Specification Panel

0m 28s0.85 cr needed
Done
#47

landing.php / Landing Pay To Enter Cta

0m 23s0.85 cr needed
Done
#48

landing.php / Footer

Not recorded0.85 cr needed
Done
#49

Navigation

0m 22sCredits in parent
Done
#50

Footer

0m 19sCredits in parent
Done
#11

auth.php

Credits in subtasks
Cancelled
#12

sealed.php

Credits in subtasks
Cancelled
#13

carve.php

Credits in subtasks
Cancelled
#14

wall.php

Credits in subtasks
Cancelled
#15

Dashboard

Credits in subtasks
Cancelled
#16

Settings

Credits in subtasks
Cancelled
#17

Inscriptions

Credits in subtasks
Cancelled
#21

auth.php

Credits in subtasks
Cancelled
#22

Dashboard

Credits in subtasks
Cancelled
#23

Settings

Credits in subtasks
Cancelled
#24

Inscriptions

Credits in subtasks
Cancelled
#25

wall.php

Credits in subtasks
Cancelled
#26

carve.php

Credits in subtasks
Cancelled
#27

sealed.php

Credits in subtasks
Cancelled
#41

Design remaining pages

1m 33s0.2 cr used
Cancelled
#53

Retry Failed Pages

1m 33s0.4 cr used
Cancelled
#5

Architecture

0.2 cr needed
Cancelled
#54

Architecture

0.2 cr needed
Cancelled
#55

Create backend_modules diagram

1m 13sCredits in parent
Done
#56

Create er_diagram diagram

1m 13sCredits in parent
Done
#57

Create frontend_modules diagram

1m 12sCredits in parent
Done
#58

Create sequence diagram

1m 12sCredits in parent
Done
#59

Create service_network diagram

1m 12sCredits in parent
Done
#6

Workspace task plan

0.2 cr needed
Cancelled
#60

Workspace task plan

4m 2s0.2 cr needed
Done
#61

Send Carvers to Chargily checkout and complete payment there

120 cr estimated
To Do
#62

Count inscription graphemes and quote the price server-side

100 cr estimated
To Do
#63

Chargily Pay v2 hosts checkout and returns payment status

60 cr estimated
To Do
#64

Activate the plugin and bootstrap its tables, routes, menu, and shortcode

100 cr estimated
To Do
#65

Configure and persist plugin settings with masked secret keys

100 cr estimated
To Do
#66

Gate the full wall and let Carvers search and auto-pan to a slab

120 cr estimated
To Do
#67

Quote, create the pending record, and open a Chargily checkout

120 cr estimated
To Do
#68

Block any update or delete of a confirmed inscription

100 cr estimated
To Do
#69

Navigate from inscription browser; Browse inscriptions read-only; Browse and inspect inscription records; Render read-only inscription browser; Guard confirmed inscriptions against

100 cr estimated
To Do
#70

Safely uninstall the plugin while preserving inscriptions; Browse inscriptions read-only; Filter or page through the inscription record list; Create inscriptions table on activatio

100 cr estimated
To Do
#71

Provision inscription schema and immutability triggers on activation; Create webhook events table on activation

100 cr estimated
To Do
#72

Load and retry the inscription record list; Browse inscriptions; Render read-only inscription records; Inspect an inscription's details; Block modification or deletion of confirmed

100 cr estimated
To Do
#73

Sealed-wall access check; Render sealed gatekeeper after Carver access denial; Attempt full-wall access without a confirmed paid permanent inscription; Determine full wall access

100 cr estimated
To Do
#74

Idempotently finalize inscription from webhook; Finalize paid inscription and assign sequential number

100 cr estimated
To Do
#75

Finalize paid inscription; Handle Chargily webhook validation and status-fetch failures

100 cr estimated
To Do
#76

Render sealed visitor landing page; View sealed pay-to-enter wall teaser and live counter; Display live carved-name counter; Display live inscribed-souls counter; Poll and display

100 cr estimated
To Do
#77

Let visitors create an account or sign in

120 cr estimated
To Do
#78

Let administrators configure and save plugin settings

100 cr estimated
To Do
#79

Let visitors sign in with Google

100 cr estimated
To Do
#80

Open the full wall only to eligible users and admins

120 cr estimated
To Do
#81

Serve wall browsing, search, and access checks

120 cr estimated
To Do
#82

Register and log in visitors natively or via Google

120 cr estimated
To Do
#83

Show administrators counter stats and a Chargily connection test

80 cr estimated
To Do
#84

Quote, charge in DZD, and start checkout for a carving

140 cr estimated
To Do
#85

Expose the /me endpoint for a user's inscriptions and entitlement

80 cr estimated
To Do
#86

Finalize paid inscriptions from Chargily webhooks and assign sequential numbers

140 cr estimated
To Do
#87

Receive, verify, and replay-protect Chargily webhook events

140 cr estimated
To Do
#88

Zero-trust verification and idempotent finalization of paid inscriptions

160 cr estimated
To Do
#89

Gate the sealed wall and support search with auto-pan

120 cr estimated
To Do
#90

Admin dashboard counter statistics and Chargily connection test

100 cr estimated
To Do
#91

Verify the quote and create the pending checkout record

120 cr estimated
To Do
#92

Server-authoritative checkout with nonce and rate-limit protection

140 cr estimated
To Do
#93

Serve wall viewport and slab search data to Carvers

120 cr estimated
To Do
#94

Live carved-name counter and blurred teaser on the landing page

100 cr estimated
To Do
#95

Quote, create pending inscription, and open Chargily checkout

140 cr estimated
To Do
#96

Zero-trust webhook finalizes inscriptions once and keeps them permanent

160 cr estimated
To Do
#97

Server-authoritative quote and pending record for each inscription

120 cr estimated
To Do
#98

Nonce and rate-limit protection for key actions and payments

100 cr estimated
To Do
#99

Sealed wall access check and wall endpoint response

100 cr estimated
To Do
#100

Expose the live inscription count endpoint

60 cr estimated
To Do
#101

Configure payment, currency, and identity settings with masked secrets

100 cr estimated
To Do
#102

Create Chargily Pay v2 checkout and return the hosted payment URL

120 cr estimated
To Do
#103

Render the monument through the [eternal_wall] shortcode

80 cr estimated
To Do
#104

Establish application authentication for the monument

120 cr estimated
To Do
#105

Register Eternal Wall integration points with Word Press

100 cr estimated
To Do
#106

Dispatch the correct monument template from the shortcode

80 cr estimated
To Do
#107

Enforce sealed-wall authorization for the full wall

120 cr estimated
To Do
#108

Apply the scoped monument theme on page render

80 cr estimated
To Do
#109

Serve the /me endpoint so a carver can see their own inscriptions

100 cr estimated
To Do
#110

Block every attempt to change or remove a confirmed inscription

120 cr estimated
To Do
#111

Confirm payment status directly with Chargily before finalizing

120 cr estimated
To Do
#112

Let a visitor create an account with native Word Press sign-up

100 cr estimated
To Do
#113

Create the Chargily checkout and hand the carver a payment URL

120 cr estimated
To Do
#114

Offer Google sign-in as an alternative way to establish identity

120 cr estimated
To Do
#115

Install and activate the plugin ZIP on a Word Press site

80 cr estimated
To Do
#116

Open the plugin's Settings surface in Word Press admin

80 cr estimated
To Do
#117

Install and activate the Eternal Wall plugin

120 cr estimated
To Do
#118

Run plugin deactivation hooks cleanly

60 cr estimated
To Do
#119

Register the admin menu and its assets

80 cr estimated
To Do
#120

Rely on Word Press core host services

40 cr estimated
To Do
#121

Save and persist plugin settings

100 cr estimated
To Do
#122

Complete payment on Chargily's hosted surface

80 cr estimated
To Do
#123

Define the abstract payment gateway interface

60 cr estimated
To Do
#124

Serve Carver REST requests

120 cr estimated
To Do
#125

Bootstrap the plugin once per request and wire its components

100 cr estimated
To Do
#126

Render the correct template for each visitor state from the shortcode

100 cr estimated
To Do
#127

Connect the landing page to the live counter and teaser lens

120 cr estimated
To Do
#128

Build the sealed interactive wall with pan, zoom, search, and access gating

140 cr estimated
To Do
#129

Build the admin settings form with masked secret keys

100 cr estimated
To Do
#130

Build the admin dashboard with counter stats and Chargily connection test

80 cr estimated
To Do
#131

Build the sealed gatekeeper page for denied wall access

80 cr estimated
To Do
#132

Build the authentication page with native login, sign-up, and Google OAuth

120 cr estimated
To Do
#133

Build the carve room where a Carver composes and pays for an inscription

140 cr estimated
To Do
#134

Build the read-only Inscriptions browser for administrators

120 cr estimated
To Do
landing.php design preview
landing.php: View teaser and counter
auth.php: Sign in as admin
Dashboard: View counter stats
Dashboard: Run connection test
Settings: Configure Chargily keys
Settings: Set DZD rate
Settings: Save settings
Dashboard: Retest connection
Inscriptions: Browse inscriptions
wall.php: View full wall
wall.php: Search by name
landing.php design preview
landing.php: View teaser and counter
auth.php: Sign in as admin
Dashboard: View counter stats
Dashboard: Run connection test
Settings: Configure Chargily keys
Settings: Set DZD rate
Settings: Save settings
Dashboard: Retest connection
Inscriptions: Browse inscriptions
wall.php: View full wall
wall.php: Search by name