Skip to main content
Version: Fleeto

Dashboard (Admin)

Author(s)

  • Sanket Mal
  • Dipak Mourya

Last Updated Date

2025-06-17


SRS References


Version History

VersionDateChangesAuthor
1.02025-06-17Initial draftSanket Mal, Dipak Mourya

Feature Overview

Objective:
Provide a real-time, actionable dashboard for EV bike B2B business users, summarizing orders, revenue, warranty, inventory, dealer performance, top sellers, and salesmen.

Scope:

  • Dashboard is read-only, focused on analytics and reporting.
  • No direct data manipulation from dashboard.
  • Data is aggregated from backend APIs.

Dependencies:

  • Backend APIs
  • Responsive web frontend

Requirements

  1. Display total orders, revenue summary, warranty summary, and total scooter count as widgets.
  2. Show revenue and inventory trends over a selected date range.
  3. List dealer performance, top scooter sellers, and top salesmen for a date range.
  4. All date filters are via query parameters (startDate, endDate).
  5. Dashboard must be responsive and role-aware.

Design Specifications

  • UI/UX Design:

    • Four main widgets: Total Orders, Revenue, Warranty, Inventory.
    • Two charts: Revenue by Month, Inventory by Model.
    • Three tables: Dealer Performance, Top Scooter Sellers, Top Salesmen.
    • Date range picker at the top.

Alt Text

  • Data Models:

    public record OrdersStats
    {
    public int TotalOrders { get; init; }
    public Dictionary<PurchaseRequestStatus, int> StatusWiseOrderCounts { get; init; } = new();
    }

    public record RevenueStats
    {
    public decimal TotalOrderAmount { get; init; }
    public decimal TotalPayments { get; init; }
    public decimal PendingDue { get; init; }
    }
    public record WarrantyStats
    {
    public int TotalTicketCount { get; init; }
    public int RepairedCount { get; init; }
    public int RejectedCount { get; init; }
    public int ReplacedCount { get; init; }
    public int ProcessingCount { get; init; }
    }
    public record ScooterSalesSummary
    {
    public int TotalScooterSold { get; init; }
    }
    public record RevenueData
    {
    public decimal Revenue { get; init; }
    }
    public record DealerPerformanceData
    {
    public string DealerName { get; init; } = string.Empty;
    public string DealerCode { get; init; } = string.Empty;
    public int DealershipType { get; init; }
    public int OrderCount { get; init; }
    public decimal TotalOrderAmount { get; init; }
    }
    public record TopSellingScooter
    {
    public string ProductId { get; init; } = string.Empty;
    public string ProductName { get; init; } = string.Empty;
    public string ProductCode { get; init; } = string.Empty;
    public string Model { get; init; } = string.Empty;
    public int TotalSold { get; init; }
    public decimal TotalOrderAmount { get; init; }
    }
    public record TopSellingModels
    {
    public required string Model { get; init; };
    public int TotalSold { get; init; }
    }
    public record TopSalesman
    {
    public string SalesManagerId { get; init; } = string.Empty;
    public string SalesManagerName { get; init; } = string.Empty;
    public int TotalOrders { get; init; }
    public int TotalSales { get; init; }
    public decimal TotalOrderAmount { get; init; }
    public string Region { get; init; } = string.Empty;
    }
  • API Interfaces:

    EndpointMethodParametersResponseStatus Codes
    /api/dashboard/orders/totalGETstartDate, endDate (query)OrdersStats200, 500
    /api/dashboard/revenue/summaryGETstartDate, endDate (query)RevenueStats200, 500
    /api/dashboard/warranty/summaryGETstartDate, endDate (query)WarrantyStats200, 500
    /api/dashboard/sales/summaryGETstartDate, endDate (query)ScooterSalesSummary200, 500
    /api/dashboard/revenueGETstartDate, endDate (query)List<RevenueData>200, 500
    /api/dashboard/inventoryGETstartDate, endDate (query)List<InventoryItem>200, 500
    /api/dashboard/dealers/performanceGETstartDate, endDate (query)List<DealerPerformanceData>200, 500
    /api/dashboard/top-selling-scootersGETstartDate, endDate (query)List<TopSellingScooter>200, 500
    /api/dashboard/top-selling-modelsGETstartDate, endDate (query)List<TopSellingModel>200, 500
    /api/dashboard/top-salesmanGETstartDate, endDate (query)List<TopSalesman>200, 500
  • Third-Party Integrations:

  • Workflow:

    1. User logs in and lands on dashboard.
    2. Dashboard fetches summary widgets (orders, revenue, warranty, inventory).
    3. User selects date range; dashboard fetches charts and tables for that range.
    4. Data updates in real time as filters change.

