Functional Requirements

CMD Pro Functional Requirements

A Comprehensive Specification of System Capabilities
๐Ÿ“… Last Updated: August 2026 โฑ๏ธ Reading Time: 12 minutes
The following functional requirements are categorized by key user areas. They are derived from common practices in data analysis and WordPress plugins, ensuring that CMD Pro delivers a robust, user-friendly, and feature-rich experience for commodity market intelligence.

8.1. ๐Ÿ“‹ Requirement Priority Classifications

Priority Label Description Release Target
P0 Must-Have Essential for core functionality; release cannot proceed without it v4.0
P1 Should-Have Important features that add significant value v4.0 / v4.1
P2 Could-Have Desirable features that enhance the product v5.0+
P3 Nice-to-Have Future enhancements for later releases v6.0+

8.2. ๐Ÿงฉ Module Structure Overview

๐Ÿ“ฆ FUNCTIONAL REQUIREMENTS MODULES
๐Ÿ–ฅ๏ธ MODULE A: DASHBOARD
A1 Display Live Prices A2 Market Overview A3 Price Cards A4 Ticker Feed A5 Responsive Design A6 Market Insights A7 Embedding A8 Time Zone Support
โ–ผ
๐Ÿ“Š MODULE B: CHARTS
B1 Price Charts B2 Time Range Filters B3 Interactive Features B4 Multiple Chart Types B5 Multi-Commodity Comparison B6 Export Chart Data
โ–ผ
๐Ÿ”” MODULE C: ALERTS
C1 Price Alerts C2 Alert Types C3 Notification Channels C4 Alert Management C5 Alert History C6 Cooldown Periods
โ–ผ
๐Ÿ”Œ MODULE D: API & DATA INTEGRATION
D1 Data Sources D2 API Key Management D3 Data Fetching & Refresh D4 Data Validation D5 Fallback Mechanisms D6 Data Export
โ–ผ
โš™๏ธ MODULE E: ADMIN & CONFIGURATION
E1 Admin Settings Panel E2 Commodity Management E3 Currency & Exchange Rates E4 Manual Data Entry E5 User Management E6 System Status E7 Logging & Audit E8 Backup & Restore

8.3. Module A: Dashboard

The Dashboard module is the primary user-facing component of CMD Pro. It provides the visual interface for displaying commodity market data, including live prices, charts, and market insights.

8.3.1. A1: Display Live Prices

ID Requirement Priority Release
A1.01The system shall display current commodity prices in both USD and PKR (per Maund) on the dashboard.P0v4.0
A1.02The system shall display the price for at least the following core commodities: Cotton Limit, Cottonseed Oil, and Sugar.P0v4.0
A1.03The system shall display the price unit (e.g., USD/lb, USD/ton) alongside each commodity price.P0v4.0
A1.04The system shall display the timestamp of the last price update for each commodity.P0v4.0
A1.05The system shall display price change indicators (up/down arrows) with percentage change values.P0v4.0
A1.06The system shall use color-coded indicators (green for positive change, red for negative change).P0v4.0
A1.07The system shall support the display of additional commodities beyond the core set (configurable).P1v4.1
A1.08The system shall support the display of commodity-specific metadata (e.g., exchange, contract month).P2v5.0

8.3.2. A2: Market Overview

ID Requirement Priority Release
A2.01The system shall display a market overview banner summarizing key market conditions.P1v4.1
A2.02The system shall display the market open/closed status for major exchanges.P1v4.1
A2.03The system shall display key market metrics including high, low, and average prices.P1v4.1
A2.04The system shall display a market sentiment indicator (bullish, bearish, neutral).P2v5.0
A2.05The system shall display top gainers and losers among tracked commodities.P2v5.0

8.3.3. A3: Price Cards

