File size: 4,957 Bytes
952d509
 
 
 
 
 
410fe54
952d509
 
 
278a9dc
952d509
278a9dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
952d509
278a9dc
952d509
 
 
 
 
 
278a9dc
952d509
 
278a9dc
952d509
278a9dc
952d509
278a9dc
 
 
 
952d509
278a9dc
 
 
 
952d509
278a9dc
 
 
 
952d509
278a9dc
 
 
 
 
952d509
278a9dc
952d509
278a9dc
 
 
 
952d509
278a9dc
952d509
278a9dc
952d509
278a9dc
 
 
 
 
 
952d509
278a9dc
952d509
278a9dc
952d509
278a9dc
952d509
278a9dc
 
952d509
278a9dc
952d509
278a9dc
952d509
278a9dc
952d509
278a9dc
 
 
 
952d509
278a9dc
952d509
278a9dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
952d509
278a9dc
952d509
278a9dc
952d509
278a9dc
 
 
 
952d509
278a9dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
952d509
 
 
278a9dc
952d509
278a9dc
 
 
 
 
 
952d509
278a9dc
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
---
title: mona
emoji: πŸ€–
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 5.34.2
app_file: app.py
pinned: false
---
# MONA Dashboard

MONA (Monitoring & Analytics) is a comprehensive Streamlit dashboard application for data visualization, monitoring, and analytics.

## πŸš€ Features

- **Interactive Dashboard**: Real-time data visualization with multiple chart types
- **Data Upload & Analysis**: Support for CSV, Excel, JSON, and Parquet files
- **Real-time Monitoring**: Live system metrics and performance tracking
- **Configurable Settings**: Customizable themes, layouts, and preferences
- **Error Handling**: Robust error management and logging
- **Data Storage**: In-memory and session-based data persistence

## πŸ“ Project Structure

```
mona/
β”œβ”€β”€ app.py                 # Main application entry point
β”œβ”€β”€ requirements.txt       # Python dependencies
β”œβ”€β”€ README.md             # Project documentation
β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ dashboard.py      # Main dashboard page
β”‚   └── settings.py       # Settings and configuration page
└── utils/
    β”œβ”€β”€ config.py         # Configuration management
    β”œβ”€β”€ storage.py        # Data storage utilities
    β”œβ”€β”€ error_handling.py # Error handling and decorators
    └── logging.py        # Logging utilities
```

## πŸ› οΈ Installation

1. Clone or download the project files
2. Install dependencies:
   ```bash
   pip install -r requirements.txt
   ```
3. Run the application:
   ```bash
   streamlit run app.py
   ```

## πŸ“Š Usage

### Dashboard Features

1. **Overview Tab**: 
   - Key metrics and KPIs
   - Trend analysis charts
   - Category distribution visualizations

2. **Analytics Tab**:
   - Date range filtering
   - Multiple chart types (Line, Bar, Scatter, Area, Histogram)
   - Customizable metrics selection

3. **Data Upload Tab**:
   - File upload support (CSV, Excel, JSON)
   - Data preview and summary
   - Basic analytics on uploaded data

4. **Real-time Tab**:
   - Live system monitoring
   - Performance metrics (CPU, Memory, Network)
   - System status indicators
   - Event logs

### Settings Configuration

- **General Settings**: Application name, performance parameters
- **Display Settings**: Themes, chart types, layout preferences
- **Data Settings**: File size limits, supported formats, cache settings
- **System Settings**: Configuration management, debug options

## πŸ”§ Configuration

The application uses a configuration system with the following defaults:

- **Max Data Points**: 1000
- **Refresh Interval**: 30 seconds
- **Default Chart**: Line chart
- **Theme**: Light mode
- **File Size Limit**: 10MB
- **Supported Formats**: CSV, Excel, JSON, Parquet

Configuration can be modified through the Settings page or environment variables.

## πŸ—„οΈ Data Storage

The application supports two storage types:

1. **Memory Storage**: Temporary storage for the current session
2. **Session Storage**: Streamlit session state persistence

Data is automatically managed and can be cleared through the Settings page.

## 🚨 Error Handling

The application includes comprehensive error handling:

- **Data Exceptions**: Validation and processing errors
- **UI Exceptions**: Interface and rendering errors
- **File Operations**: Upload and processing errors
- **Configuration Errors**: Settings and validation errors

All errors are logged and displayed to users with appropriate messages.

## πŸ“ Logging

Logging is configured with:

- **Log Level**: INFO (configurable)
- **Format**: Timestamp, Logger Name, Level, Message
- **Output**: Console/stdout
- **Functions**: `log_error`, `log_info`, `log_warning`, `log_debug`

## πŸ”’ Security Notes

- File uploads are limited by size and type
- No persistent file storage on server
- Session-based data isolation
- Input validation and sanitization

## πŸ› Troubleshooting

### Common Issues

1. **Import Errors**: Ensure all dependencies are installed via `requirements.txt`
2. **File Upload Issues**: Check file size limits and supported formats
3. **Performance Issues**: Adjust max data points in settings
4. **Memory Issues**: Clear storage regularly or reduce data cache timeout

### Debug Mode

Enable debug mode in General Settings to:
- View detailed error information
- Access session state data
- See configuration details
- Enable developer options

## 🀝 Contributing

To contribute to this project:

1. Report bugs through issues
2. Suggest features and improvements
3. Submit pull requests with fixes
4. Follow the existing code structure and style

## πŸ“„ License

This project is open source and available under standard terms.

## πŸ”„ Version History

- **v1.0.0**: Initial release with core dashboard functionality
- Bug fixes and feature updates as needed

## πŸ“ž Support

For support and questions:
- Check the troubleshooting section
- Review error logs in debug mode
- Ensure all dependencies are properly installed