A comprehensive web-based maintenance management system built with Python and Streamlit, featuring Google Earth integration for asset and work order tracking.
- Asset Management - Hierarchical asset register (Class → Group → Type → Asset)
- Work Order Management - Complete work order lifecycle management
- Inspection Management - Asset inspection scheduling and tracking
- Reporting & Analytics - Comprehensive dashboards and reports
- Google Earth Integration - KML export for visual tracking
- GPS coordinate storage for all assets
- Interactive map views using Folium
- Google Earth KML export for assets, work orders, and inspections
- Visual color-coding based on status, priority, and condition
- Executive dashboard with KPIs
- Asset condition reports
- Work order trends and analytics
- Maintenance cost analysis
- Performance metrics
- Python 3.8 or higher
- pip package manager
- Clone or download the project
cd maintenance_management_system- Create a virtual environment (recommended)
python -m venv venv
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate- Install dependencies
pip install -r requirements.txt- Create data directory
mkdir -p datastreamlit run app.pyThe application will open in your default web browser at http://localhost:8501
On first run, the system will automatically:
- Create the SQLite database
- Initialize default asset classes:
- Road Infrastructure
- Stormwater Drainage Infrastructure
- Recreational Infrastructure
- Building Structures
- Miscellaneous
- Navigate to Asset Management → Asset Hierarchy
- Create Asset Classes (top-level categories)
- Add Asset Groups within each class
- Define Asset Types within each group
- Go to Asset Management → Add New Asset
- Fill in asset details:
- Asset ID (unique identifier)
- Name and description
- Asset type
- Location (address and GPS coordinates)
- Condition rating
- Financial information
- Submit to create the asset
- Asset Register - Tabular view with filters
- Asset Map - Geographic visualization
- Click on any asset to view detailed information
- Navigate to Work Order Management → Create Work Order
- Enter work order details:
- Title and description
- Associated asset
- Work type and priority
- Assignment and scheduling
- Cost estimates
- Optionally override location from asset
- Filter by status, priority, type
- View on interactive map
- Monitor completion rates
- Track costs and labor hours
- Go to Inspection Management → Create Inspection
- Select asset and inspection type
- Record findings:
- Condition rating
- Defects found
- Recommendations
- Follow-up requirements
- View all inspections with filters
- Track defect rates
- Monitor follow-up requirements
- Export inspection data
- View key performance indicators
- Asset condition overview
- Work order trends
- System statistics
- Asset register summary
- Condition reports
- Valuation reports
- Location reports
- Work order summaries
- Cost analysis
- Inspection reports
- Performance metrics
- Navigate to any map view (Assets, Work Orders, or Inspections)
- Click "Export to Google Earth (KML)"
- Download the KML file
- Open in Google Earth to visualize
- Use sidebar "Export All to Google Earth" for complete export
- Generates separate KML files for assets, work orders, and inspections
SQLite database is stored at: data/maintenance_management.db
To backup your data, simply copy the database file:
cp data/maintenance_management.db data/maintenance_management_backup.dbThe system includes the following main tables:
asset_classes- Top-level asset categoriesasset_groups- Mid-level groupingsasset_types- Detailed asset typesassets- Individual asset recordswork_orders- Maintenance work ordersinspections- Inspection recordsusers- User managementaudit_logs- Audit trail
Edit config/settings.py to customize:
- Database path
- Default map center coordinates
- Asset classes
- Status options
- Priority levels
- Work order types
- Inspection types
maintenance_management_system/
├── app.py # Main application
├── requirements.txt # Python dependencies
├── config/
│ └── settings.py # Configuration settings
├── modules/
│ ├── database.py # Database models
│ ├── asset_management.py # Asset management module
│ ├── work_order_management.py # Work order module
│ ├── inspection_management.py # Inspection module
│ ├── reporting.py # Reporting & analytics
│ └── google_earth.py # KML export functionality
└── data/
└── maintenance_management.db # SQLite database (created on first run)✅ Hierarchical asset structure (Class/Group/Type)
✅ GPS coordinate tracking
✅ Asset condition rating (1-5 scale)
✅ Financial tracking (acquisition cost, current value)
✅ Asset status management
✅ Interactive map visualization
✅ KML export for Google Earth
✅ Work order creation and tracking
✅ Priority-based management (Critical/High/Medium/Low)
✅ Status workflow (Open/In Progress/On Hold/Completed/Cancelled)
✅ Cost tracking (estimated vs actual)
✅ Labor hours tracking
✅ Assignment management
✅ Location override capability
✅ Map-based visualization
✅ Inspection scheduling
✅ Defect detection and recording
✅ Condition assessment
✅ Follow-up tracking
✅ Inspector assignment
✅ Recommendations capture
✅ Work order generation from inspections
✅ Executive dashboard
✅ Asset condition reports
✅ Asset valuation reports
✅ Work order analytics
✅ Cost analysis
✅ Performance metrics
✅ Trend visualization
✅ Export capabilities (CSV, Excel)
If you encounter database errors:
# Delete the database and restart (WARNING: loses all data)
rm data/maintenance_management.db
streamlit run app.pyIf you get import errors:
# Reinstall dependencies
pip install -r requirements.txt --upgradeIf port 8501 is busy:
streamlit run app.py --server.port 8502Planned features for future versions:
- User authentication and role-based access control
- Email notifications for work orders and inspections
- Mobile app integration
- Barcode/QR code scanning
- Predictive maintenance using ML
- Integration with external systems (ERP, Finance)
- Automated report scheduling
- Document attachment support
- Custom workflow configuration
For issues, questions, or feature requests:
- Email: support@example.com
- Documentation: [Link to documentation]
- GitHub Issues: [Link to issue tracker]
[Your License Here]
Built with:
- Streamlit - Web framework
- SQLAlchemy - Database ORM
- Folium - Map visualization
- Plotly - Interactive charts
- SimpleKML - Google Earth integration
Version: 1.0.0
Last Updated: October 2025