ID Requirement Priority Release
A3.01The system shall display each commodity’s price in a distinct card layout.P0v4.0
A3.02The system shall display the following on each price card: commodity name, USD price, PKR price, price change percentage, and timestamp.P0v4.0
A3.03The system shall support configurable price card layouts (e.g., compact, expanded, detailed).P2v4.1
A3.04The system shall allow users to click on a price card to view detailed information.P1v4.1
A3.05The system shall support color-coded price cards based on performance (e.g., positive = green border, negative = red border).P2v4.1

8.3.4. A4: Ticker Feed

ID Requirement Priority Release
A4.01The system shall display a scrolling ticker feed of live commodity prices on the dashboard.P1v4.1
A4.02The system shall support configurable ticker speed (slow, medium, fast).P1v4.1
A4.03The system shall allow administrators to select which commodities appear in the ticker feed.P1v4.1
A4.04The system shall display price change indicators within the ticker (up/down arrows).P1v4.1
A4.05The system shall support AJAX-based auto-refresh of the ticker feed.P1v4.1
A4.06The system shall support WebSocket-based real-time updates for the ticker (future enhancement).P3v6.0
A4.07The system shall be configurable to display the ticker in either horizontal or vertical layout.P2v5.0

8.3.5. A5: Responsive Design

ID Requirement Priority Release
A5.01The system’s dashboard shall be fully responsive and adapt to all screen sizes (desktop, tablet, mobile).P0v4.0
A5.02The system shall display a mobile-optimized view on devices with screen widths less than 768px.P0v4.0
A5.03The system’s price cards shall stack vertically on mobile devices.P0v4.0
A5.04The system’s charts shall be touch-friendly on mobile devices (pinch to zoom, swipe).P1v4.1
A5.05The system’s ticker shall be readable and functional on mobile devices.P1v4.1
A5.06The system shall support responsive typography that scales appropriately on all devices.P1v4.0

8.3.6. A6: Market Insights

ID Requirement Priority Release
A6.01The system shall display market insights and commentary alongside price data.P2v5.0
A6.02The system shall display contextual market insights including: “Watch cotton futures,” “Monitor exchange rate,” “Track crop reports.”P2v5.0
A6.03The system shall display market volatility indicators.P2v5.0
A6.04The system shall display key support and resistance levels for each commodity.P3v6.0
A6.05The system shall display seasonal pattern indicators.P3v6.0

8.3.7. A7: Embedding (Shortcode, Block, Widget)

ID Requirement Priority Release
A7.01The system shall provide a WordPress shortcode [cmd_pro_dashboard] to embed the dashboard on any page or post.P0v4.0
A7.02The system shall provide a Gutenberg block for embedding the dashboard within the block editor.P0v4.0
A7.03The system shall provide a WordPress widget for adding the dashboard to widgetized areas of the theme.P1v4.0
A7.04The system shall support shortcode attributes for customization (e.g., [cmd_pro_dashboard commodities="cotton,sugar"]).P1v4.1
A7.05The system shall support multiple instances of the dashboard on the same page.P2v4.1
A7.06The system shall provide a PHP function cmdp_render_dashboard() for developers to embed programmatically.P1v4.0

8.3.8. A8: Time Zone Support

ID Requirement Priority Release
A8.01The system shall display all timestamps in the site’s configured timezone (WordPress timezone).P0v4.0
A8.02The system shall support configurable timezone display for users in different regions.P2v5.0
A8.03The system shall display the exchange timezone alongside price data where applicable.P2v5.0

8.4. Module B: Charts

The Charts module provides interactive price trend visualization, enabling users to analyze historical price movements and identify patterns.

8.4.1. B1: Price Charts

ID Requirement Priority Release
B1.01The system shall display an interactive price chart for each commodity on the dashboard.P0v4.0
B1.02The system shall use Chart.js (or a similar modern charting library) for chart rendering.P0v4.0
B1.03The system shall display historical price data as a line chart by default.P0v4.0
B1.04The system shall allow toggling between different data series (e.g., USD price, PKR price).P1v4.1
B1.05The system shall support multiple chart types including line, area, and candlestick charts.P2v5.0
B1.06The system shall display key metrics on the chart including high, low, current, and change.P1v4.0
B1.07The system shall display the chart legend showing available data series.P1v4.0
B1.08The system’s charts shall be color-coded using the CMD Pro color palette.P0v4.0

