Skip to content

Software Requirement Specification (SRS) - Pump Management & Analytics System

FieldDetail
Company Nameruizdev7
Document TitlePump Management & Analytics System - SRS
Document NumberSRS-003
Version1.0
Specification Date17-November-24
StatusImplemented
RoleNameDate
Project ManagerJoseph Ruiz17-November-24
Tech LeadJoseph Ruiz17-November-24
VersionDateChanges MadeAuthor
1.017-November-24Initial SRS DocumentationJoseph Ruiz

This document specifies the requirements for the implementation of a comprehensive Pump Management and Analytics System in the ruizdev7 Portfolio application.
The objective is to provide industrial equipment managers with tools to track pump inventory, monitor performance specifications, manage maintenance schedules, upload photos, and analyze operational data through interactive charts and visualizations.

The Pump Management & Analytics System includes the following components:

  • Pump CRUD Operations: Complete create, read, update, delete functionality for industrial pumps.
  • Photo Management: Upload, store, and display multiple photos per pump with secure file handling.
  • Specifications Tracking: Monitor technical specifications (flow rate, pressure, power, efficiency, voltage, current, power factor).
  • Maintenance Scheduling: Track last maintenance date and schedule next maintenance.
  • Data Analytics: Interactive charts using ECharts and AG Charts for performance analysis.
  • TanStack Table Integration: Advanced table with sorting, filtering, and pagination.
  • Export Capabilities: Export pump data to Excel format.
  • Audit Logging: Track all pump modifications for compliance.
  • Permission-Based Access: Role-based authorization for pump management.

The implementation ensures:

  • Data integrity for industrial equipment records
  • Secure file upload and storage
  • Scalable analytics infrastructure
  • Compliance with audit requirements
  • Pump: Industrial water or fluid pump equipment with technical specifications and maintenance records.
  • Specifications: Technical parameters including flow rate (L/min), pressure (bar), power (kW), efficiency (%), voltage (V), current (A), and power factor.
  • Maintenance Window: Period between last maintenance and next scheduled maintenance.
  • Photo Management: System for uploading, storing, and displaying pump images with UUID-based naming.
  • Audit Log: Immutable record of all pump creation, modification, and deletion events.
  • Analytics Dashboard: Interactive visualizations for pump performance analysis.

Priority: High
Description:

FieldDetail
Use Case NameCreate Pump Record
Subject AreaEquipment Management
Business EventThis use case applies when an authorized user wants to register a new pump in the system.
ActorsUser with pumps.create permission, ruizdev7 Platform.
Use Case OverviewThis use case covers creating a new pump record with specifications, photos, and maintenance schedules.
PreconditionsUser must be authenticated and have pumps.create permission.
Termination OutcomeNew pump is created with all specifications and photos stored. Audit log entry is created.
Condition Affecting OutcomeMissing required fields, invalid file formats, or database errors.
Use Case DescriptionThe system validates input data, processes uploaded photos (max 5MB, formats: png/jpg/jpeg/gif/webp), stores them with UUID naming, creates pump record, and logs the action.
Use Case AssociationsUC-021: View Pump Details, UC-022: Update Pump, UC-024: Upload Pump Photos.
Traceability ToSRS-003.
Input SummaryModel, serial number, location, purchase date, status, specifications (flow rate, pressure, power, efficiency, voltage, current, power factor), maintenance dates, user ID, optional photos.
Output SummaryCreated pump with unique ID and stored photos.
Usability IndexHigh, essential for equipment inventory management.
Use Case NotesAll technical specifications are required. Photos are optional but recommended for maintenance reference.
CriterionDescription / Acceptance Condition
Pump CreationAuthorized users can create pumps with all specifications and photos.
Photo UploadSystem accepts png/jpg/jpeg/gif/webp files up to 5MB.
Photo StoragePhotos stored with UUID naming in pump-specific directories.
Specifications TrackingAll 7 technical specifications are captured and validated.
Maintenance SchedulingLast and next maintenance dates are tracked.
Data RetrievalPump data can be retrieved with sub-200ms response time.
AnalyticsInteractive charts display pump performance metrics.
Table InterfaceTanStack Table supports sorting, filtering, pagination.
Excel ExportUsers can export pump data to Excel format.
Audit LoggingAll CRUD operations are logged with user, timestamp, and changes.
Permission EnforcementOnly authorized users can perform CRUD operations.
CategoryRequirement
PerformancePump retrieval <200ms, list queries <500ms, photo uploads <2 seconds.
SecuritySecure file upload validation, path traversal prevention, authorization checks.
Availability99.95% uptime for pump management system.
ScalabilitySupport for 10,000+ pump records with 50,000+ photos.
StorageEfficient file storage with UUID naming to prevent conflicts.
Data IntegrityForeign key constraints, NOT NULL validations, audit trail.
UsabilityIntuitive CRUD interface with drag-and-drop photo upload.

