Real-Dev-Squad / todo-action-items

A running list of todo items for Real Dev Squad site
MIT License
4 stars 8 forks source link

Design Document: Profile Services Logs Page #234

Open lakshayman opened 3 weeks ago

lakshayman commented 3 weeks ago

Profile Services Logs Page

Objective

Create a web page that allows super users to view logs related to profile services. The page will include checkboxes for filtering log types and pagination controls. Additionally, create an API that provides summary statistics about developers' interactions with profile services.

Requirements

Frontend Page

Backend API

API Design

Logs Endpoint

Statistics Endpoint

Frontend Components

1. Checkboxes for Log Types

2. Log List

3. Pagination Controls

4. Summary Statistics

User Flow

  1. Page Load:
    • Fetch initial logs with all log types selected by default.
    • Fetch and display summary statistics.
  2. Filter Logs:
    • User selects/deselects checkboxes to filter logs by type.
    • Fetch and display filtered logs.
  3. Pagination:
    • User navigates using Next and Previous buttons.
    • Fetch and display logs for the selected page.

Backend Integration

  1. Logs Fetching:
    • Endpoint: /logs
    • Query Parameters: Based on selected log types and current page.
    • Display logs in the log list container.
  2. Statistics Fetching:
    • Endpoint: /profile-diffs/stats
    • Display statistics in a dedicated section on the page.

Future Enhancements

Conclusion

This design document outlines the creation of a Profile Services Logs Page with log type filters, pagination controls, and an API to fetch logs and summary statistics. By following this design, you can implement a user-friendly interface for super users to manage and view profile service logs and statistics efficiently.

lakshayman commented 3 weeks ago

We can also add PROFILE_STORED type of logs.