8.4.2. B2: Time Range Filters

ID Requirement Priority Release
B2.01The system shall support configurable time ranges for chart display.P0v4.0
B2.02The system shall provide at least the following time range options: 7 days, 30 days, 90 days, 1 year.P0v4.0
B2.03The system shall support custom date range selection.P2v5.0
B2.04The system shall support time range options: 1 hour, 6 hours, 24 hours (intraday data).P2v5.0
B2.05The system shall support time range options: 5 years, 10 years (long-term historical data).P2v6.0
B2.06The system shall persist user-selected time range preferences.P2v5.0

8.4.3. B3: Interactive Features

ID Requirement Priority Release
B3.01The system’s charts shall support hover tooltips showing exact values at data points.P0v4.0
B3.02The system’s charts shall support zoom and pan functionality for detailed analysis.P1v4.1
B3.03The system’s charts shall support clicking on data points to view detailed information.P2v4.1
B3.04The system’s charts shall support drag-to-select for zooming into specific date ranges.P2v5.0
B3.05The system’s charts shall support keyboard navigation for accessibility.P2v5.0

8.4.4. B4: Multiple Chart Types

ID Requirement Priority Release
B4.01The system shall support line chart type for price trends (default).P0v4.0
B4.02The system shall support area chart type for cumulative price movement.P1v4.1
B4.03The system shall support candlestick chart type for advanced price analysis.P2v5.0
B4.04The system shall support bar chart type for volume analysis.P2v5.0
B4.05The system shall allow users to switch between chart types via a dropdown selector.P1v4.1

8.4.5. B5: Multi-Commodity Comparison

ID Requirement Priority Release
B5.01The system shall support displaying multiple commodities on the same chart for comparison.P2v5.0
B5.02The system shall allow users to select which commodities to compare.P2v5.0
B5.03The system shall support normalization of price scales for accurate comparison.P2v5.0
B5.04The system shall support correlation analysis between commodities.P3v6.0

8.4.6. B6: Export Chart Data

ID Requirement Priority Release
B6.01The system shall allow exporting chart data to CSV format.P2v5.0
B6.02The system shall allow exporting chart data to Excel format.P2v5.0
B6.03The system shall allow exporting chart data to JSON format for API integration.P2v5.0
B6.04The system shall allow exporting the chart image to PNG format.P2v5.0

8.5. Module C: Alerts

The Alerts module enables users to set custom price alerts and receive notifications when market conditions meet their criteria.

8.5.1. C1: Price Alerts

ID Requirement Priority Release
C1.01The system shall allow users to set custom price alerts for any tracked commodity.P1v5.0
C1.02The system shall trigger alerts when price thresholds are met or exceeded.P1v5.0
C1.03The system shall support alerts in both USD and PKR price types.P1v5.0
C1.04The system shall allow users to set alerts for percentage changes over specified periods.P1v5.0
C1.05The system shall allow users to set alerts for breakout/breakdown of support/resistance levels.P2v5.0
C1.06The system shall allow users to set alerts for specific exchange or contract month.P2v5.0

8.5.2. C2: Alert Types

ID Requirement Priority Release
C2.01The system shall support “Price Above X” alert type.P1v5.0
C2.02The system shall support “Price Below X” alert type.P1v5.0
C2.03The system shall support “Percentage Change X%” alert type.P1v5.0
C2.04The system shall support “Breakout” alert type (price above high).P2v5.0
C2.05The system shall support “Breakdown” alert type (price below low).P2v5.0
C2.06The system shall support “SMA Crossover” alert type (future enhancement).P3v6.0

8.5.3. C3: Notification Channels

