npx agentspec-cli install 19e67a5c-7a85-43af-b907-db78309e3f9f --file-type agents-md→ .agents/
# MP Custom Widgets - Agent Guide ## Build Commands - `npm run dev` - Build in development mode with watch - `npm run build` or `npm run prod` - Production build (outputs to dist/) - `npm run create-widget` - CLI to scaffold a new widget ## Testing No automated tests are configured in this project. ## Architecture - **Core Library**: JavaScript library built with Webpack that enables custom widgets for MinistryPlatform - **Entry Point**: src/index.js (builds to dist/js/customWidgetV1.js) - **Structure**: src/ contains Modules/ and Services/ for core functionality - **Widgets**: Individual widgets in Widgets/ directory (GroupFinder, MilestoneGamification, etc.) - **Templating**: Uses LiquidJS for widget templates - **Data Source**: Widgets connect to MinistryPlatform via stored procedures (prefixed with api_Custom_) ## Code Style - JavaScript (ES6+) with Babel transpilation - No TypeScript except CLI (cli/create-widget.ts) - Use existing service modules (TemplateService, APIService) found in src/Services/ - Widget HTML uses data attributes (data-component, data-sp, data-template, data-host, etc.) - Follow existing widget patterns in Widgets/ directory when creating new widgets - Console logs are preserved (drop_console: false in webpack config) - Source maps enabled for debugging ## CSS Framework (src/css/mp-custom.css) - **Custom CSS Framework**: Lightweight, Bootstrap-like framework with `mp-` prefix for all classes - **CSS Variables**: Customizable color scheme and spacing defined in `:root` (--mp-primary, --mp-secondary, etc.) - **Components**: Includes badges, buttons, alerts, forms, tables, avatars, and sacrament-specific styling - **Utility Classes**: Spacing (mp-m-*, mp-p-*), flexbox (mp-d-flex, mp-align-items-*), typography (mp-text-*) - **Layout**: Responsive container system (.mp-container) with breakpoints at 576px, 768px, 992px, 1200px - **Special Features**: Sacrament badges/icons, day-of-week badges forced to cobalt blue - **Responsive Design**: Mobile-first with media queries for responsive adjustments ## Widget Module (src/Modules/WidgetModule.js) - **Initialization**: WidgetModule.Init() finds all `[data-component="CustomWidget"]` elements and initializes them - **Authentication**: Checks localStorage for `mpp-widgets_AuthToken` and `mpp-widgets_ExpiresAfter` - **Data Attributes**: - Required: `data-component`, `data-host`, `data-sp` (or `data-useCalendar`) - Optional: `data-template`, `data-templateId`, `data-params`, `data-cache`, `data-requireUser`, `data-debug`, `data-authOverride` - **Host Configuration**: `data-host` must be church prefix ONLY (no http/https or domain) - **Parameters**: `data-params` must include `@` character for stored procedure parameters (unless using calendar) - **Calendar Mode**: Set `data-useCalendar="true"` to use MinistryPlatform Events API instead of stored procedure - **JSON Stored Procedures**: If stored procedure name ends with `_json`, automatically parses JsonResult column - **Events**: Dispatches `widgetLoaded` CustomEvent on both element and window with widgetId and data - **Reinit Methods**: `ReinitWidget(elementId)` and `ReinitAllWidgets()` for dynamic reloading
AGENTS.md - Miro PDF Viewer Development Guide
AI coding agent instructions for project conventions and guidelines.
by AgentHub Crawler
AGENTS.md
<!-- Keep this file under 120 lines. Every line loads into every session. --> <!-- Passive context > active retrieval. Put critical knowledge HERE, not in separate files. -->
by AgentHub Crawler
AI Agent Instructions for Dev Tools
Browser-first, privacy-friendly developer toolkit. All tools run client-side—no uploads, no accounts. Tools include JSON/YAML/CSS parsers, image converters, color utilities, SVG optimizer, and more.
by AgentHub Crawler
Sign in to leave a comment.
AGENTS.md
This document provides guidance for any AI agent working with code in this repository. Agents are expected to contribute to the project effectively and safely, based on the information provided below.
by AgentHub Crawler