Table: tbl_pumps

  • ccn_pump (Primary Key, Auto-increment)
  • model (String, Required)
  • serial_number (String, Unique, Required)
  • location (String, Required)
  • purchase_date (Date, Required)
  • status (Enum: active/inactive/maintenance, Required)
  • flow_rate (Float, L/min, Required)
  • pressure (Float, bar, Required)
  • power (Float, kW, Required)
  • efficiency (Float, %, Required)
  • voltage (Float, V, Required)
  • current (Float, A, Required)
  • power_factor (Float, Required)
  • last_maintenance (Date, Required)
  • next_maintenance (Date, Required)
  • user_id (Foreign Key -> tbl_users, Required)
  • photos (JSON, Array of filenames)
  • created_at (Timestamp, Auto-generated)
  • updated_at (Timestamp, Auto-updated)
portfolio_app/
static/
pumps/
{pump_id}/
{uuid}.jpg
{uuid}.png
...
MethodEndpointDescriptionAuthPermission
POST/api/v1/pumpsCreate pumpYespumps.create
GET/api/v1/pumpsList pumpsYespumps.read
GET/api/v1/pumps/{id}Get pump detailsYespumps.read
PUT/api/v1/pumps/{id}Update pumpYespumps.update
DELETE/api/v1/pumps/{id}Delete pumpYespumps.delete
POST/api/v1/pumps/{id}/photosUpload photosYespumps.update
GET/api/v1/pumps/{id}/photos/{filename}Get photoYespumps.read

Chart Types:

  1. Efficiency Distribution (Bar Chart)
  2. Flow Rate vs Pressure (Scatter Plot)
  3. Power Consumption Trends (Line Chart)
  4. Maintenance Schedule (Timeline)
  5. Status Distribution (Pie Chart)

Technologies:

  • ECharts (echarts-for-react)
  • AG Charts (ag-charts-react)
  • TanStack Table (@tanstack/react-table)
  • XLSX Export (xlsx library)

File Upload:

  • Allowed extensions: png, jpg, jpeg, gif, webp
  • Max file size: 5MB
  • Secure filename generation with UUID

Specifications:

  • All numeric fields must be positive
  • Efficiency must be between 0-100%
  • Power factor must be between 0-1
  • Dates must be valid and parsable

All pump operations are logged via AuditLogService:

  • Action type (create/update/delete)
  • User ID
  • Pump ID
  • Timestamp
  • Before/after values (for updates)
  • IP address
  • User agent
FieldDetail
Stakeholdersruizdev7 Team, Industrial Equipment Managers
Attachments[API_DOCUMENTATION.md]
Tech StackFlask, SQLAlchemy, Marshmallow, ECharts, AG Charts, TanStack Table
Frontend ComponentsPumpCRUD, PumpDetails, PumpModal, PumpTableTanStack, DataAnalysisContentECharts, PhotoUpload, PhotoModal
Name/TitleSignatureDate
Client Representativeruizdev717-November-24
Company Representativeruizdev717-November-24