E-Trans Admin System Documentation
Table of Contents
- Overview
- Module Hierarchy
-
- Company
- Customer
- Vehicle
- Route
- Material
- Trip
- Bill
- Credit Note
- Dashboard Summary
- GSTR-1 Report
- API Mapping
- Filters and Computed Summaries
- Authentication and Token Refresh Flow
- Notes on Aggregation and Computation Logic
Overview
E-Trans Admin is a comprehensive logistics and financial reporting platform. It allows users to manage operational entities (Company, Customer, Vehicle, Route, Material, Trip, Bill, Credit Note) and generate both real-time summaries and GST-compliant reports (GSTR-1).
The system uses:
- Vue 3 + Composition API for the frontend
- Axios with JWT authentication for API requests
- Reactive filtering and computed summaries for dynamic dashboards
- Module-based structure for modular maintenance
Module Hierarchy
E-Trans Admin
│
├── Company
├── Customer
├── Vehicle
├── Route
├── Material
├── Trip
├── Bill
├── Credit Note
├── Dashboard Summary
│ ├── Filters
│ ├── Summary Cards
│ ├── Charts
│ └── Paginated Invoices Table
└── GSTR-1 Report
├── Filters
├── Summary Cards
├── Customer-wise Aggregation
├── B2B / B2C Reports
└── HSN Summary
Module Details
Company Module
- Purpose: Manage company master data
- Key Entities: Name, Address, GSTIN, PAN, Contact
-
APIs:
GET /company→ List companiesPOST /company→ Create companyPUT /company/{id}→ Update companyDELETE /company/{id}→ Delete company
Customer Module
- Purpose: Manage customer information
- Key Fields: Name, GSTIN, Contact, Billing Address
-
APIs:
GET /customer→ List customersPOST /customer→ Create customerPUT /customer/{id}→ Update customerDELETE /customer/{id}→ Delete customer
Vehicle Module
- Purpose: Manage vehicles used for trips
- Key Fields: Vehicle Number, Type, Owner, Capacity
-
APIs:
GET /vehicle→ List vehiclesPOST /vehicle→ Create vehiclePUT /vehicle/{id}→ Update vehicleDELETE /vehicle/{id}→ Delete vehicle
Route Module
- Purpose: Define and manage transportation routes
- Key Fields: Route Name, Source, Destination, Distance
-
APIs:
GET /route→ List routesPOST /route→ Create routePUT /route/{id}→ Update routeDELETE /route/{id}→ Delete route
Material Module
- Purpose: Manage material inventory and descriptions
- Key Fields: Material Name, Code, Unit, HSN Code
-
APIs:
GET /material→ List materialsPOST /material→ Create materialPUT /material/{id}→ Update materialDELETE /material/{id}→ Delete material
Trip Module
- Purpose: Track logistics trips
- Key Fields: Trip No, Vehicle, Material, Quantity, Route, Dates
-
APIs:
GET /trip→ List tripsPOST /trip→ Create tripPUT /trip/{id}→ Update tripDELETE /trip/{id}→ Delete trip
Bill Module
- Purpose: Generate invoices for completed trips
- Key Fields: Bill No, Customer, Trip(s), Taxable Amount, GST
-
B2B vs B2C:
- B2B → GSTIN present
- B2C → GSTIN absent
-
APIs:
GET /bill→ List invoicesPOST /bill→ Create invoicePUT /bill/{id}→ Update invoiceDELETE /bill/{id}→ Delete invoice
Credit Note Module
- Purpose: Adjust invoices for returns or corrections
- Key Fields: Credit Note No, Original Bill No, Amount, Reason
-
APIs:
GET /credit-note→ List credit notesPOST /credit-note→ Create credit notePUT /credit-note/{id}→ Update credit noteDELETE /credit-note/{id}→ Delete credit note
Dashboard Summary Module
- Filters: Year/Month/Quarter, Start/End Date, Search (Customer/Vehicle/Bill No)
- Summary Cards: Total Revenue, Total Received, Total Pending
- Charts: Top 5 Customers, Monthly Revenue, Pending vs Received, Vehicle Revenue
- Invoices Table: Paginated with totals
GSTR-1 Report Module
- Filters: Customer, From Date, To Date
- Summary Cards: Total Taxable, CGST, SGST, IGST
- Customer-wise Aggregation: GSTIN-based totals
- B2B / B2C Reports: Separate tables
- HSN Summary: Material-wise quantity aggregation
API Mapping
| Module | Endpoint | Method | Parameters | Description |
|---|---|---|---|---|
| Company | /company |
GET | page, size |
Fetch company list |
| Customer | /customer |
GET | page, size |
Fetch customer list |
| Vehicle | /vehicle |
GET | page, size |
Fetch vehicle list |
| Route | /route |
GET | page, size |
Fetch route list |
| Material | /material |
GET | page, size |
Fetch material list |
| Trip | /trip |
GET | page, size |
Fetch trip list |
| Bill | /bill |
GET | page, size |
Fetch invoice list |
| Credit Note | /credit-note |
GET | page, size |
Fetch credit notes |
| Dashboard Summary | /dashboard/summary |
GET | year, month, startDate, endDate, search, page, size |
Summary cards, charts, paginated bills |
| Dashboard Summary | /dashboard/suggestions |
GET | query |
Autocomplete for filters |
| GSTR-1 Report | /dashboard/filter |
GET | customerId, fromDate, toDate, page, size |
Filtered report data |
| Authentication | /auth/login |
POST | username, password |
Login |
| Authentication | /auth/refresh |
POST | refreshToken |
Refresh token |
Filters and Computed Summaries
- All modules support
pageandsizepagination - Dashboard and GSTR-1 modules have advanced filters with default date ranges
- Computed metrics include totals, taxes, and aggregated quantities
Authentication and Token Refresh Flow
- JWT Bearer token attached automatically via Axios interceptor
401triggers refresh token request (/auth/refresh)- Multiple concurrent requests are queued while refreshing
- Logs out user if refresh token fails
Notes on Aggregation and Computation Logic
- Customer-wise totals: sums by GSTIN
- B2B / B2C: segregated by presence/absence of GSTIN
- HSN summary: aggregates material quantities across trips
- Dashboard metrics: sum invoice totals for revenue/received/pending