Software Requirements Specification (SRS)
Dust Ranger Data Management System
Document Version: 1.0 Date: February 2026 Status: Final
Document Control
| Version | Date | Author | Description |
|---|---|---|---|
| 1.0 | February 2026 | Development Team | Initial SRS based on implemented system |
Table of Contents
- Introduction
- Overall Description
- Specific Requirements
- External Interface Requirements
- Non-Functional Requirements
- Feature Module Requirements
- Data Requirements
- Appendices
1. Introduction
1.1 Purpose
This Software Requirements Specification (SRS) document provides a comprehensive description of the functional and non-functional requirements for the Dust Ranger Data Management System. This document serves as the authoritative reference for:
- Development team members implementing and maintaining the system
- Quality assurance engineers designing test cases
- Technical architects making design decisions
- Project managers tracking feature completeness
1.2 Scope
The Dust Ranger Data Management System is a web-based environmental monitoring platform designed for mining operations. The system provides:
Core Capabilities:
- Real-time dust concentration monitoring across multiple mining sites
- Water truck fleet management and flow meter tracking
- Automated PDF report generation with statistical analysis
- Email scheduling and notification automation
- Role-based access control with granular permissions
- Geographic visualization through interactive heatmaps
- Asset tracking and operational status monitoring
System Boundaries:
- In Scope: Web application, database, authentication, reporting, email automation
- Out of Scope: Hardware device firmware, third-party scraper implementation, mobile native apps
1.3 Definitions, Acronyms, and Abbreviations
| Term | Definition |
|---|---|
| AWST | Australian Western Standard Time (UTC+8) |
| BOM | Bureau of Meteorology (Australia) |
| CSV | Comma-Separated Values file format |
| JWT | JSON Web Token for authentication |
| MC | Mass Concentration (µg/m³) |
| NC | Number Concentration (particles/cm³) |
| Portable Document Format | |
| PM | Particulate Matter (PM1.0, PM2.5, PM4.0, PM10) |
| RBAC | Role-Based Access Control |
| RLS | Row-Level Security (PostgreSQL feature) |
| SPA | Single Page Application |
| SRS | Software Requirements Specification |
| SDD | System Design Document |
1.4 References
| Document | Version | Description |
|---|---|---|
| System Design Document (SDD) | 2.0 | Technical architecture and design |
| CLAUDE.md | - | Project conventions and commands |
| IEEE 830-1998 | - | SRS standard format |
1.5 Overview
This document is organized according to IEEE 830 standard with adaptations for agile development:
- Section 2 provides overall system description and context
- Section 3 defines specific functional requirements
- Section 4 describes external interface requirements
- Section 5 specifies non-functional requirements
- Section 6 details requirements for each feature module
- Section 7 defines data requirements and constraints
- Appendices include data dictionary, traceability matrix, and glossary
2. Overall Description
2.1 Product Perspective
The Dust Ranger Data Management System operates as a self-contained web application with the following system context:
┌─────────────────────────────────────────────────────────────────────┐
│ EXTERNAL SYSTEMS │
├─────────────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ DustRanger │ │ Bureau of │ │ DeepSeek │ │
│ │ Devices │ │ Meteorology │ │ AI API │ │
│ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ External Scraper APIs │ │
│ │ • Dust Level Scraper • Flow Meter Scraper • Asset Scraper │ │
│ └──────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────┐
│ DUST RANGER DATA MANAGEMENT SYSTEM │
├─────────────────────────────────────────────────────────────────────┤
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ React 19 Frontend (SPA) │ │
│ │ Dashboard │ Dust Levels │ Flow Meter │ Reports │ Heatmap │ │
│ └────────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ Supabase Backend (Self-Hosted) │ │
│ │ PostgreSQL │ Auth │ Storage │ Edge Functions │ Realtime │ │
│ └────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────┐
│ END USERS │
├─────────────────────────────────────────────────────────────────────┤
│ Administrators │ Operations Managers │ Field Technicians │
└─────────────────────────────────────────────────────────────────────┘2.2 Product Functions
The system provides the following major functions:
| Function Category | Description |
|---|---|
| Data Collection | Automated scraping of dust levels, flow meter readings, and asset data |
| Data Visualization | Interactive charts, heatmaps, and statistical displays |
| Report Generation | PDF reports with charts, statistics, and AI-generated descriptions |
| Email Automation | Scheduled and recurring email notifications with attachments |
| User Management | Role-based access control with module and site permissions |
| Asset Tracking | Equipment monitoring, calibration tracking, and location management |
| Climate Integration | Weather data correlation for environmental context |
2.3 User Classes and Characteristics
2.3.1 Administrator
Description: System administrators with full access to all features and configuration.
Characteristics:
- Technical proficiency: High
- Frequency of use: Daily
- Primary tasks: User management, system configuration, troubleshooting
Permissions:
- Full access to all modules and sites
- User and group management
- System settings configuration
- Bypass row-level security
2.3.2 Operations Manager
Description: Site managers responsible for monitoring and reporting.
Characteristics:
- Technical proficiency: Medium
- Frequency of use: Daily
- Primary tasks: Report generation, data analysis, email scheduling
Typical Permissions:
- View all permitted modules
- Generate and manage reports
- Configure email schedules
- View activity logs
2.3.3 Field Technician
Description: On-site personnel collecting data and maintaining equipment.
Characteristics:
- Technical proficiency: Low to Medium
- Frequency of use: Weekly
- Primary tasks: Data upload, weekly reports, calibration records
Typical Permissions:
- View dust levels, flow meter, heatmap
- Create weekly reports
- Upload CSV data
- Record calibrations and refills
2.4 Operating Environment
Client Environment:
- Modern web browsers: Chrome 90+, Firefox 88+, Safari 14+, Edge 90+
- Minimum screen resolution: 1280x720
- Internet connection: 1 Mbps minimum
Server Environment:
- Oracle Cloud Infrastructure (Sydney region)
- Docker Compose deployment
- PostgreSQL 15.8 database
- Cloudflare CDN for static assets
2.5 Design and Implementation Constraints
| Constraint | Description | Impact |
|---|---|---|
| Database Row Limit | Supabase API returns max 1000 rows per query | Requires batch fetching for large datasets |
| Edge Function Timeout | 60 seconds maximum execution time | Long operations need chunking |
| Authentication Domain | Email restricted to @dustac.com.au | Limits user registration |
| Timezone Handling | Primary focus on AWST (UTC+8) | Date calculations must be timezone-aware |
| Browser Storage | LocalStorage limited to 10MB | Session data size constrained |
2.6 Assumptions and Dependencies
Assumptions:
- Users have stable internet connectivity
- DustRanger devices produce CSV files with consistent column structure
- External scraper APIs maintain backward compatibility
- Users receive basic training before production use
Dependencies:
- Supabase platform availability (self-hosted)
- External scraper API availability
- Bureau of Meteorology data feed
- DeepSeek AI API for chart descriptions
- QuickChart.io for server-side chart rendering
- Google Maps API for heatmap visualization
3. Specific Requirements
3.1 Functional Requirements Overview
This section defines the functional requirements organized by system capability. Each requirement is assigned a unique identifier for traceability.
Requirement ID Format: FR-[Category]-[Number]
| Category Code | Category Name |
|---|---|
| AUTH | Authentication |
| RBAC | Role-Based Access Control |
| DATA | Data Management |
| EXPORT | Data Export |
| SCRAPER | External Data Collection |
3.2 Authentication Requirements
FR-AUTH-001: Email/Password Authentication
Priority: High Description: The system shall support email/password authentication for user login.
Acceptance Criteria:
- Users can register with email and password
- Email domain restricted to @dustac.com.au
- Password must meet minimum security requirements
- Failed login attempts are logged
FR-AUTH-002: OAuth Authentication
Priority: Medium Description: The system shall support OAuth authentication via Azure and Google.
Acceptance Criteria:
- Users can authenticate via Azure AD
- Users can authenticate via Google
- OAuth tokens are securely stored
- Session persists across browser refreshes
FR-AUTH-003: JWT Session Management
Priority: High Description: The system shall use JWT tokens for session management.
Acceptance Criteria:
- Access tokens expire after configurable period
- Refresh tokens enable session renewal
- Tokens stored in localStorage with custom key
- Invalid tokens redirect to login page
FR-AUTH-004: Password Reset
Priority: High Description: The system shall provide password reset functionality.
Acceptance Criteria:
- Users can request password reset via email
- Reset links expire after 24 hours
- Password update requires current session or valid reset token
- Password history prevents reuse of recent passwords
FR-AUTH-005: Auth Token URL Handling
Priority: Medium Description: The system shall preserve auth tokens in URL hash for OAuth callbacks.
Acceptance Criteria:
- Auth tokens in URL hash are detected before Supabase processes
- SessionStorage stores pending auth state during redirects
- Tokens are cleared from URL after processing
3.3 Role-Based Access Control Requirements
FR-RBAC-001: User Roles
Priority: High Description: The system shall support two user roles: admin and user.
Acceptance Criteria:
- Admin role has full system access
- User role requires explicit permission grants
- Role is stored in user_profiles table
- Role changes take effect immediately
FR-RBAC-002: Module Permissions
Priority: High Description: The system shall enforce module-level access control.
Acceptance Criteria:
- Each module has can_view and can_edit permissions
- Permissions stored in user_module_permissions table
- UI elements hidden for unpermitted modules
- API requests blocked for unpermitted modules
Module List:
| Module ID | Module Name |
|---|---|
| dashboard | Dashboard |
| dust_levels | Dust Levels |
| flow_meter | Flow Meter |
| dust_ranger | Dust Ranger |
| reports | Reports |
| weekly_reports | Weekly Reports |
| email_schedules | Email Schedules |
| heatmap | Heatmap |
| assets | Assets |
| climate | Climate |
| settings | Settings |
| user_management | User Management |
FR-RBAC-003: Site Permissions
Priority: High Description: The system shall enforce site-level access control.
Acceptance Criteria:
- Each site has can_view and can_edit permissions per user
- Permissions stored in user_site_permissions table
- Data filtered by permitted sites in all queries
- Row-Level Security (RLS) enforces site permissions in database
FR-RBAC-004: User Groups
Priority: Medium Description: The system shall support user groups for bulk permission assignment.
Acceptance Criteria:
- Groups can be created with name and description
- Users can be assigned to multiple groups
- Groups can have module and site permissions
- Effective permissions = direct permissions ∪ group permissions
FR-RBAC-005: Permission Inheritance
Priority: Medium Description: The system shall merge direct and group permissions.
Acceptance Criteria:
- Permission source tracked: direct, group, both, or none
- Most permissive permission wins (OR logic)
- Permission changes propagate immediately
- Admin role bypasses all permission checks
3.4 Data Management Requirements
FR-DATA-001: Batch Data Fetching
Priority: High Description: The system shall support batch fetching for datasets exceeding 1000 records.
Acceptance Criteria:
- Queries automatically paginate when results exceed 1000
- All pages combined into single result set
- Progress indication for large fetches
- Timeout handling for very large datasets
FR-DATA-002: Timezone-Aware Calculations
Priority: High Description: The system shall handle timezone conversions correctly.
Acceptance Criteria:
- All timestamps stored with timezone information
- Date calculations use AWST (UTC+8) as primary timezone
- Dust levels stored with year/month/day fields to avoid parsing issues
- UI displays dates in user's local timezone
FR-DATA-003: Data Validation
Priority: High Description: The system shall validate all data on import.
Acceptance Criteria:
- CSV files validated before import
- Validation errors block import with clear messages
- Warnings logged but allow import to proceed
- Data type constraints enforced at database level
FR-DATA-004: Audit Logging
Priority: Medium Description: The system shall log all data changes for audit purposes.
Acceptance Criteria:
- Create, update, delete operations logged
- Log includes user ID, timestamp, and changed data
- Logs stored in sys_activity_logs table
- Logs retained for minimum 2 years
FR-DATA-005: Soft Delete Pattern
Priority: Medium Description: The system shall use soft delete for recoverable data.
Acceptance Criteria:
- Deleted records marked with deleted_at timestamp
- Soft-deleted records excluded from normal queries
- Admin can view and restore soft-deleted records
- Hard delete available for permanent removal
3.5 Data Export Requirements
FR-EXPORT-001: CSV Export
Priority: High Description: The system shall support CSV export with customizable fields.
Acceptance Criteria:
- Users can select fields to include in export
- Export respects current filters and date range
- Large exports use streaming to prevent timeout
- Filename includes date range and filter context
FR-EXPORT-002: PDF Report Generation
Priority: High Description: The system shall generate PDF reports with charts and statistics.
Acceptance Criteria:
- Reports include time series, hourly, and daily charts
- Statistics calculated: min, max, avg, median, std dev
- Sampling rate configurable (1-100%) for large datasets
- Reports stored in pdf-reports storage bucket
FR-EXPORT-003: Data Sampling
Priority: Medium Description: The system shall support data sampling for large exports.
Acceptance Criteria:
- Sampling rate configurable per export
- Sampling preserves data distribution
- Statistics calculated from full dataset before sampling
- Sampling method documented in export metadata
3.6 External Data Collection Requirements
FR-SCRAPER-001: Dust Level Scraper
Priority: High Description: The system shall collect dust level data via external scraper API.
Acceptance Criteria:
- Scraper triggered manually or on schedule
- Data validated before storage
- Scraper status tracked in scraper_task_runs table
- Errors logged with retry capability
FR-SCRAPER-002: Flow Meter Scraper
Priority: High Description: The system shall collect flow meter data via external scraper API.
Acceptance Criteria:
- Scraper triggered manually or on schedule
- Flow readings include litres dispensed and timestamp
- Duplicate detection prevents data duplication
- Site-specific scraper configuration supported
FR-SCRAPER-003: Heatmap Scraper
Priority: Medium Description: The system shall collect heatmap data via external scraper API.
Acceptance Criteria:
- Geographic coordinates included with readings
- Data stored in heatmap tables (data_heatmap)
- Scraper supports date range filtering
- Large datasets handled with pagination
FR-SCRAPER-004: Asset Scraper
Priority: Medium Description: The system shall collect asset data from SingleSourceIOT API.
Acceptance Criteria:
- Asset metadata synchronized periodically
- Location data updated with GPS coordinates
- Operational status tracked (operational, error, offline)
- Last contact time recorded for connectivity monitoring
4. External Interface Requirements
4.1 User Interfaces
UI-001: Responsive Web Interface
Description: The system shall provide a responsive web interface accessible from desktop and tablet devices.
Requirements:
- Support screen resolutions from 1280x720 to 4K
- Responsive layout adapts to screen size
- Touch-friendly controls for tablet use
- Consistent navigation across all pages
UI-002: Dashboard Layout
Description: The main dashboard shall display key metrics and system health indicators.
Layout Components:
- Header with navigation and user menu
- Collapsible sidebar with module navigation
- Main content area with metric cards
- Footer with version and status information
UI-003: Data Tables
Description: Data tables shall support sorting, filtering, and pagination.
Requirements:
- Column sorting (ascending/descending)
- Multi-column filtering
- Configurable page size (10, 25, 50, 100)
- Export to CSV from table view
- Column visibility toggle
UI-004: Charts and Visualizations
Description: The system shall display interactive charts for data visualization.
Chart Types:
- Time series line charts
- Bar charts (hourly/daily averages)
- Scatter plots (correlation analysis)
- Heatmaps (geographic distribution)
- Pie/donut charts (distribution analysis)
Interaction Features:
- Zoom and pan
- Tooltip on hover
- Legend toggle
- Date range selection
- Export to PNG/SVG
UI-005: Forms and Input
Description: Forms shall provide validation feedback and user guidance.
Requirements:
- Real-time validation feedback
- Required field indicators
- Error messages below fields
- Auto-save for long forms (weekly reports)
- Confirmation dialogs for destructive actions
4.2 Hardware Interfaces
HW-001: No Direct Hardware Interfaces
Description: The system does not interface directly with hardware devices.
Notes:
- DustRanger devices communicate via external scraper APIs
- Flow meters communicate via external scraper APIs
- Weather stations communicate via BOM API
- All hardware integration is abstracted through APIs
4.3 Software Interfaces
SW-001: Supabase Backend
Description: The system interfaces with Supabase for database, authentication, and storage.
| Interface | Protocol | Purpose |
|---|---|---|
| PostgREST API | HTTPS/REST | Database queries |
| GoTrue API | HTTPS/REST | Authentication |
| Storage API | HTTPS/REST | File upload/download |
| Realtime | WebSocket | Live updates |
SW-002: External Scraper APIs
Description: The system interfaces with external scraper services for data collection.
| Scraper | Endpoint | Data Type |
|---|---|---|
| Dust Level Scraper | Edge Function trigger | Dust concentration readings |
| Flow Meter Scraper | Edge Function trigger | Water usage readings |
| Heatmap Scraper | Edge Function trigger | Geographic dust data |
| Asset Scraper | SingleSourceIOT API | Asset metadata and locations |
SW-003: Bureau of Meteorology API
Description: The system interfaces with BOM for weather data.
Data Retrieved:
- Temperature (9am, 3pm)
- Rainfall
- Wind speed and direction
- Humidity
- Atmospheric pressure
SW-004: DeepSeek AI API
Description: The system interfaces with DeepSeek V3.2 for AI-powered chart descriptions.
Usage:
- Generate natural language descriptions of chart data
- Identify trends and anomalies
- Provide insights for reports
SW-005: QuickChart.io API
Description: The system interfaces with QuickChart.io for server-side chart rendering.
Usage:
- Generate PNG images of charts for PDF reports
- Support for line, bar, scatter, and pie charts
- Configurable chart dimensions and styling
SW-006: Google Maps API
Description: The system interfaces with Google Maps for heatmap visualization.
Features Used:
- Map rendering
- Heatmap layer
- Marker placement
- Custom overlays
4.4 Communication Interfaces
COMM-001: HTTPS Protocol
Description: All client-server communication shall use HTTPS.
Requirements:
- TLS 1.2 or higher
- Valid SSL certificates
- HSTS headers enabled
- Certificate pinning for mobile (future)
COMM-002: WebSocket Protocol
Description: Real-time updates shall use WebSocket connections.
Usage:
- Supabase Realtime subscriptions
- Live data updates (selective features)
- Connection auto-reconnect on failure
COMM-003: Email Protocol
Description: Email notifications shall use SMTP via Edge Functions.
Requirements:
- Support HTML and plain text formats
- Attachment support (CSV files)
- Delivery status tracking
- Bounce handling
5. Non-Functional Requirements
5.1 Performance Requirements
NFR-PERF-001: Page Load Time
Description: Dashboard and main pages shall load within acceptable time limits.
| Metric | Target | Priority |
|---|---|---|
| Largest Contentful Paint (LCP) | < 2.5s (75th percentile) | High |
| First Input Delay (FID) | < 100ms | High |
| Cumulative Layout Shift (CLS) | < 0.1 | Medium |
NFR-PERF-002: API Response Time
Description: API requests shall complete within acceptable time limits.
| Operation Type | Target (95th percentile) | Priority |
|---|---|---|
| Read operations | < 500ms | High |
| Write operations | < 2s | Medium |
| Complex queries | < 5s | Medium |
NFR-PERF-003: PDF Generation Time
Description: PDF reports shall generate within acceptable time limits.
| Report Size | Target | Priority |
|---|---|---|
| Standard (10 pages) | < 30s | High |
| Large (30 pages) | < 60s | High |
| Very large (50+ pages) | < 120s | Medium |
NFR-PERF-004: Concurrent Users
Description: The system shall support concurrent user load.
| Metric | Target | Priority |
|---|---|---|
| Concurrent users | 100 without degradation | Medium |
| Peak load | 150 with graceful degradation | Low |
NFR-PERF-005: Data Processing
Description: Data processing operations shall complete within acceptable time limits.
| Operation | Target | Priority |
|---|---|---|
| CSV upload (10K rows) | < 30s | High |
| Data export (50K rows) | < 60s | Medium |
| Chart rendering | < 5s | High |
5.2 Safety Requirements
NFR-SAFE-001: Data Integrity
Description: The system shall maintain data integrity under all conditions.
Requirements:
- Database transactions for multi-step operations
- Referential integrity constraints
- Validation at application and database levels
- Backup and recovery procedures
NFR-SAFE-002: Graceful Degradation
Description: The system shall degrade gracefully when external services fail.
Requirements:
- Cached data displayed when API unavailable
- Clear error messages for users
- Automatic retry for transient failures
- Manual fallback options available
5.3 Security Requirements
NFR-SEC-001: Authentication Security
Description: The system shall implement secure authentication.
Requirements:
- Password hashing with bcrypt
- JWT token expiration (configurable)
- Secure token storage
- Session invalidation on logout
NFR-SEC-002: Authorization Security
Description: The system shall enforce authorization at all levels.
Requirements:
- Row-Level Security (RLS) in database
- API endpoint authorization checks
- UI element visibility based on permissions
- Audit logging of access attempts
NFR-SEC-003: Data Protection
Description: The system shall protect sensitive data.
Requirements:
- HTTPS/TLS for data in transit
- Encryption for data at rest (database)
- PII handling compliance
- Data retention policies
NFR-SEC-004: Input Validation
Description: The system shall validate all user input.
Requirements:
- Server-side validation for all inputs
- SQL injection prevention (parameterized queries)
- XSS prevention (React escaping, CSP headers)
- File upload validation (type, size, content)
NFR-SEC-005: Security Monitoring
Description: The system shall monitor for security threats.
Requirements:
- Failed login attempt logging
- Unusual activity detection
- Security event alerting
- Regular security audits
5.4 Software Quality Attributes
NFR-QUAL-001: Maintainability
Description: The system shall be maintainable by the development team.
Requirements:
- TypeScript strict mode enabled
- ESLint configuration enforced
- Code coverage ≥80% lines, ≥75% branches
- Documentation for all public APIs
- Consistent coding conventions
NFR-QUAL-002: Testability
Description: The system shall be testable at all levels.
Requirements:
- Unit tests for services and hooks
- Integration tests for API endpoints
- E2E tests for critical user flows
- Test data fixtures available
- CI/CD pipeline with automated testing
NFR-QUAL-003: Reliability
Description: The system shall be reliable and available.
Requirements:
- 99% uptime target
- Automated health checks
- Error recovery mechanisms
- Database backup and restore procedures
NFR-QUAL-004: Scalability
Description: The system shall scale to meet growing demands.
Requirements:
- Horizontal scaling via Docker Compose
- Database connection pooling (PgBouncer)
- CDN for static assets
- Batch processing for large datasets
NFR-QUAL-005: Usability
Description: The system shall be usable by target user groups.
Requirements:
- Consistent UI patterns across modules
- Responsive design for desktop and tablet
- Dark mode support
- Keyboard navigation support
- WCAG 2.1 AA accessibility compliance
5.5 Business Rules
NFR-BUS-001: Data Validation Rules
Description: The system shall enforce data validation rules.
| Data Type | Validation Rule |
|---|---|
| Dust concentration | Non-negative numeric value |
| Temperature | Range: -50°C to 60°C |
| Humidity | Range: 0% to 100% |
| Flow meter reading | Non-negative numeric value |
| Email address | Valid email format |
| Date/time | Valid date, not in future |
NFR-BUS-002: Business Logic Rules
Description: The system shall implement business logic rules.
| Rule ID | Description |
|---|---|
| BL-001 | Tank status: normal (>50%), attention (20-50%), low (0-20%), anomaly (<0%) |
| BL-002 | Calibration reminder: last calibration date + interval |
| BL-003 | Effective permissions = direct permissions ∪ group permissions |
| BL-004 | Provisional data marked until confirmed by operator |
| BL-005 | Archived assets excluded from active monitoring |
NFR-BUS-003: Operational Constraints
Description: The system shall operate within defined constraints.
| Constraint | Limit |
|---|---|
| Database query row limit | 1000 per request |
| Edge function timeout | 60 seconds |
| File upload size | 50MB maximum |
| Email attachment size | 10MB maximum |
| Report generation timeout | 120 seconds |
6. Feature Module Requirements
This section details the functional requirements for each of the 16 feature modules. Requirements are organized with user stories, acceptance criteria, and cross-references to the System Design Document (SDD v2).
6.1 Dashboard Module
Module ID: dashboard SDD Reference: Section 10.1 Priority: High
6.1.1 Overview
The Dashboard module provides a real-time overview of system health, key metrics, and operational status across all mining sites.
6.1.2 User Stories
US-DASH-001: View System Overview
As an operations manager, I want to see a summary of all key metrics on a single page, so that I can quickly assess the overall system status.
Acceptance Criteria:
- Dashboard displays total number of active sites
- Dashboard displays total number of active devices
- Dashboard displays latest dust level readings
- Dashboard displays flow meter status summary
- Data refreshes automatically every 5 minutes
US-DASH-002: View Data Freshness
As a field technician, I want to see when data was last updated, so that I know if the information is current.
Acceptance Criteria:
- Each metric card shows "last updated" timestamp
- Stale data (>24 hours) highlighted with warning indicator
- Manual refresh button available
- Freshness calculated per data source
US-DASH-003: View Asset Health
As an administrator, I want to see the health status of all assets, so that I can identify devices needing attention.
Acceptance Criteria:
- Asset health summary shows operational/error/offline counts
- Click-through to detailed asset list
- Last contact time displayed for each asset
- Alerts for devices offline >24 hours
US-DASH-004: View Dust Ranger Summary
As an operations manager, I want to see a summary of Dust Ranger device activity, so that I can monitor fleet utilization.
Acceptance Criteria:
- Total measurements collected today/this week
- Active vs inactive device count
- Average readings per device
- Data gap indicators
US-DASH-005: View Calibration Status
As a field technician, I want to see calibration compliance status, so that I can schedule maintenance activities.
Acceptance Criteria:
- Count of devices due for calibration
- Count of overdue calibrations
- Next calibration due date
- Link to calibration management
6.1.3 Functional Requirements
| Req ID | Description | Priority |
|---|---|---|
| FR-DASH-001 | Display overview metrics (sites, devices, readings) | High |
| FR-DASH-002 | Show dust ranger health status | High |
| FR-DASH-003 | Display flow meter refill cadence | Medium |
| FR-DASH-004 | Show asset health indicators | Medium |
| FR-DASH-005 | Display calibration compliance status | Medium |
| FR-DASH-006 | Provide data freshness indicators | High |
| FR-DASH-007 | Support multi-site filtering | Medium |
| FR-DASH-008 | Auto-refresh data periodically | Low |
6.1.4 Data Requirements
Input Data:
- Aggregated metrics from data_dust_levels
- Aggregated metrics from data_flow_meters
- Asset status from data_assets
- Calibration records from ops_flow_calibrations
Output Data:
- Metric cards with current values
- Trend indicators (up/down/stable)
- Status badges (healthy/warning/critical)
6.2 Dust Levels Module
Module ID: dust_levels SDD Reference: Section 10.2 Priority: High
6.2.1 Overview
The Dust Levels module displays and analyzes dust concentration data from monitoring stations across mining sites.
6.2.2 User Stories
US-DL-001: View Dust Level Data
As an operations manager, I want to view dust concentration readings by site and date, so that I can monitor environmental conditions.
Acceptance Criteria:
- Data displayed in tabular format with sorting
- Filter by site, geofence, and date range
- Show PM1.0, PM2.5, PM4.0, PM10 values
- Include temperature and humidity readings
US-DL-002: View Statistics
As an operations manager, I want to see statistical summaries of dust levels, so that I can identify trends and anomalies.
Acceptance Criteria:
- Display average, min, max values per site
- Show standard deviation
- Compare against threshold values
- Highlight exceedances
US-DL-003: Compare Sites
As an operations manager, I want to compare dust levels across multiple sites, so that I can identify problem areas.
Acceptance Criteria:
- Select multiple sites for comparison
- Side-by-side chart display
- Normalized comparison option
- Export comparison data
US-DL-004: Export Data
As an operations manager, I want to export dust level data to CSV, so that I can perform offline analysis.
Acceptance Criteria:
- Select date range for export
- Choose fields to include
- Download as CSV file
- Filename includes date range
US-DL-005: Trigger Data Refresh
As a field technician, I want to manually trigger a data refresh, so that I can see the latest readings.
Acceptance Criteria:
- "Refresh Data" button available
- Progress indicator during refresh
- Success/failure notification
- Last refresh timestamp displayed
US-DL-006: View Weather Correlation
As an operations manager, I want to see dust levels correlated with weather data, so that I can understand environmental factors.
Acceptance Criteria:
- Weather data displayed alongside dust readings
- Temperature, humidity, wind speed included
- Correlation chart available
- Weather station source identified
6.2.3 Functional Requirements
| Req ID | Description | Priority |
|---|---|---|
| FR-DL-001 | Display dust concentration readings by site and geofence | High |
| FR-DL-002 | Support date range filtering (daily, weekly, monthly) | High |
| FR-DL-003 | Calculate and display statistics (avg, max, min) | High |
| FR-DL-004 | Integrate weather station data | Medium |
| FR-DL-005 | Export data to CSV format | High |
| FR-DL-006 | Compare dust levels across multiple sites | Medium |
| FR-DL-007 | Trigger external scraper API | Medium |
| FR-DL-008 | Support timezone-aware date calculations (AWST) | High |
| FR-DL-009 | Display road corrugations/bumps data | Low |
| FR-DL-010 | Mark data as provisional vs confirmed | Medium |
| FR-DL-011 | Manage site visibility preferences | Low |
6.2.4 Data Requirements
Database Tables:
data_dust_levels- Daily dust concentration readingsdata_weather- Weather station observationscfg_site_weather_stations- Site-to-weather-station mappingsscraper_task_runs- Scraper execution history
Data Fields:
| Field | Type | Description |
|---|---|---|
| site_id | UUID | Reference to mine site |
| geofence | TEXT | Geofence identifier |
| year | INTEGER | Year of reading |
| month | INTEGER | Month of reading |
| day | INTEGER | Day of reading |
| pm1_avg | DECIMAL | PM1.0 average (µg/m³) |
| pm25_avg | DECIMAL | PM2.5 average (µg/m³) |
| pm4_avg | DECIMAL | PM4.0 average (µg/m³) |
| pm10_avg | DECIMAL | PM10 average (µg/m³) |
| temperature | DECIMAL | Temperature (°C) |
| humidity | DECIMAL | Relative humidity (%) |
| is_provisional | BOOLEAN | Provisional data flag |
6.2.5 Business Rules
| Rule ID | Description |
|---|---|
| BR-DL-001 | Dust levels stored with year/month/day fields to avoid JavaScript Date parsing issues |
| BR-DL-002 | All timestamps include timezone information (AWST offset) |
| BR-DL-003 | Data marked as provisional until confirmed by operators |
| BR-DL-004 | Weather data integrated from Bureau of Meteorology |
| BR-DL-005 | Site visibility preferences stored per user |
6.3 Flow Meter Module
Module ID: flow_meter SDD Reference: Section 10.3 Priority: High
6.3.1 Overview
The Flow Meter module tracks water usage, tank refills, calibrations, and tank management for water truck operations.
6.3.2 User Stories
US-FM-001: View Flow Meter Readings
As an operations manager, I want to view flow meter readings, so that I can track water usage.
Acceptance Criteria:
- Display litres dispensed per reading
- Filter by site, asset, and date range
- Show cumulative usage totals
- Identify usage patterns
US-FM-002: Record Tank Refill
As a field technician, I want to record tank refills, so that I can track water replenishment.
Acceptance Criteria:
- Enter refill amount in litres
- Select asset and date
- Add optional notes
- Record redundancy amount (backup water)
US-FM-003: View Tank Status
As an operations manager, I want to see current tank levels, so that I can plan refill schedules.
Acceptance Criteria:
- Display tank level percentage
- Show status indicator (normal/attention/low/anomaly)
- Calculate based on capacity and usage
- Alert for low tank levels
US-FM-004: Manage Tank Corrections
As a field technician, I want to record tank level corrections, so that I can adjust for manual measurements.
Acceptance Criteria:
- Enter corrected tank level
- Provide reason for correction
- Track correction history
- Recalculate subsequent readings
US-FM-005: Track Calibrations
As a field technician, I want to track flow meter calibrations, so that I can ensure measurement accuracy.
Acceptance Criteria:
- Record calibration date and results
- Upload calibration evidence (photos/documents)
- Set next calibration due date
- Generate calibration reminders
US-FM-006: View Calibration Reminders
As an operations manager, I want to see calibration reminders, so that I can schedule maintenance.
Acceptance Criteria:
- List devices due for calibration
- Show overdue calibrations highlighted
- Filter by site and status
- Send reminder notifications
US-FM-007: Identify Usage Gaps
As an operations manager, I want to identify days without water usage, so that I can investigate operational issues.
Acceptance Criteria:
- Highlight consecutive days without dispensing
- Filter by minimum gap duration
- Show gap analysis chart
- Export gap report
US-FM-008: Export Flow Meter Data
As an operations manager, I want to export flow meter data, so that I can perform offline analysis.
Acceptance Criteria:
- Select date range and assets
- Include refills and calibrations
- Download as CSV
- Include calculated fields
6.3.3 Functional Requirements
| Req ID | Description | Priority |
|---|---|---|
| FR-FM-001 | Display flow meter readings with litres dispensed | High |
| FR-FM-002 | Record and manage tank refills | High |
| FR-FM-003 | Track tank corrections (manual adjustments) | Medium |
| FR-FM-004 | Configure tank capacities per asset | Medium |
| FR-FM-005 | Calculate tank level percentage and status | High |
| FR-FM-006 | Identify usage gaps (days without data) | Medium |
| FR-FM-007 | Generate calibration reminders | Medium |
| FR-FM-008 | Record calibration evidence | Medium |
| FR-FM-009 | Export flow meter data to CSV | High |
| FR-FM-010 | Support manual data entry | Medium |
| FR-FM-011 | Mark records as ignored | Low |
| FR-FM-012 | Calculate redundancy amounts | Low |
6.3.4 Data Requirements
Database Tables:
data_flow_meters- Flow meter readingsops_dustloc_refills- Tank refill recordsops_flow_calibrations- Calibration recordsops_tank_corrections- Tank level correctionsops_tank_capacities- Tank capacity configurations
Data Fields (data_flow_meters):
| Field | Type | Description |
|---|---|---|
| id | UUID | Primary key |
| site_id | UUID | Reference to mine site |
| asset_id | UUID | Reference to asset |
| reading_date | DATE | Date of reading |
| litres_dispensed | DECIMAL | Water dispensed (litres) |
| tank_level | DECIMAL | Current tank level (litres) |
| is_ignored | BOOLEAN | Exclude from statistics |
| created_at | TIMESTAMPTZ | Record creation time |
Data Fields (ops_dustloc_refills):
| Field | Type | Description |
|---|---|---|
| id | UUID | Primary key |
| asset_id | UUID | Reference to asset |
| refill_date | DATE | Date of refill |
| litres_added | DECIMAL | Water added (litres) |
| redundancy_litres | DECIMAL | Backup water amount |
| notes | TEXT | Optional notes |
| created_by | UUID | User who recorded |
6.3.5 Business Rules
| Rule ID | Description |
|---|---|
| BR-FM-001 | Tank status: normal (>50%), attention (20-50%), low (0-20%), anomaly (<0%), overflow (>capacity) |
| BR-FM-002 | Calibration reminders based on last calibration date + interval |
| BR-FM-003 | Redundancy rate applied to base litres for backup calculation |
| BR-FM-004 | Gap analysis identifies consecutive days without dispensing |
| BR-FM-005 | Ignored records excluded from all reports and statistics |
6.4 Dust Ranger Module
Module ID: dust_ranger SDD Reference: Section 10.4 Priority: High
6.4.1 Overview
The Dust Ranger module analyzes particle concentration data from mobile dust monitoring devices mounted on vehicles.
6.4.2 User Stories
US-DR-001: View Mass Concentration Data
As an operations manager, I want to view mass concentration data (PM1, PM2.5, PM4, PM10), so that I can monitor air quality.
Acceptance Criteria:
- Display PM values in µg/m³
- Filter by site, vehicle, and date range
- Show time series chart
- Calculate daily/hourly averages
US-DR-002: View Number Concentration Data
As an operations manager, I want to view number concentration data (NC0.5, NC1, NC2.5, NC4, NC10), so that I can analyze particle counts.
Acceptance Criteria:
- Display NC values in particles/cm³
- Toggle between MC and NC data types
- Show distribution analysis
- Compare across vehicles
US-DR-003: View Device Statistics
As an operations manager, I want to see statistics per device, so that I can monitor fleet performance.
Acceptance Criteria:
- Total measurements per device
- Average values per device
- Data gaps identified
- First/last reading timestamps
US-DR-004: Identify Zero Readings
As a field technician, I want to identify zero reading events, so that I can detect device malfunctions.
Acceptance Criteria:
- Highlight periods with zero readings
- Filter by duration threshold
- Show zero reading chart
- Link to device maintenance
US-DR-005: Export Dust Ranger Data
As an operations manager, I want to export dust ranger data, so that I can perform detailed analysis.
Acceptance Criteria:
- Select date range and vehicles
- Choose data type (MC or NC)
- Configure sampling rate
- Download as CSV
6.4.3 Functional Requirements
| Req ID | Description | Priority |
|---|---|---|
| FR-DR-001 | Display mass concentration (PM1, PM2.5, PM4, PM10) data | High |
| FR-DR-002 | Display number concentration (NC0.5, NC1, NC2.5, NC4, NC10) data | High |
| FR-DR-003 | Filter by date range, sites, and vehicles | High |
| FR-DR-004 | Generate hourly and daily averages | High |
| FR-DR-005 | Calculate device statistics | Medium |
| FR-DR-006 | Display time series with sampling for large datasets | High |
| FR-DR-007 | Identify zero reading events | Medium |
| FR-DR-008 | Export data to CSV | High |
| FR-DR-009 | Support environmental data (temperature, humidity) | Low |
| FR-DR-010 | Provide aggregated statistics | Medium |
6.4.4 Data Requirements
Database Tables:
data_dust_ranger- Raw dust ranger measurements
PostgreSQL Functions:
dust_ranger_get_stats- Aggregate statisticsdust_ranger_get_hourly_averages- Hourly averagesdust_ranger_get_daily_averages- Daily averagesdust_ranger_get_device_stats- Per-device statisticsdust_ranger_get_sampled_timeseries- Sampled time series
Data Fields:
| Field | Type | Description |
|---|---|---|
| id | UUID | Primary key |
| site_id | UUID | Reference to mine site |
| vehicle_id | TEXT | Vehicle identifier |
| timestamp | TIMESTAMPTZ | Measurement timestamp |
| pm1 | DECIMAL | PM1.0 mass concentration |
| pm25 | DECIMAL | PM2.5 mass concentration |
| pm4 | DECIMAL | PM4.0 mass concentration |
| pm10 | DECIMAL | PM10 mass concentration |
| nc05 | DECIMAL | NC0.5 number concentration |
| nc1 | DECIMAL | NC1.0 number concentration |
| nc25 | DECIMAL | NC2.5 number concentration |
| nc4 | DECIMAL | NC4.0 number concentration |
| nc10 | DECIMAL | NC10 number concentration |
| temperature | DECIMAL | Temperature (°C) |
| humidity | DECIMAL | Relative humidity (%) |
6.4.5 Business Rules
| Rule ID | Description |
|---|---|
| BR-DR-001 | Data types: MC (mass concentration) or NC (number concentration) |
| BR-DR-002 | Hourly/daily averages calculated server-side for performance |
| BR-DR-003 | Time series sampling limits to max_points for visualization |
| BR-DR-004 | Zero readings indicate potential device issues |
| BR-DR-005 | Data gaps calculated from first_seen to last_seen timestamps |
6.5 Reports Module
Module ID: reports SDD Reference: Section 10.5 Priority: High
6.5.1 Overview
The Reports module generates comprehensive PDF reports with charts, statistics, and data analysis from uploaded CSV data.
6.5.2 User Stories
US-RPT-001: Generate PDF Report
As an operations manager, I want to generate PDF reports from uploaded data, so that I can share analysis with stakeholders.
Acceptance Criteria:
- Upload CSV file with dust ranger data
- Configure report parameters
- Generate PDF with progress indicator
- Download or view generated report
US-RPT-002: Configure Report Charts
As an operations manager, I want to select which charts to include, so that I can customize report content.
Acceptance Criteria:
- Toggle time series chart
- Toggle hourly average chart
- Toggle daily average chart
- Toggle device statistics
- Toggle raw data table
US-RPT-003: View Report Statistics
As an operations manager, I want to see statistical summaries in reports, so that I can understand data distribution.
Acceptance Criteria:
- Display min, max, average values
- Show median and standard deviation
- Include data point count
- Show date range covered
US-RPT-004: Configure Sampling Rate
As an operations manager, I want to configure data sampling, so that I can manage report size for large datasets.
Acceptance Criteria:
- Set sampling rate (1-100%)
- Preview data point count
- Statistics calculated from full dataset
- Sampling method documented
US-RPT-005: Manage Generated Reports
As an operations manager, I want to view and manage generated reports, so that I can access historical reports.
Acceptance Criteria:
- List all generated reports
- Filter by date, site, status
- View report inline
- Download report PDF
- Delete old reports
US-RPT-006: View AI-Generated Descriptions
As an operations manager, I want to see AI-generated chart descriptions, so that I can understand trends without manual analysis.
Acceptance Criteria:
- AI analyzes chart data
- Natural language description generated
- Trends and anomalies highlighted
- Descriptions included in PDF
6.5.3 Functional Requirements
| Req ID | Description | Priority |
|---|---|---|
| FR-RPT-001 | Generate PDF reports from uploaded CSV data | High |
| FR-RPT-002 | Include time series charts | High |
| FR-RPT-003 | Include hourly average charts | High |
| FR-RPT-004 | Include daily average charts | High |
| FR-RPT-005 | Include device statistics and timeline | Medium |
| FR-RPT-006 | Include raw data tables (optional) | Low |
| FR-RPT-007 | Support sampling rate configuration | Medium |
| FR-RPT-008 | Generate report statistics | High |
| FR-RPT-009 | Support multiple report templates | Medium |
| FR-RPT-010 | Store reports in storage bucket | High |
| FR-RPT-011 | Track report generation metadata | Medium |
| FR-RPT-012 | Support custom chart configuration | Medium |
| FR-RPT-013 | Include flow meter data (optional) | Low |
| FR-RPT-014 | Generate AI-powered chart descriptions | Medium |
6.5.4 Data Requirements
Database Tables:
rpt_reports- Report metadataupload_csv_files- Source CSV filesupload_measurements- Parsed measurement data
Data Fields (rpt_reports):
| Field | Type | Description |
|---|---|---|
| id | UUID | Primary key |
| site_id | UUID | Reference to mine site |
| title | TEXT | Report title |
| status | TEXT | pending/generating/completed/failed |
| file_path | TEXT | Storage path to PDF |
| config | JSONB | Report configuration |
| statistics | JSONB | Calculated statistics |
| created_by | UUID | User who generated |
| created_at | TIMESTAMPTZ | Generation timestamp |
| duration_ms | INTEGER | Generation duration |
6.5.5 Business Rules
| Rule ID | Description |
|---|---|
| BR-RPT-001 | Reports generated using PDF-lib and QuickChart.io |
| BR-RPT-002 | Sampling rate reduces data points for large datasets |
| BR-RPT-003 | Report status: pending → generating → completed/failed |
| BR-RPT-004 | Statistics calculated from all data points before sampling |
| BR-RPT-005 | Charts generated via QuickChart.io API |
6.6 Weekly Reports Module
Module ID: weekly_reports SDD Reference: Section 10.6 Priority: Medium
6.6.1 Overview
The Weekly Reports module provides structured field reporting for operational activities, with auto-save functionality and multiple report sections.
6.6.2 User Stories
US-WR-001: Create Weekly Report
As a field technician, I want to create weekly reports, so that I can document field activities.
Acceptance Criteria:
- Select report week (start/end dates)
- Select site(s) covered
- Fill in multiple sections
- Save as draft or complete
US-WR-002: Record Site Observations
As a field technician, I want to record observations per device, so that I can document device status.
Acceptance Criteria:
- List devices at selected site
- Add status and notes per device
- Include photos (optional)
- Track observation date
US-WR-003: Record Flow Meter Usage
As a field technician, I want to record flow meter usage summary, so that I can document water consumption.
Acceptance Criteria:
- Enter volume used
- Specify date range
- Add usage notes
- Link to flow meter data
US-WR-004: Auto-Save Report
As a field technician, I want my report to auto-save, so that I don't lose work if I navigate away.
Acceptance Criteria:
- Auto-save every 30 seconds
- Visual indicator of save status
- Recover unsaved changes
- Manual save option available
US-WR-005: Complete Report
As a field technician, I want to mark a report as complete, so that it becomes read-only for review.
Acceptance Criteria:
- Validate required fields
- Change status to completed
- Lock report from editing
- Notify relevant users
6.6.3 Functional Requirements
| Req ID | Description | Priority |
|---|---|---|
| FR-WR-001 | Create weekly reports with multiple sections | High |
| FR-WR-002 | Site observations section | High |
| FR-WR-003 | Flow meter usage section | High |
| FR-WR-004 | Dashboard updates section | Medium |
| FR-WR-005 | Vendor activities section | Medium |
| FR-WR-006 | Water truck testing section | Medium |
| FR-WR-007 | Hardware installations section | Medium |
| FR-WR-008 | Admin reporting section | Medium |
| FR-WR-009 | Other tasks section | Medium |
| FR-WR-010 | Auto-save functionality | High |
| FR-WR-011 | Support draft and completed status | High |
| FR-WR-012 | Custom date range for flow meter data | Medium |
6.6.4 Report Sections
| Section | Description | Fields |
|---|---|---|
| Site Observations | Device status and notes | device_id, status, notes, photos |
| Flow Meter Usage | Water consumption summary | volume_used, date_range, notes |
| Dashboard Updates | System changes | update_type, description, date |
| Vendor Activities | Maintenance and support | vendor, activity, date, outcome |
| Water Truck Testing | Test results | test_summary, issues, improvements |
| Hardware Installations | New equipment | equipment, location, date, notes |
| Admin Reporting | Travel and admin | travel_details, reporting_activities |
| Other Tasks | Miscellaneous | site_support, stakeholder, internal |
6.6.5 Data Requirements
Database Tables:
rpt_weekly_summaries- Weekly report records
Data Fields:
| Field | Type | Description |
|---|---|---|
| id | UUID | Primary key |
| site_id | UUID | Reference to mine site |
| week_start | DATE | Report week start |
| week_end | DATE | Report week end |
| status | TEXT | draft/completed |
| site_observations | JSONB | Observations data |
| flow_meter_usage | JSONB | Usage data |
| dashboard_updates | JSONB | Updates data |
| vendor_activities | JSONB | Vendor data |
| water_truck_testing | JSONB | Testing data |
| hardware_installations | JSONB | Installation data |
| admin_reporting | JSONB | Admin data |
| other_tasks | JSONB | Other tasks data |
| created_by | UUID | User who created |
| updated_at | TIMESTAMPTZ | Last update time |
6.6.6 Business Rules
| Rule ID | Description |
|---|---|
| BR-WR-001 | Report period end typically Sunday, week starting Monday |
| BR-WR-002 | Auto-save triggered on field changes (30 second debounce) |
| BR-WR-003 | Draft reports can be edited, completed reports are read-only |
| BR-WR-004 | Flow meter date range customizable per report |
6.7 Heatmap Module
Module ID: heatmap SDD Reference: Section 10.7 Priority: Medium
6.7.1 Overview
The Heatmap module visualizes geographic distribution of dust concentration data on interactive maps.
6.7.2 User Stories
US-HM-001: View Heatmap
As an operations manager, I want to view dust concentration on a map, so that I can identify geographic hotspots.
Acceptance Criteria:
- Display Google Map with heatmap overlay
- Color intensity indicates concentration level
- Filter by date range
- Zoom and pan controls
US-HM-002: Configure Heatmap Display
As an operations manager, I want to customize heatmap appearance, so that I can optimize visualization.
Acceptance Criteria:
- Select color gradient scheme
- Adjust radius and opacity
- Configure weight scale
- Toggle dissipation effect
US-HM-003: View Data Points
As an operations manager, I want to see individual data points, so that I can examine specific readings.
Acceptance Criteria:
- Click on map to see nearby readings
- Display marker with reading details
- Show timestamp and values
- Link to source data
US-HM-004: View Contour Lines
As an operations manager, I want to see contour lines, so that I can visualize concentration gradients.
Acceptance Criteria:
- Toggle contour line display
- Configure contour intervals
- Show contour labels
- Export contour data
6.7.3 Functional Requirements
| Req ID | Description | Priority |
|---|---|---|
| FR-HM-001 | Display Google Map with heatmap overlay | High |
| FR-HM-002 | Support multiple gradient color schemes | Medium |
| FR-HM-003 | Configurable heatmap parameters | Medium |
| FR-HM-004 | Support canvas-based rendering | Medium |
| FR-HM-005 | Display marker points with asset information | Medium |
| FR-HM-006 | Show contour lines | Low |
| FR-HM-007 | Filter by date range and data type | High |
| FR-HM-008 | Display statistics (count, min, max) | Medium |
6.7.4 Data Requirements
Database Tables:
data_heatmap- Geographic dust concentration readingsdata_asset_locations- Asset location tracking
Data Fields:
| Field | Type | Description |
|---|---|---|
| id | UUID | Primary key |
| site_id | UUID | Reference to mine site |
| latitude | DECIMAL | GPS latitude |
| longitude | DECIMAL | GPS longitude |
| value | DECIMAL | Concentration value |
| data_type | TEXT | MC or NC |
| timestamp | TIMESTAMPTZ | Reading timestamp |
6.7.5 Business Rules
| Rule ID | Description |
|---|---|
| BR-HM-001 | Heatmap data sourced from data_heatmap table in main database |
| BR-HM-002 | Contour generation from point data |
| BR-HM-003 | Canvas rendering for large datasets (>1000 points) |
6.8 Email Schedules Module
Module ID: email_schedules SDD Reference: Section 10.8 Priority: Medium
6.8.1 Overview
The Email Schedules module automates email notifications and reporting with support for templates, attachments, and recurring schedules.
6.8.2 User Stories
US-ES-001: Create Email Schedule
As an operations manager, I want to create email schedules, so that I can automate report distribution.
Acceptance Criteria:
- Enter recipients (to, cc, bcc)
- Set subject and body
- Choose send mode (manual, scheduled, recurring)
- Save as draft or activate
US-ES-002: Configure Recurring Emails
As an operations manager, I want to set up recurring emails, so that reports are sent automatically.
Acceptance Criteria:
- Select recurrence type (daily, weekly, monthly)
- Set recurrence day/time
- Configure end date (optional)
- View next scheduled send
US-ES-003: Use Email Templates
As an operations manager, I want to use templates, so that I can maintain consistent email formatting.
Acceptance Criteria:
- Create snippet templates for reusable content
- Create variable templates for dynamic data
- Insert templates into email body
- Preview rendered template
US-ES-004: Attach Data Files
As an operations manager, I want to attach data files, so that recipients receive relevant data.
Acceptance Criteria:
- Attach CSV files (flow meter data)
- Configure attachment date range
- Select sites to include
- Preview attachment content
US-ES-005: View Email History
As an operations manager, I want to view email send history, so that I can track delivery status.
Acceptance Criteria:
- List all sent emails
- Show send status (sent, failed)
- View error messages for failures
- Resend failed emails
US-ES-006: Preview Email
As an operations manager, I want to preview emails before sending, so that I can verify content.
Acceptance Criteria:
- Render template variables
- Show attachment list
- Display recipient list
- Test send to self
6.8.3 Functional Requirements
| Req ID | Description | Priority |
|---|---|---|
| FR-ES-001 | Create email schedules with recipients | High |
| FR-ES-002 | Support manual, scheduled, recurring modes | High |
| FR-ES-003 | Configure recurrence (daily, weekly, monthly) | High |
| FR-ES-004 | Support email templates with variables | Medium |
| FR-ES-005 | Create snippet templates | Medium |
| FR-ES-006 | Create variable templates | Medium |
| FR-ES-007 | Attach CSV files | High |
| FR-ES-008 | Configure attachment data sources | Medium |
| FR-ES-009 | Track email send history | High |
| FR-ES-010 | Support multiple sender addresses | Low |
| FR-ES-011 | Display email preview | Medium |
| FR-ES-012 | Handle send failures with logging | High |
| FR-ES-013 | Support cron-based recurring sends | Medium |
6.8.4 Data Requirements
Database Tables:
email_schedules- Email schedule definitionsemail_senders- Sender configurationsemail_snippet_templates- Reusable content fragmentsemail_variable_templates- Dynamic variable templatesemail_schedule_attachments- Attachment configurationsemail_logs- Send history and status
Data Fields (email_schedules):
| Field | Type | Description |
|---|---|---|
| id | UUID | Primary key |
| name | TEXT | Schedule name |
| subject | TEXT | Email subject |
| body | TEXT | Email body (HTML) |
| recipients_to | TEXT[] | To recipients |
| recipients_cc | TEXT[] | CC recipients |
| recipients_bcc | TEXT[] | BCC recipients |
| mode | TEXT | manual/scheduled/recurring |
| status | TEXT | draft/scheduled/processing/sent/failed |
| recurrence_type | TEXT | none/daily/weekly/monthly |
| recurrence_config | JSONB | Recurrence settings |
| next_send_at | TIMESTAMPTZ | Next scheduled send |
| created_by | UUID | User who created |
6.8.5 Business Rules
| Rule ID | Description |
|---|---|
| BR-ES-001 | Email status: draft → scheduled → processing → sent/failed |
| BR-ES-002 | Recurrence end date optional (null = indefinite) |
| BR-ES-003 | Next send time calculated from recurrence config |
| BR-ES-004 | Cron job processes recurring emails daily |
| BR-ES-005 | Failed sends logged with error message |
| BR-ES-006 | Variable templates support nested fields |
6.9 User Management Module
Module ID: user_management SDD Reference: Section 10.9 Priority: High
6.9.1 Overview
The User Management module provides role-based access control with module and site-level permissions, user groups, and audit logging.
6.9.2 User Stories
US-UM-001: Manage Users
As an administrator, I want to manage user accounts, so that I can control system access.
Acceptance Criteria:
- List all users with status
- Create new user accounts
- Edit user profile and role
- Activate/deactivate users
US-UM-002: Assign Module Permissions
As an administrator, I want to assign module permissions, so that I can control feature access.
Acceptance Criteria:
- Select modules to grant access
- Set can_view and can_edit per module
- View effective permissions
- Bulk permission assignment
US-UM-003: Assign Site Permissions
As an administrator, I want to assign site permissions, so that I can control data access.
Acceptance Criteria:
- Select sites to grant access
- Set can_view and can_edit per site
- View effective permissions
- Bulk permission assignment
US-UM-004: Manage User Groups
As an administrator, I want to manage user groups, so that I can simplify permission management.
Acceptance Criteria:
- Create groups with name and description
- Assign users to groups
- Set group module permissions
- Set group site permissions
US-UM-005: View Effective Permissions
As an administrator, I want to see effective permissions, so that I can verify access configuration.
Acceptance Criteria:
- Show merged direct and group permissions
- Indicate permission source (direct/group/both)
- Highlight conflicts or gaps
- Export permission report
6.9.3 Functional Requirements
| Req ID | Description | Priority |
|---|---|---|
| FR-UM-001 | Create and manage user accounts | High |
| FR-UM-002 | Assign user roles (admin, user) | High |
| FR-UM-003 | Configure module-level permissions | High |
| FR-UM-004 | Configure site-level permissions | High |
| FR-UM-005 | Create user groups | Medium |
| FR-UM-006 | Assign users to groups | Medium |
| FR-UM-007 | Merge direct and group permissions | High |
| FR-UM-008 | Activate/deactivate users | High |
| FR-UM-009 | Track permission changes | Medium |
| FR-UM-010 | Support permission inheritance | Medium |
6.9.4 Data Requirements
Database Tables:
user_profiles- User profile with roleuser_module_permissions- Module-level accessuser_site_permissions- Site-level accessuser_groups- User group definitionsuser_group_members- Group membershipuser_group_module_permissions- Group module permissionsuser_group_site_permissions- Group site permissions
Data Fields (user_profiles):
| Field | Type | Description |
|---|---|---|
| id | UUID | Primary key (auth.users reference) |
| TEXT | User email | |
| full_name | TEXT | Display name |
| role | TEXT | admin/user |
| is_active | BOOLEAN | Account active status |
| created_at | TIMESTAMPTZ | Account creation time |
| updated_at | TIMESTAMPTZ | Last update time |
6.9.5 Business Rules
| Rule ID | Description |
|---|---|
| BR-UM-001 | Admin role has full access to all modules and sites |
| BR-UM-002 | User role requires explicit permission grants |
| BR-UM-003 | Effective permissions = direct permissions ∪ group permissions |
| BR-UM-004 | Permission source tracked: direct, group, both, or none |
| BR-UM-005 | Row-level security (RLS) enforces site permissions in database |
| BR-UM-006 | is_admin() function bypasses RLS for admin users |
6.10 Assets Module
Module ID: assets SDD Reference: Section 10.10 Priority: Medium
6.10.1 Overview
The Assets module tracks and manages monitoring equipment including dust rangers, flow meters, weather stations, and vehicles.
6.10.2 User Stories
US-AM-001: View Asset List
As an operations manager, I want to view all assets, so that I can monitor equipment inventory.
Acceptance Criteria:
- List all registered assets
- Filter by type, site, and status
- Search by name or serial number
- Sort by various columns
US-AM-002: Register Asset
As an administrator, I want to register new assets, so that I can track equipment.
Acceptance Criteria:
- Enter asset details (name, serial, type)
- Assign to mine site
- Set provider type
- Upload asset documentation
US-AM-003: View Asset Status
As an operations manager, I want to see asset operational status, so that I can identify issues.
Acceptance Criteria:
- Display operational status (operational/error/offline)
- Show last contact time
- Highlight devices offline >24 hours
- Link to device data
US-AM-004: Track Asset Location
As an operations manager, I want to track asset locations, so that I can monitor fleet positions.
Acceptance Criteria:
- Display GPS coordinates
- Show on map view
- Track location history
- Update from scraper data
6.10.3 Functional Requirements
| Req ID | Description | Priority |
|---|---|---|
| FR-AM-001 | Register assets (dust rangers, flow meters, etc.) | High |
| FR-AM-002 | Track asset metadata (serial, name, description) | High |
| FR-AM-003 | Track asset provider type | Medium |
| FR-AM-004 | Monitor operational status | High |
| FR-AM-005 | Track last contact time | High |
| FR-AM-006 | Associate assets with mine sites | High |
| FR-AM-007 | Archive/delete assets | Medium |
| FR-AM-008 | Track asset locations (GPS) | Medium |
| FR-AM-009 | Support asset search and filtering | Medium |
| FR-AM-010 | Integrate with SingleSourceIOT API | Medium |
6.10.4 Data Requirements
Database Tables:
cfg_assets- Asset configuration (legacy)data_assets- Asset data from scraperdata_asset_locations- Asset location tracking
Asset Types:
| Type | Description |
|---|---|
| dust_ranger | Mobile dust monitoring device |
| flow_meter | Water flow measurement device |
| weather_station | Weather monitoring station |
| vehicle | Water truck or service vehicle |
| pump | Water pump equipment |
| other | Other equipment types |
Asset Providers:
| Provider | Description |
|---|---|
| mqtt | MQTT protocol |
| http | HTTP/REST API |
| modbus | Modbus protocol |
| opcua | OPC-UA protocol |
| lorawan | LoRaWAN network |
| cellular | Cellular modem |
| satellite | Satellite communication |
| manual | Manual data entry |
6.10.5 Business Rules
| Rule ID | Description |
|---|---|
| BR-AM-001 | Asset types define equipment category |
| BR-AM-002 | Asset providers indicate data collection method |
| BR-AM-003 | Last contact time indicates device connectivity |
| BR-AM-004 | Archived assets excluded from active monitoring |
| BR-AM-005 | Asset display name used in UI instead of asset_id |
6.11 Mine Sites Module
Module ID: mine_sites SDD Reference: Section 10.11 Priority: High
6.11.1 Overview
The Mine Sites module configures and manages mining operation sites with feature toggles and location settings.
6.11.2 User Stories
US-MS-001: View Mine Sites
As an administrator, I want to view all mine sites, so that I can manage site configuration.
Acceptance Criteria:
- List all configured sites
- Show site code and name
- Display enabled features
- Show asset count per site
US-MS-002: Create Mine Site
As an administrator, I want to create new mine sites, so that I can onboard new operations.
Acceptance Criteria:
- Enter site name and code
- Set location coordinates
- Configure enabled features
- Assign initial assets
US-MS-003: Configure Site Features
As an administrator, I want to enable/disable features per site, so that I can customize functionality.
Acceptance Criteria:
- Toggle dust levels feature
- Toggle flow meter feature
- Toggle heatmap feature
- Toggle other features
6.11.3 Functional Requirements
| Req ID | Description | Priority |
|---|---|---|
| FR-MS-001 | Create and manage mine sites | High |
| FR-MS-002 | Configure site-specific features | High |
| FR-MS-003 | Store site coordinates | Medium |
| FR-MS-004 | Associate assets with sites | High |
| FR-MS-005 | Support system sites (protected) | Medium |
| FR-MS-006 | Track site creation and modification | Low |
6.11.4 Data Requirements
Database Tables:
cfg_mine_sites- Mine site configuration
Data Fields:
| Field | Type | Description |
|---|---|---|
| id | UUID | Primary key |
| name | TEXT | Site display name |
| code | TEXT | Site code (unique) |
| location | TEXT | Location description |
| latitude | DECIMAL | GPS latitude |
| longitude | DECIMAL | GPS longitude |
| is_system | BOOLEAN | System site flag |
| features | JSONB | Enabled features |
| created_at | TIMESTAMPTZ | Creation timestamp |
| updated_at | TIMESTAMPTZ | Last update |
6.11.5 Business Rules
| Rule ID | Description |
|---|---|
| BR-MS-001 | System sites marked with is_system flag cannot be deleted |
| BR-MS-002 | Each feature can be enabled/disabled per site |
| BR-MS-003 | Site coordinates used for heatmap and location tracking |
6.12 Settings Module
Module ID: settings SDD Reference: Section 10.12 Priority: Medium
6.12.1 Overview
The Settings module configures application-wide settings including thresholds, weather station mappings, and scraper configurations.
6.12.2 User Stories
US-SET-001: Configure Dust Thresholds
As an administrator, I want to configure dust level thresholds, so that I can define alert levels.
Acceptance Criteria:
- Set warning threshold
- Set critical threshold
- Configure per site (optional)
- Apply to all visualizations
US-SET-002: Map Weather Stations
As an administrator, I want to map weather stations to sites, so that I can correlate weather data.
Acceptance Criteria:
- Select weather station per site
- Set as primary station
- Record distance to site
- View available stations
US-SET-003: Configure Scrapers
As an administrator, I want to configure scraper settings, so that I can control data collection.
Acceptance Criteria:
- Set API tokens
- Configure field mappings
- Set scraper schedule
- View scraper status
6.12.3 Functional Requirements
| Req ID | Description | Priority |
|---|---|---|
| FR-SET-001 | Configure dust level thresholds | High |
| FR-SET-002 | Map weather stations to mine sites | Medium |
| FR-SET-003 | Configure scraper settings | Medium |
| FR-SET-004 | Store application configuration | Medium |
| FR-SET-005 | Support site-specific settings | Low |
6.12.4 Data Requirements
Database Tables:
cfg_app_settings- Application configurationcfg_site_weather_stations- Site-to-weather-station mappingsscraper_cfg_api_tokens- API credentialsscraper_cfg_settings- Scraper configuration
6.12.5 Business Rules
| Rule ID | Description |
|---|---|
| BR-SET-001 | Settings stored as key-value pairs with JSON values |
| BR-SET-002 | Primary weather station marked for each site |
| BR-SET-003 | Distance to weather station tracked for reference |
6.13 Upload Module
Module ID: upload SDD Reference: Section 10.13 Priority: High
6.13.1 Overview
The Upload module imports CSV data into the system with validation, preview, and batch processing capabilities.
6.13.2 User Stories
US-UP-001: Upload CSV File
As a field technician, I want to upload CSV files, so that I can import dust ranger data.
Acceptance Criteria:
- Select CSV file(s) for upload
- Validate file format
- Show upload progress
- Handle upload errors
US-UP-002: Preview CSV Data
As a field technician, I want to preview CSV data before import, so that I can verify content.
Acceptance Criteria:
- Display first N rows
- Show detected columns
- Highlight validation errors
- Show unique vehicles and date range
US-UP-003: Import CSV Data
As a field technician, I want to import validated CSV data, so that I can add data to the system.
Acceptance Criteria:
- Import validated files
- Show import progress
- Handle duplicate detection
- Generate import report
US-UP-004: Generate Report from Upload
As a field technician, I want to generate a report from uploaded data, so that I can create analysis documents.
Acceptance Criteria:
- Select uploaded file(s)
- Configure report options
- Generate PDF report
- Link report to upload session
6.13.3 Functional Requirements
| Req ID | Description | Priority |
|---|---|---|
| FR-UP-001 | Upload CSV files with dust ranger measurements | High |
| FR-UP-002 | Validate CSV format and data types | High |
| FR-UP-003 | Parse and preview CSV data | High |
| FR-UP-004 | Detect unique vehicles and date ranges | Medium |
| FR-UP-005 | Generate validation errors and warnings | High |
| FR-UP-006 | Support batch file uploads | Medium |
| FR-UP-007 | Track upload sessions and status | High |
| FR-UP-008 | Generate reports from uploaded data | High |
| FR-UP-009 | Store CSV files in storage bucket | High |
| FR-UP-010 | Support daily, weekly, monthly upload types | Low |
6.13.4 Data Requirements
Database Tables:
upload_sessions- Upload batch metadataupload_csv_files- Individual CSV file recordsupload_measurements- Parsed measurement data
Upload Status Flow:
pending → uploading → validating → importing → completed
↓ ↓ ↓
failed invalid failed6.13.5 Business Rules
| Rule ID | Description |
|---|---|
| BR-UP-001 | Upload status: pending → uploading → validating → importing → completed/failed |
| BR-UP-002 | File status: pending → uploading → uploaded → validating → valid/invalid → importing → completed/failed |
| BR-UP-003 | Validation errors block import, warnings are logged |
| BR-UP-004 | CSV headers must match expected format |
| BR-UP-005 | Date/time parsed with vehicle ID extraction |
6.14 Climate Module
Module ID: climate SDD Reference: Section 10.14 Priority: Low
6.14.1 Overview
The Climate module integrates weather station data from the Bureau of Meteorology for environmental context.
6.14.2 User Stories
US-CL-001: View Weather Data
As an operations manager, I want to view weather station data, so that I can understand environmental conditions.
Acceptance Criteria:
- Display temperature (9am, 3pm)
- Show rainfall data
- Display wind speed and direction
- Show humidity and pressure
US-CL-002: Manage Weather Stations
As an administrator, I want to manage weather station configurations, so that I can control data sources.
Acceptance Criteria:
- List available weather stations
- View station metadata
- Map stations to sites
- View data availability
6.14.3 Functional Requirements
| Req ID | Description | Priority |
|---|---|---|
| FR-CL-001 | Display weather station data | Medium |
| FR-CL-002 | Support 9am and 3pm observations | Medium |
| FR-CL-003 | Track wind gust direction and speed | Low |
| FR-CL-004 | Display sunshine and evaporation data | Low |
| FR-CL-005 | Manage weather station configurations | Medium |
| FR-CL-006 | Map weather stations to mine sites | Medium |
6.14.4 Data Requirements
Database Tables:
data_weather- Weather observationsscraper_cfg_weather_stations- Weather station metadata
Data Fields:
| Field | Type | Description |
|---|---|---|
| id | UUID | Primary key |
| station_id | TEXT | BOM station identifier |
| observation_date | DATE | Observation date |
| temp_9am | DECIMAL | Temperature at 9am (°C) |
| temp_3pm | DECIMAL | Temperature at 3pm (°C) |
| rainfall | DECIMAL | Rainfall (mm) |
| wind_speed | DECIMAL | Wind speed (km/h) |
| wind_direction | TEXT | Wind direction |
| humidity | DECIMAL | Relative humidity (%) |
| pressure | DECIMAL | Atmospheric pressure (hPa) |
6.14.5 Business Rules
| Rule ID | Description |
|---|---|
| BR-CL-001 | Data sourced from Bureau of Meteorology |
| BR-CL-002 | Multiple observations per day (9am, 3pm) |
| BR-CL-003 | Wind data includes direction and speed |
7. Data Requirements
7.1 Database Schema Overview
The database is organized into logical groups with consistent naming conventions:
| Prefix | Category | Description |
|---|---|---|
user_ | User Management | User profiles, permissions, groups |
cfg_ | Configuration | System and site configuration |
data_ | Data Storage | Monitoring data (dust, flow, weather) |
ops_ | Operations | Operational records (refills, corrections) |
rpt_ | Reports | Generated reports and templates |
email_ | Email System | Schedules, logs, templates |
upload_ | Upload | CSV upload sessions and files |
scraper_ | Scraper | Scraper configuration and runs |
sys_ | System | Activity logs and system tables |
7.2 Entity Relationship Summary
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ user_profiles │───────│ user_module_ │ │ user_groups │
│ │ │ permissions │ │ │
└────────┬────────┘ └─────────────────┘ └────────┬────────┘
│ │
│ ┌─────────────────┐ │
└────────────────│ user_site_ │────────────────┘
│ permissions │
└────────┬────────┘
│
┌────────▼────────┐
│ cfg_mine_sites │
└────────┬────────┘
│
┌─────────────────────────┼─────────────────────────┐
│ │ │
┌────────▼────────┐ ┌────────▼────────┐ ┌────────▼────────┐
│ data_dust_levels│ │ data_flow_meters│ │ data_heatmap │
└─────────────────┘ └─────────────────┘ └─────────────────┘7.3 Data Dictionary
7.3.1 User Management Tables
user_profiles
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | UUID | NO | Primary key (references auth.users) |
| TEXT | NO | User email address | |
| full_name | TEXT | YES | Display name |
| role | TEXT | NO | User role (admin/user) |
| is_active | BOOLEAN | NO | Account active status |
| created_at | TIMESTAMPTZ | NO | Account creation timestamp |
| updated_at | TIMESTAMPTZ | NO | Last update timestamp |
user_module_permissions
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | UUID | NO | Primary key |
| user_id | UUID | NO | Reference to user_profiles |
| module | TEXT | NO | Module identifier |
| can_view | BOOLEAN | NO | View permission |
| can_edit | BOOLEAN | NO | Edit permission |
| created_at | TIMESTAMPTZ | NO | Creation timestamp |
| updated_at | TIMESTAMPTZ | NO | Last update timestamp |
user_site_permissions
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | UUID | NO | Primary key |
| user_id | UUID | NO | Reference to user_profiles |
| site_id | UUID | NO | Reference to cfg_mine_sites |
| can_view | BOOLEAN | NO | View permission |
| can_edit | BOOLEAN | NO | Edit permission |
| created_at | TIMESTAMPTZ | NO | Creation timestamp |
| updated_at | TIMESTAMPTZ | NO | Last update timestamp |
7.3.2 Configuration Tables
cfg_mine_sites
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | UUID | NO | Primary key |
| name | TEXT | NO | Site display name |
| code | TEXT | NO | Site code (unique) |
| location | TEXT | YES | Location description |
| latitude | DECIMAL(10,8) | YES | GPS latitude |
| longitude | DECIMAL(11,8) | YES | GPS longitude |
| is_system | BOOLEAN | NO | System site flag |
| features | JSONB | YES | Enabled features |
| created_at | TIMESTAMPTZ | NO | Creation timestamp |
| updated_at | TIMESTAMPTZ | NO | Last update timestamp |
cfg_app_settings
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | UUID | NO | Primary key |
| key | TEXT | NO | Setting key (unique) |
| value | JSONB | YES | Setting value |
| description | TEXT | YES | Setting description |
| created_at | TIMESTAMPTZ | NO | Creation timestamp |
| updated_at | TIMESTAMPTZ | NO | Last update timestamp |
7.3.3 Data Tables
data_dust_levels
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | UUID | NO | Primary key |
| site_id | UUID | NO | Reference to cfg_mine_sites |
| geofence | TEXT | YES | Geofence identifier |
| year | INTEGER | NO | Year of reading |
| month | INTEGER | NO | Month of reading |
| day | INTEGER | NO | Day of reading |
| pm1_avg | DECIMAL | YES | PM1.0 average (µg/m³) |
| pm25_avg | DECIMAL | YES | PM2.5 average (µg/m³) |
| pm4_avg | DECIMAL | YES | PM4.0 average (µg/m³) |
| pm10_avg | DECIMAL | YES | PM10 average (µg/m³) |
| temperature | DECIMAL | YES | Temperature (°C) |
| humidity | DECIMAL | YES | Relative humidity (%) |
| is_provisional | BOOLEAN | NO | Provisional data flag |
| created_at | TIMESTAMPTZ | NO | Creation timestamp |
data_flow_meters
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | UUID | NO | Primary key |
| site_id | UUID | NO | Reference to cfg_mine_sites |
| asset_id | UUID | YES | Reference to asset |
| reading_date | DATE | NO | Date of reading |
| litres_dispensed | DECIMAL | YES | Water dispensed (litres) |
| tank_level | DECIMAL | YES | Current tank level (litres) |
| is_ignored | BOOLEAN | NO | Exclude from statistics |
| created_at | TIMESTAMPTZ | NO | Creation timestamp |
data_dust_ranger
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | UUID | NO | Primary key |
| site_id | UUID | NO | Reference to cfg_mine_sites |
| vehicle_id | TEXT | NO | Vehicle identifier |
| timestamp | TIMESTAMPTZ | NO | Measurement timestamp |
| pm1 | DECIMAL | YES | PM1.0 mass concentration |
| pm25 | DECIMAL | YES | PM2.5 mass concentration |
| pm4 | DECIMAL | YES | PM4.0 mass concentration |
| pm10 | DECIMAL | YES | PM10 mass concentration |
| nc05 | DECIMAL | YES | NC0.5 number concentration |
| nc1 | DECIMAL | YES | NC1.0 number concentration |
| nc25 | DECIMAL | YES | NC2.5 number concentration |
| nc4 | DECIMAL | YES | NC4.0 number concentration |
| nc10 | DECIMAL | YES | NC10 number concentration |
| temperature | DECIMAL | YES | Temperature (°C) |
| humidity | DECIMAL | YES | Relative humidity (%) |
7.4 Data Types and Enumerations
User Roles
| Value | Description |
|---|---|
| admin | Full system access |
| user | Limited access based on permissions |
Asset Types
| Value | Description |
|---|---|
| dust_ranger | Mobile dust monitoring device |
| flow_meter | Water flow measurement device |
| weather_station | Weather monitoring station |
| vehicle | Water truck or service vehicle |
| pump | Water pump equipment |
| other | Other equipment types |
Asset Providers
| Value | Description |
|---|---|
| mqtt | MQTT protocol |
| http | HTTP/REST API |
| modbus | Modbus protocol |
| opcua | OPC-UA protocol |
| lorawan | LoRaWAN network |
| cellular | Cellular modem |
| satellite | Satellite communication |
| manual | Manual data entry |
| other | Other providers |
Email Schedule Status
| Value | Description |
|---|---|
| draft | Not yet scheduled |
| scheduled | Scheduled for future send |
| processing | Currently being sent |
| sent | Successfully sent |
| cancelled | Cancelled by user |
| failed | Send failed |
| completed | Recurring schedule completed |
Email Schedule Mode
| Value | Description |
|---|---|
| manual | Send manually |
| scheduled | Send at specific time |
| recurring | Send on recurring schedule |
Recurrence Type
| Value | Description |
|---|---|
| none | No recurrence |
| daily | Every day |
| weekly | Every week |
| monthly | Every month |
Report Status
| Value | Description |
|---|---|
| pending | Awaiting generation |
| generating | Currently generating |
| completed | Successfully generated |
| failed | Generation failed |
Upload Status
| Value | Description |
|---|---|
| pending | Awaiting upload |
| uploading | Currently uploading |
| validating | Validating content |
| importing | Importing to database |
| completed | Successfully imported |
| failed | Import failed |
7.5 Data Retention Policies
| Data Type | Retention Period | Archive Policy |
|---|---|---|
| Dust level readings | 5 years | Archive to cold storage |
| Flow meter readings | 5 years | Archive to cold storage |
| Dust ranger measurements | 3 years | Archive to cold storage |
| Weather data | 5 years | Archive to cold storage |
| Generated reports | 2 years | Delete after retention |
| Email logs | 1 year | Delete after retention |
| Activity logs | 2 years | Archive to cold storage |
| Upload sessions | 1 year | Delete after retention |
Appendices
Appendix A: Glossary
| Term | Definition |
|---|---|
| Asset | Physical equipment tracked by the system (dust ranger, flow meter, etc.) |
| AWST | Australian Western Standard Time (UTC+8) |
| BOM | Bureau of Meteorology (Australia) |
| Calibration | Process of verifying and adjusting measurement accuracy |
| CSV | Comma-Separated Values file format |
| Dust Ranger | Mobile dust monitoring device mounted on vehicles |
| Edge Function | Serverless function running on Supabase infrastructure |
| Flow Meter | Device measuring water flow/usage |
| Geofence | Virtual geographic boundary for data grouping |
| Heatmap | Visual representation of data density on a map |
| JWT | JSON Web Token for authentication |
| Mass Concentration (MC) | Particle mass per unit volume (µg/m³) |
| Mine Site | Physical mining operation location |
| Number Concentration (NC) | Particle count per unit volume (particles/cm³) |
| Particulate Matter (PM) | Airborne particles of various sizes |
| Portable Document Format | |
| PM1.0 | Particles ≤1.0 micrometers |
| PM2.5 | Particles ≤2.5 micrometers |
| PM4.0 | Particles ≤4.0 micrometers |
| PM10 | Particles ≤10 micrometers |
| RBAC | Role-Based Access Control |
| Refill | Water tank replenishment event |
| RLS | Row-Level Security (PostgreSQL feature) |
| Scraper | Automated data collection service |
| SPA | Single Page Application |
| Supabase | Backend-as-a-Service platform |
| Tank Correction | Manual adjustment to tank level reading |
Appendix B: Requirements Traceability Matrix
| Requirement ID | SDD Section | Test Case | Status |
|---|---|---|---|
| FR-AUTH-001 | 4.4 | TC-AUTH-001 | Implemented |
| FR-AUTH-002 | 4.4 | TC-AUTH-002 | Implemented |
| FR-AUTH-003 | 4.4 | TC-AUTH-003 | Implemented |
| FR-AUTH-004 | 4.4 | TC-AUTH-004 | Implemented |
| FR-AUTH-005 | 4.4 | TC-AUTH-005 | Implemented |
| FR-RBAC-001 | 11 | TC-RBAC-001 | Implemented |
| FR-RBAC-002 | 11 | TC-RBAC-002 | Implemented |
| FR-RBAC-003 | 11 | TC-RBAC-003 | Implemented |
| FR-RBAC-004 | 11 | TC-RBAC-004 | Implemented |
| FR-RBAC-005 | 11 | TC-RBAC-005 | Implemented |
| FR-DATA-001 | 5.1 | TC-DATA-001 | Implemented |
| FR-DATA-002 | 5.1 | TC-DATA-002 | Implemented |
| FR-DATA-003 | 5.1 | TC-DATA-003 | Implemented |
| FR-DATA-004 | 5.1 | TC-DATA-004 | Implemented |
| FR-DATA-005 | 5.1 | TC-DATA-005 | Implemented |
| FR-DASH-001 | 10.1 | TC-DASH-001 | Implemented |
| FR-DL-001 | 10.2 | TC-DL-001 | Implemented |
| FR-FM-001 | 10.3 | TC-FM-001 | Implemented |
| FR-DR-001 | 10.4 | TC-DR-001 | Implemented |
| FR-RPT-001 | 10.5 | TC-RPT-001 | Implemented |
| FR-WR-001 | 10.6 | TC-WR-001 | Implemented |
| FR-HM-001 | 10.7 | TC-HM-001 | Implemented |
| FR-ES-001 | 10.8 | TC-ES-001 | Implemented |
| FR-UM-001 | 10.9 | TC-UM-001 | Implemented |
| FR-AM-001 | 10.10 | TC-AM-001 | Implemented |
| FR-MS-001 | 10.11 | TC-MS-001 | Implemented |
| FR-SET-001 | 10.12 | TC-SET-001 | Implemented |
| FR-UP-001 | 10.13 | TC-UP-001 | Implemented |
| FR-CL-001 | 10.14 | TC-CL-001 | Implemented |
Appendix C: Document Revision History
| Version | Date | Author | Changes |
|---|---|---|---|
| 1.0 | February 2026 | Development Team | Initial SRS based on implemented system |
Appendix D: Cross-Reference to System Design Document
| SRS Section | SDD v2 Section | Description |
|---|---|---|
| 2.1 Product Perspective | 2.1 General Overview | System context and boundaries |
| 2.3 User Classes | 1.3 Intended Audience | User types and characteristics |
| 3.2 Authentication | 4.4 Security Architecture | Authentication requirements |
| 3.3 RBAC | 11 RBAC and Permissions | Authorization requirements |
| 4.3 Software Interfaces | 9 External Interfaces | External system integrations |
| 5.1 Performance | 3.4 Performance Engineering | Performance targets |
| 5.3 Security | 4.4 Security Architecture | Security requirements |
| 6.1-6.14 Feature Modules | 10 Feature Modules | Module specifications |
| 7.1 Database Schema | 5.1 Database Design | Data structure |
End of Document