AnalyticsAndLogs - IEEE-Team-3/map GitHub Wiki

Overview

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.

Key Features

  • 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.

Example Logs

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 },
});

Example Analytics Dashboard

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]  |
+-----------------------------+--------------------------+
⚠️ **GitHub.com Fallback** ⚠️