AnalyticsAndLogs - IEEE-Team-3/map GitHub Wiki
The Analytics and Logs feature allows administrators to monitor the activity within the application, track user actions, and analyze key performance metrics. This helps ensure the system operates efficiently and can help identify and troubleshoot issues.
- User Activity Logs: Track when users log in, perform actions, and interact with the app.
- Error Logs: Log errors that occur within the app, including failed API calls, system crashes, and other issues.
- Performance Metrics: Measure system performance, including page load times, server response times, and database queries.
- Audit Trail: Keep a history of changes made by admins, such as changes in roles, team structures, and permissions.
const UserActivityLogSchema = new Schema({
userId: { type: Schema.Types.ObjectId, ref: 'User' },
action: { type: String },
timestamp: { type: Date, default: Date.now },
});
const ErrorLogSchema = new Schema({
message: { type: String },
stackTrace: { type: String },
timestamp: { type: Date, default: Date.now },
});
The admin dashboard will display various graphs, charts, and tables showing user engagement, system performance, and error trends over time.
+-----------------------------+--------------------------+
| User Activity | Performance Metrics |
|-----------------------------|--------------------------|
| [Bar Chart] | [Line Graph] |
| | |
| [Pie Chart] | [Table: Response Times] |
+-----------------------------+--------------------------+