Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/16/2026 in all areas

  1. https://github.com/mxmsmnv/Context/commit/1d94aaaf87869b869aff5ec9f7d1f1dea5872437 Adding support .toon files @Peter Knight you may try
    4 points
  2. A 100% protection is impossible in a browser environment, what a browser can show has to be local. But you can make it less easy to "steal" the files with preventing direct access and hotlinking to font files <FilesMatch "\.(woff|woff2)$"> RewriteEngine On RewriteCond %{HTTP_REFERER} !^https?://(www\.)?yourdomain\.com [NC] RewriteRule .* - [F] </FilesMatch> The most effective way to protect a font is to make it "incomplete" for anyone who steals it. By using the fonttools library (specifically pyftsubset), you can strip away all characters that aren't needed for your specific site. There is a little benefit too, the filesize shrinks πŸ˜‰
    3 points
  3. Export your ProcessWire site structure as comprehensive, AI-optimized documentation for ChatGPT, Claude, Copilot, and other AI coding assistants. What It Does Context automatically generates complete documentation of your ProcessWire site in formats specifically optimized for working with AI: πŸ“Š Site Structure Complete page hierarchy exported as JSON, TOON, and ASCII tree Shows all relationships, templates, URLs, and metadata Smart collapsing for large page lists πŸ“‹ Templates & Fields All template definitions with complete field configurations Field types, options, requirements, default values Special handling for Repeater, Matrix, Table fields πŸ“¦ Content Samples Real page examples exported for each template Shows actual data formats and field usage Helps AI understand your content patterns πŸ’Ύ Code Snippets Customized selector patterns for your site type Helper functions and utility code API implementation examples πŸ€– AI Prompts Ready-to-use project context file Template creation prompts Debugging assistance prompts Session continuity templates πŸ–₯️ CLI Commands Export from command line for AI agents Query templates, fields, and pages directly Perfect for Claude Code, Cursor, Windsurf integration Dual Format Export (The Game Changer!) Context exports in two formats simultaneously: JSON Format Standard format for development tools, APIs, and compatibility TOON Format (AI-Optimized) ✨ Token-Oriented Object Notation designed specifically for AI prompts: 30-60% fewer tokens than JSON Significantly reduces API costs Same data, more compact representation No external dependencies - pure PHP Real Savings Example For a typical ProcessWire site with 50 templates: structure.json (15,000 tokens) β†’ structure.toon (8,500 tokens) = 43% savings templates.json (8,000 tokens) β†’ templates.toon (4,000 tokens) = 50% savings samples/*.json (12,000 tokens) β†’ samples/*.toon (6,500 tokens) = 46% savings Cost Impact (Claude Sonnet pricing): JSON export: $0.105 per AI interaction TOON export: $0.057 per AI interaction Save ~$5/month if you use AI assistants 100 times/month Installation cd /site/modules/ git clone https://github.com/mxmsmnv/Context.git Then in admin: Modules β†’ Refresh β†’ Install Or download from ProcessWire Modules Directory Quick Start Web Interface Setup β†’ Modules β†’ Context β†’ Configure Choose your site type (Blog, E-commerce, Business, Catalog, Generic) βœ… Enable "Export TOON Format" (recommended for AI work!) Enable optional features: βœ… Export Content Samples βœ… Create Code Snippets βœ… Create AI Prompts βœ… Generate SKILL.md for AI Agents Click "Export Context for AI" Files appear in /site/assets/cache/context/ CLI Interface # Full export php index.php --context-export # Export TOON format only (fastest, smallest) php index.php --context-export --toon-only # Query specific data php index.php --context-query templates php index.php --context-query fields php index.php --context-query pages "template=product, limit=10" # Quick stats php index.php --context-stats # Help php index.php --context-help Perfect for AI coding agents like Claude Code, Cursor, and Windsurf! Generated Files /site/assets/cache/context/ β”œβ”€β”€ README.md # Complete documentation β”œβ”€β”€ SKILL.md # AI agent skill definition β”œβ”€β”€ structure.json / .toon # Page hierarchy β”œβ”€β”€ structure.txt # ASCII tree β”œβ”€β”€ templates.json / .toon # All templates & fields β”œβ”€β”€ templates.csv # Templates in CSV β”œβ”€β”€ tree.json / .toon # Combined structure β”œβ”€β”€ config.json / .toon # Site configuration β”œβ”€β”€ modules.json / .toon # Installed modules β”œβ”€β”€ classes.json / .toon # Custom Page classes β”‚ β”œβ”€β”€ samples/ # Real content examples β”‚ β”œβ”€β”€ product-samples.json β”‚ └── product-samples.toon # 46% smaller! β”‚ β”œβ”€β”€ snippets/ # Code patterns β”‚ β”œβ”€β”€ selectors.php # Customized for your site type β”‚ β”œβ”€β”€ helpers.php # Utility functions β”‚ └── api-examples.php # REST API examples β”‚ └── prompts/ # AI instructions β”œβ”€β”€ project-context.md # Complete project overview β”œβ”€β”€ create-template.md # Template creation guide β”œβ”€β”€ create-api.md # API creation guide β”œβ”€β”€ debug-issue.md # Debugging helper └── project-summary.md # Session continuity template Using with AI Assistants Web Interface Upload Upload TOON files to save tokens and costs: πŸ“Ž structure.toon πŸ“Ž templates.toon πŸ“Ž prompts/project-context.md Then ask your AI assistant: "Help me create a blog post template with title, body, author, categories, and featured image. Follow the existing patterns from templates.toon" AI Coding Agents (Claude Code, Cursor, Windsurf) 1. Tell your agent to read the docs: Read /site/modules/Context/AGENTS.md 2. Agent can now export context: php index.php --context-export --toon-only 3. Agent queries specific data: php index.php --context-query templates 4. Agent reads exported files: Read SKILL.md, then structure.toon and templates.toon The AI has complete context of your site and can generate code that follows your exact patterns! Site Type Customization Code snippets automatically adapt to your site type: Blog / News / Magazine Post listings, author archives, category filtering Recent posts, popular content, related articles E-commerce / Online Store Product listings, cart logic, order processing Inventory management, payment integration Business / Portfolio / Agency Service pages, team members, case studies Testimonials, project galleries Catalog / Directory / Listings Brand hierarchies, category filters Advanced search, sorting, pagination Generic / Mixed Content General purpose patterns for any site type Features Overview Always Exported (Core) βœ… Complete page tree structure βœ… All templates with field definitions βœ… Site configuration and settings βœ… Installed modules list βœ… Custom Page classes βœ… README with complete documentation βœ… SKILL.md for AI agents Optional (Configurable) βš™οΈ Content samples (1-10 per template) βš™οΈ API JSON schemas βš™οΈ URL routing structure βš™οΈ Performance metrics βš™οΈ Code snippets library βš™οΈ AI prompt templates βš™οΈ Field definitions metadata Advanced Settings Auto-update on template/field changes Custom export path (supports absolute paths) Maximum tree depth (3-20 levels) JSON children limit (prevent huge files) Compact mode for large lists Custom AI instructions CSS framework detection (or manual override) Why TOON Format? TOON is specifically designed for AI prompts. Here's the difference: JSON (verbose): { "products": [ {"id": 1, "title": "Dark Chocolate", "price": 12.99}, {"id": 2, "title": "Milk Chocolate", "price": 9.99} ] } TOON (compact): products[2]{id,title,price}: 1,Dark Chocolate,12.99 2,Milk Chocolate,9.99 Same data, 50% fewer tokens! Use Cases πŸ€– AI-Assisted Development Upload your site context to Claude/ChatGPT and get code that follows your exact patterns πŸ€– AI Coding Agents Claude Code, Cursor, Windsurf can export and query your site via CLI πŸ“š Developer Onboarding New team members get complete site documentation instantly πŸ”„ Site Migration Export complete site structure for documentation or migration planning πŸ“– Code Standards Maintain consistency across your team with AI that knows your patterns πŸ’° Cost Optimization Reduce AI API costs by 30-60% with TOON format πŸ” Session Continuity Maintain context between AI coding sessions with project-summary.md API Variable In your ProcessWire code: // Get Context module instance $context = wire('context'); // Programmatic export $context->executeExport(); // Get export path $path = $context->getContextPath(); Links GitHub: https://github.com/mxmsmnv/Context TOON Format Spec: https://toonformat.dev Screenshots Example Workflow Export your site Click one button or run php index.php --context-export Upload to AI Upload .toon files to Claude/ChatGPT for maximum efficiency Build features faster AI knows your exact site structure, templates, and patterns Save money Use 30-60% fewer tokens on every AI interaction Perfect for ProcessWire developers who use AI coding assistants! The TOON format support makes it significantly more cost-effective to work with Claude, ChatGPT, and similar tools. Now with CLI support for seamless AI agent integration! Questions? Suggestions? Let me know! πŸš€
    2 points
  4. Hi everyone! I've built AiWire β€” a module that connects ProcessWire to AI providers (Anthropic, OpenAI, Google, xAI, OpenRouter). GitHub: https://github.com/mxmsmnv/AiWire What it does $ai = $modules->get('AiWire'); // Simple call echo $ai->chat('What is ProcessWire?'); // Generate multiple fields at once $ai->generate($page, [ ['field' => 'ai_overview', 'prompt' => "Write overview..."], ['field' => 'ai_seo_meta', 'prompt' => "Generate meta..."], ], ['cache' => 'W']); // Auto-fallback if provider fails $result = $ai->askWithFallback('Translate this...', [ 'provider' => 'anthropic', 'fallbackProviders' => ['openai', 'google'], ]); Main features Multiple API keys per provider with auto-failover Connection testing from admin Interactive Test Chat with parameter controls File cache with TTL (day/week/month/year) Save AI responses to page fields Multi-turn conversations Full docs with 25 real-world examples Requirements PHP 8.1+, ProcessWire 3.0.210+, cURL, and at least one API key. If you try it out, I'd love to hear your feedback β€” whether the API makes sense, if the docs are clear, or if you run into any issues. Thanks! πŸ™
    1 point
  5. Toon link. Less readable perhaps than JSON for humans but it’s created for and optimised for machines
    1 point
  6. @DrQuincy Please see this comment on the thread for my translation module and Google Cloud Translate. It appears that something did change and might be similar to your situation.
    1 point
  7. I don’t know how it will work in real work, as I never use AI assistants, as I prefer more flexible control, but I made a module with AI for AI. https://github.com/mxmsmnv/Context If there is an opportunity to test and give feedback, I will be glad!
    1 point
  8. RockCommerce from @bernhardcould also be a choice: https://www.baumrock.com/en/processwire/modules/rockcommerce/ It's open source meanwhile and has all features of a shop including cart and checkout by external payment provider. Out of the box it’s Mollie, but since it’s an interface class, you can add any other easily. We tested this module a while ago and it was really nice working with it πŸ‘ Also open source since a while is the well known ProcessWire Commerce (formerly β€œPadloper”) by @kongondo Because it was mentioned: StripePaymentLinks is not recommended when you need cart functionality. Cheers, Mike
    1 point
  9. I’m on Cursor Ultra and have been for some time. Even on Ultra I am frequently hitting my plan limits and while I don’t mind paying more, I’m going to rely less on the highest end models soon and start trying auto mode more. I’ll try to do more manual coding for the tasks I can do and stop leaning on agents for CSS changes etc.
    1 point
  10. Some updates to the Cursor MCP to Processwire Module. There's a new front-end called MCP Sync. So if the MCP server acted as a bridge between Processwire and Cursor, why do I then need a front-end UI? Surely the point of an MCP server was 50% to bypass the Admin? Well, apart from building it for fun, I thought it was nice to have a more visual front-end for the import and export of pages. From the screenshot you might notice a traditional tree view with some useful columns... Change Status Never exported - probably doesnt need a badge but just means it's the original state Local Changes - I've downloaded the page to a file and edited it In Sync - changes have been imported Conflict - both the remote (PW) and the local file) have changes In the Actions column the three icons are WTF (Wire to file) πŸ™‚ - exporting FTW (File to wire) - importing This was a little tricky because import and export mean different things wether you're operating from Curors MCP or import/export via the Cursor UI. So I settled on WTF and FTW because they are less relative to your environment. Big change Previously, when a page was in WTF mod,e I was storing a YAML file. Apart from Matrix items which were separate YAML files. But as we know, YAML can be prone to misformatting so the Module now understands if a field is a Rich Text field and will export that as a stand-alone HTML file with a match name. It means a few more files on the file system than the previous method, but I like that I get a separate HTML entity. The screenshot of my local file system you can see I have WTF my Diagram and Illustrations page. And not just because the content was out of date and mentioned Macromedia Flash! Back to the GUI, you can see a screenshot of that row now picks up the change requiring a FTW. There's a few other helpful functions such as a changes preview as a safety step prior to committing a FTW. There's also a View YAML icon on each row which is a preview too. Here's the raw details of my WTF of Diagram and Illustrations page site/assets/pw-mcp/services/diagrams-illustration/page.meta.json This is a high-level overview of the exported page and is not meant to be edited. { "_readme": "DO NOT EDIT - This file is auto-generated. Edit page.yaml and field HTML files instead.", "pageId": 1051, "canonicalPath": "/services/diagrams-illustration/", "template": "services-detail", "title": "Professional Diagram Design & Illustration Services", "pulledAt": "2026-02-11T11:27:58+00:00", "lastPushedAt": null, "revisionHash": "sha256:2c264809d740ff009e27a5c664b3dced0e529493e54f39c3b458a718d47defb4", "contentHash": "0fc046d624ae2a6add4f6ffbcd6b80dd", "status": "clean" } /site/assets/pw-mcp/services/diagrams-illustration/page.yaml Note how the body field around line 4 or 5 is an RTE, so it's not included in the raw YAML but saved as a standalone file. fields: title: "Professional Diagram Design & Illustration Services" body_summary: "Need to clarify a product, process or service? Clarify your offering with our diagram design services." body: _file: fields/body.html image: [] service_thumbnail: - filename: icon-service-diagrams.png description: null width: 173 height: 113 seo_tab: null seo_title: "Professional Diagram Design & Illustration Services" seo_keywords: null seo_description: Transform complex ideas into clear, compelling diagrams. We create technical illustrations, infographics, and process diagrams that simplify your message and engage your audience. seo_image: null seo_custom: null seo_canonical: null seo_tab_END: null First_Child_Redirect: 0 sitemap_ignore: 0 site/assets/pw-mcp/services/diagrams-illustration/fields/body.html Just a html page and not worth including That's it for the mo.
    1 point
Γ—
Γ—
  • Create New...