ID Requirement Priority Release
C3.01The system shall send alerts via email to the user’s registered email address.P1v5.0
C3.02The system shall display alerts in the WordPress admin dashboard.P1v5.0
C3.03The system shall send alerts via SMS (requires SMS gateway integration).P2v5.0
C3.04The system shall send push notifications via mobile app (requires mobile app integration).P2v6.0
C3.05The system shall support webhook notifications for external integrations.P2v5.0
C3.06The system shall support in-dashboard notification center.P1v5.0

8.5.4. C4: Alert Management

ID Requirement Priority Release
C4.01The system shall provide an alert management interface for users to create, edit, and delete alerts.P1v5.0
C4.02The system shall display a list of all user-created alerts with their status (active/inactive).P1v5.0
C4.03The system shall allow users to enable/disable alerts without deleting them.P1v5.0
C4.04The system shall allow users to set alert expiration dates.P2v5.0
C4.05The system shall display alert history showing past triggered alerts.P1v5.0

8.5.5. C5: Alert History

ID Requirement Priority Release
C5.01The system shall maintain a history of all triggered alerts for each user.P1v5.0
C5.02The system shall display the timestamp, commodity, alert type, and triggered price for each alert.P1v5.0
C5.03The system shall allow users to filter alert history by date range and commodity.P2v5.0
C5.04The system shall allow users to export alert history.P2v5.0

8.5.6. C6: Cooldown Periods

ID Requirement Priority Release
C6.01The system shall implement cooldown periods to prevent alert fatigue.P1v5.0
C6.02The system shall allow users to configure cooldown periods per alert (e.g., 1 hour, 24 hours).P1v5.0
C6.03The system shall set a default cooldown period of 24 hours for all alerts.P1v5.0
C6.04The system shall allow users to bypass cooldown for critical alerts.P2v5.0

8.6. Module D: API & Data Integration

The API & Data Integration module handles all external data communication, including fetching commodity prices, exchange rates, and managing data sources.

8.6.1. D1: Data Sources

ID Requirement Priority Release
D1.01The system shall support at least one external commodity data API for fetching live prices.P0v5.0
D1.02The system shall support multiple data sources with automatic failover (primary, secondary, tertiary).P1v5.0
D1.03The system shall support manual data entry as a fallback when APIs are unavailable.P0v4.0
D1.04The system shall support the demo provider for testing and demonstration purposes.P0v4.0
D1.05The system shall support data source prioritization and selection.P1v5.0
D1.06The system shall support adding custom data sources (future enhancement).P2v6.0

8.6.2. D2: API Key Management

ID Requirement Priority Release
D2.01The system shall provide an interface for administrators to enter and manage API keys.P0v5.0
D2.02The system shall encrypt API keys before storing them in the database.P0v5.0
D2.03The system shall validate API keys before saving them (test call to API).P0v5.0
D2.04The system shall support multiple API keys per data source for redundancy.P1v5.0
D2.05The system shall notify administrators when API keys are about to expire.P2v5.0

8.6.3. D3: Data Fetching & Refresh

ID Requirement Priority Release
D3.01The system shall fetch commodity prices from external APIs at configurable intervals.P0v5.0
D3.02The system shall support configurable refresh intervals (e.g., 1 min, 5 min, 15 min, 30 min, 1 hour).P0v5.0
D3.03The system shall support scheduled data fetching using WordPress cron (wp_schedule_event).P0v5.0
D3.04The system shall support on-demand data fetching via manual refresh button.P0v4.0
D3.05The system shall implement rate limiting to respect API provider limits.P0v5.0
D3.06The system shall implement exponential backoff for failed API requests.P1v5.0

8.6.4. D4: Data Validation

ID Requirement Priority Release
D4.01The system shall validate all incoming data from external APIs against expected schemas.P0v5.0
D4.02The system shall validate price values to ensure they are within reasonable ranges.P0v5.0
D4.03The system shall log validation failures for debugging and audit purposes.P1v5.0
D4.04The system shall reject data that fails validation and retain the previous valid data.P1v5.0
D4.05The system shall validate exchange rates to ensure they are within reasonable ranges.P1v5.0

8.6.5. D5: Fallback Mechanisms