Backend Development Tasks & Estimates

NoTask NameEstimate (Hours)DependenciesNotes
1Planning for Dashboard Feature2NoneRequirements, API, DB design
2Develop: Get Total Orders API2Task 1/api/dashboard/orders/total
3Test: Get Total Orders API1Task 2
4Develop: Get Revenue Summary API2Task 1/api/dashboard/revenue/summary
5Test: Get Revenue Summary API1Task 4
6Develop: Get Warranty Summary API2Task 1/api/dashboard/warranty/summary
7Test: Get Warranty Summary API1Task 6
8Develop: Get Total Scooter Count API2Task 1/api/dashboard/inventory/total-scooters
9Test: Get Total Scooter Count API1Task 8
10Develop: Get Revenue by Month API4Task 1/api/dashboard/revenue
11Test: Get Revenue by Month API1Task 10
12Develop: Get Dealer Performance API4Task 1/api/dashboard/dealers/performance
13Test: Get Dealer Performance API1Task 12
14Develop: Get Top Selling Scooter API4Task 1/api/dashboard/top-selling-scooter
15Test: Get Top Selling Scooter API1Task 14
16Develop: Get Top Salesmen API4Task 1/api/dashboard/top-salesman
17Test: Get Top Salesmen API1Task 16
18Documentation for Dashboard Feature3All above
19Create 4 mock APIs for dashboard statistics, including Total Orders, Warranty Summary, Revenue, etc.2
20Create a mock API for dashboard Revenue data graph.1
21Create a mock API for dashboard Inventory data graph.1
22Create a mock API for dashboard Distributor-wise performance data.1
23Create a mock API for dashboard Warranty Claims data.1
24Create a filter for date range selection on the dashboard.1.5
25Create a UI screen for the dashboard page to display graphs.2
26Create a UI screen to display admin statistics.1
27Create a UI screen to display the Warranty table, Top Sellers, Top Distributors, and Top Scooter Sales.4
28Ensure all API responses are properly tested and the UI responds correctly with loaders, error messages, etc. Also, ensure correct integration of Faker APIs and server APIs from both frontend and backend.2
29Develop: Get Top Selling Model API4Task 1/api/dashboard/top-selling-model
30Test: Get Top Selling Model API1Task 29
31Develop and Mock API for top selling model1Task 1/api/dashboard/top-selling-model
32Add a top selling model table in Dashboard UI and Test it1.5Task 1
Total61

Testing & Quality Assurance

  • Unit Tests:

    • X unit
  • Integration Tests:

    • End-to-end dashboard data flow
    • Role-based UI
  • Acceptance Criteria:

    • All widgets, charts, and tables display correct data for selected date range.
    • UI is responsive and adapts to user role.
  • Testing Tools:


Deployment Considerations

  • Configuration Changes:

    • API base URL
  • Rollout Plan:

    • Deploy to staging, verify with test users, then production.

Risks & Mitigations

RiskImpactLikelihoodMitigation Strategy
API downtimeHighMediumFallback UI, error messages
UI performance on mobileMediumMediumOptimize rendering, lazy load

Review & Approval

  • Reviewer:
    Abhishak Kumar Roy

  • Approval Date:
    2025-07-03