|
| 1 | +# Mendix Web Widgets Repository - AI Agent Overview |
| 2 | + |
| 3 | +This document provides a comprehensive overview of the Mendix Web Widgets repository structure and conventions for AI development assistants. This repository contains the official collection of pluggable web widgets for the Mendix low-code platform. |
| 4 | + |
| 5 | +## Repository Overview |
| 6 | + |
| 7 | +The **Mendix Web Widgets** repository is the official home of all Mendix platform-supported pluggable web widgets and related modules. These are reusable UI components built with modern web technologies (React, TypeScript, SCSS) that integrate seamlessly into Mendix Studio Pro applications. |
| 8 | + |
| 9 | +### Key Characteristics |
| 10 | +- **Monorepo structure** using pnpm workspaces and Turbo for build orchestration |
| 11 | +- **Modern web stack**: TypeScript, React, SCSS, Jest, ESLint, Prettier |
| 12 | +- **Mendix integration**: Built using Mendix Pluggable Widgets API |
| 13 | +- **Atlas UI alignment**: Consistent with Mendix's design system |
| 14 | +- **Comprehensive testing**: Unit tests (Jest/RTL), E2E tests (Playwright) |
| 15 | + |
| 16 | +## Repository Structure |
| 17 | + |
| 18 | +``` |
| 19 | +├── packages/ |
| 20 | +│ ├── pluggableWidgets/ # Main widget packages (*-web folders) |
| 21 | +│ ├── modules/ # Mendix modules |
| 22 | +│ ├── customWidgets/ # Custom widget implementations |
| 23 | +│ └── shared/ # Shared configurations and utilities |
| 24 | +├── docs/ |
| 25 | +│ └── requirements/ # Detailed technical requirements (see below) |
| 26 | +├── automation/ # Build and release automation |
| 27 | +└── .github/ # GitHub workflows and Copilot instructions |
| 28 | +``` |
| 29 | + |
| 30 | +## Detailed Requirements Documentation |
| 31 | + |
| 32 | +The `/docs/requirements/` folder contains comprehensive technical documentation for understanding and contributing to this repository. Each document covers specific aspects of the development process: |
| 33 | + |
| 34 | +### Core Requirements and Guidelines |
| 35 | + |
| 36 | +- **[Project Requirements Document](docs/requirements/project-requirements-document.md)** - High-level overview of repository purpose, goals, target users, and design system alignment |
| 37 | +- **[Technology Stack and Project Structure](docs/requirements/tech-stack.md)** - Core technologies, monorepo structure, configuration standards, and development tools |
| 38 | +- **[Frontend Guidelines](docs/requirements/frontend-guidelines.md)** - CSS/SCSS styling guidelines, naming conventions, component best practices, and Atlas UI integration |
| 39 | + |
| 40 | +### Development Workflow and Integration |
| 41 | + |
| 42 | +- **[Application Flow and Widget Lifecycle](docs/requirements/app-flow.md)** - Complete widget development lifecycle from scaffolding to Studio Pro integration |
| 43 | +- **[Backend Structure and Data Flow](docs/requirements/backend-structure.md)** - Widget-to-Mendix runtime integration, data handling, and event management |
| 44 | +- **[Implementation Plan](docs/requirements/implementation-plan.md)** - Step-by-step guide for creating new widgets, including PR templates and testing requirements |
| 45 | + |
| 46 | +### Module Development |
| 47 | + |
| 48 | +- **[Widget to Module Conversion](docs/requirements/widget-to-module.md)** - Guidelines for converting widgets to Mendix modules when appropriate |
| 49 | + |
| 50 | +## Development Commands |
| 51 | + |
| 52 | +Key commands for working with this repository: |
| 53 | + |
| 54 | +- **`pnpm lint`** - Run linting across all packages |
| 55 | +- **`pnpm test`** - Run unit tests across all packages |
| 56 | +- **`pnpm build`** - Build all packages |
| 57 | +- **`pnpm -w changelog`** - Update changelogs |
| 58 | +- **`pnpm -w version`** - Bump versions across packages |
| 59 | + |
| 60 | +## AI Development Assistant Context |
| 61 | + |
| 62 | +### For Code Reviews and PR Analysis |
| 63 | +See [.github/copilot-instructions.md](.github/copilot-instructions.md) for detailed PR review guidelines, including: |
| 64 | +- Mendix-specific conventions and API usage |
| 65 | +- React best practices and performance considerations |
| 66 | +- Testing requirements (unit, component, E2E) |
| 67 | +- Styling guidelines and Atlas UI integration |
| 68 | +- Version management and changelog requirements |
| 69 | + |
| 70 | +### For Code Development |
| 71 | +When working on this repository, prioritize: |
| 72 | + |
| 73 | +1. **Minimal changes** - Make surgical, precise modifications |
| 74 | +2. **Mendix conventions** - Follow established patterns for XML configuration, TypeScript props, and data handling |
| 75 | +3. **Testing coverage** - Ensure unit tests, component tests, and E2E tests as appropriate |
| 76 | +4. **Atlas UI consistency** - Use Atlas classes and design tokens |
| 77 | +5. **Performance** - Consider React render optimization and Mendix data efficiency |
| 78 | + |
| 79 | +### Common Development Patterns |
| 80 | + |
| 81 | +- **Widget Structure**: Each widget has XML configuration, TypeScript component, SCSS styling, and test files |
| 82 | +- **Data Integration**: Use Mendix API objects (EditableValue, ActionValue, ListValue) correctly |
| 83 | +- **Styling**: Prefer Atlas UI classes over custom styles; use SCSS for widget-specific styling |
| 84 | +- **Testing**: Follow Jest + RTL for unit tests, Playwright for E2E testing |
| 85 | + |
| 86 | +## Getting Started |
| 87 | + |
| 88 | +1. **Prerequisites**: Node.js ≥22, pnpm 10.15.0 |
| 89 | +2. **Installation**: `pnpm install` |
| 90 | +3. **Development**: Set `MX_PROJECT_PATH` environment variable to your Mendix project |
| 91 | +4. **Building**: Use `pnpm build` or `pnpm start` for development builds |
| 92 | +5. **Testing**: Use `pnpm test` for unit tests, `pnpm e2e` for E2E tests |
| 93 | + |
| 94 | +For detailed implementation guidance, refer to the specific requirement documents linked above. |
0 commit comments