ID Requirement Priority Release
D5.01The system shall automatically switch to a secondary data source if the primary source fails.P1v5.0
D5.02The system shall use cached data if all data sources are unavailable.P1v5.0
D5.03The system shall display a warning banner when using fallback data sources.P1v5.0
D5.04The system shall log all fallback events for monitoring and troubleshooting.P1v5.0
D5.05The system shall automatically retry failed API calls after the fallback is resolved.P2v5.0

8.6.6. D6: Data Export

ID Requirement Priority Release
D6.01The system shall support exporting historical price data to CSV format.P2v5.0
D6.02The system shall support exporting historical price data to Excel format.P2v5.0
D6.03The system shall support exporting historical price data to JSON format.P2v5.0
D6.04The system shall support scheduled data exports.P3v6.0

8.7. Module E: Admin & Configuration

The Admin & Configuration module provides administrators with the tools to configure the plugin, manage commodities, and maintain the system.

8.7.1. E1: Admin Settings Panel

ID Requirement Priority Release
E1.01The system shall provide a dedicated admin settings page within the WordPress admin area.P0v4.0
E1.02The system shall organize settings into logical sections (e.g., General, API, Display, Advanced).P0v4.0
E1.03The system shall include a settings page for configuring API keys and data sources.P0v5.0
E1.04The system shall include a settings page for configuring currency and exchange rates.P0v4.0
E1.05The system shall include a settings page for configuring display options (colors, layout, etc.).P1v4.1
E1.06The system shall include a settings page for configuring alert defaults.P1v5.0
E1.07The system shall include a settings page for system status and troubleshooting.P1v4.0
E1.08The system shall use WordPress Settings API for all settings pages.P0v4.0
E1.09The system shall use WordPress nonces for all admin forms for security.P0v4.0
E1.10The system shall validate all user input on settings pages before saving.P0v4.0

8.7.2. E2: Commodity Management

ID Requirement Priority Release
E2.01The system shall provide an interface for administrators to add, edit, and delete commodities.P0v4.0
E2.02The system shall allow administrators to configure the following for each commodity: code, name, unit, conversion factor.P0v4.0
E2.03The system shall allow administrators to enable/disable specific commodities on the dashboard.P0v4.0
E2.04The system shall support pre-defined commodity templates for common commodities (cotton, oilseed, sugar).P0v4.0
E2.05The system shall allow administrators to set custom display names for commodities.P1v4.1
E2.06The system shall support importing and exporting commodity configurations.P2v5.0

8.7.3. E3: Currency & Exchange Rates

ID Requirement Priority Release
E3.01The system shall allow administrators to set a base currency for price display.P0v4.0
E3.02The system shall allow administrators to set the PKR/USD exchange rate manually.P0v4.0
E3.03The system shall support automatic exchange rate fetching from external APIs.P1v5.0
E3.04The system shall support multiple currencies (USD, PKR, INR, AED, etc.).P1v5.0
E3.05The system shall support the Maund unit conversion (1 Maund = 37.324 kg = 82.28 lb).P0v4.0
E3.06The system shall support other local units (e.g., Bale, Quintal) for different markets.P2v5.0
E3.07The system shall display currency symbols according to the selected currency.P1v4.0

8.7.4. E4: Manual Data Entry

ID Requirement Priority Release
E4.01The system shall provide an interface for administrators to manually enter commodity prices.P0v4.0
E4.02The system shall allow administrators to enter prices in either USD or PKR.P0v4.0
E4.03The system shall automatically convert manual price entries to the appropriate currency.P0v4.0
E4.04The system shall support bulk price updates via CSV upload.P2v5.0
E4.05The system shall log all manual price entries for audit purposes.P1v4.0
E4.06The system shall allow administrators to override API prices with manual entries.P1v4.0

8.7.5. E5: User Management

ID Requirement Priority Release
E5.01The system shall leverage WordPress user roles and capabilities for access control.P0v4.0
E5.02The system shall define custom capabilities for CMD Pro functions (e.g., cmdp_view_dashboard, cmdp_manage_settings, cmdp_create_alerts).P1v4.0
E5.03The system shall provide a user profile page for users to manage their preferences.P1v4.1
E5.04The system shall support user-specific dashboard preferences (e.g., favorite commodities).P2v5.0
E5.05The system shall support user-specific alert preferences.P1v5.0

8.7.6. E6: System Status

ID Requirement Priority Release
E6.01The system shall provide a system status page displaying the current state of all components.P1v4.0
E6.02The system shall display the status of API connections on the system status page.P1v5.0
E6.03The system shall display the status of cache on the system status page.P1v5.0
E6.04The system shall display the status of database tables on the system status page.P1v4.0
E6.05The system shall display the current plugin version and WordPress version.P0v4.0
E6.06The system shall display the last data update timestamp.P0v4.0
E6.07The system shall provide a system health check with recommendations.P2v5.0

8.7.7. E7: Logging & Audit

ID Requirement Priority Release
E7.01The system shall log all critical system events (price updates, settings changes, API errors).P1v4.0
E7.02The system shall log user actions (login, alert creation, settings changes).P1v5.0
E7.03The system shall provide a log viewer interface for administrators.P1v4.0
E7.04The system shall support log filtering by date, type, and user.P2v5.0
E7.05The system shall support log export for troubleshooting.P2v5.0
E7.06The system shall automatically rotate logs to prevent database bloat.P1v4.0

8.7.8. E8: Backup & Restore

ID Requirement Priority Release
E8.01The system shall allow administrators to export plugin configuration and settings.P2v5.0
E8.02The system shall allow administrators to import plugin configuration and settings.P2v5.0
E8.03The system shall support backup of commodity configurations.P2v5.0
E8.04The system shall support backup of user alert configurations.P2v5.0
๐Ÿ“Š

Requirements at a Glance

139 Functional Requirements
5 Core Modules
35 Dashboard Features
22 Alert Features
4 Planned Releases

8.8. ๐Ÿ“Š Functional Requirements Summary Matrix

๐Ÿ–ฅ๏ธ Dashboard 35 P0: 16 ยท P1: 11 ยท P2: 7 ยท P3: 1
๐Ÿ“Š Charts 21 P0: 6 ยท P1: 7 ยท P2: 7 ยท P3: 1
๐Ÿ”” Alerts 22 P0: 0 ยท P1: 15 ยท P2: 7 ยท P3: 0
๐Ÿ”Œ API & Data 22 P0: 11 ยท P1: 9 ยท P2: 2 ยท P3: 0
โš™๏ธ Admin & Config 39 P0: 19 ยท P1: 12 ยท P2: 8 ยท P3: 0
๐Ÿ“ฆ TOTAL 139 P0: 52 ยท P1: 54 ยท P2: 31 ยท P3: 2

8.9. ๐Ÿ”— Requirement Traceability Matrix (RTM)

Requirement ID Module Use Case Reference Test Case Reference
A1.01 Dashboard UC-01: Display Dashboard TC-101: Dashboard Display
A7.01 Dashboard UC-02: Shortcode Embedding TC-201: Shortcode Rendering
B1.01 Charts UC-03: View Charts TC-301: Chart Rendering
C1.01 Alerts UC-04: Create Alert TC-401: Alert Creation
D1.01 API & Data UC-05: Data Fetching TC-501: API Integration
E1.01 Admin & Config UC-06: Settings Configuration TC-601: Settings Page
โœ…

Functional Requirements Conclusion

The Functional Requirements presented in this section define the complete operational scope of CMD Pro. Organized into five core modules and 139 individual requirements, they establish a scalable development roadmap, support systematic implementation, and provide full traceability from business objectives to future releases. This specification serves as the primary reference for development, testing, and long-term product evolution.

โœ… Document Status: Approved for Development
๐Ÿ“‹ Requirements Version: 5.0
๐Ÿ“… Last Updated: August 2026
Don`t copy text!
Scroll to Top