# Cấu trúc Codebase

## Thư mục gốc
```
src/
├── App.vue           # Root component
├── main.js           # Entry point
├── style.css         # Global styles
├── assets/           # Static assets (images, styles)
├── components/       # Shared components
├── infrastructure/   # API client, paths, constants, utilities
├── routers/          # Vue Router config (split theo domain)
├── services/         # API service layer
├── stores/           # Pinia stores
└── views/            # Page components (split theo domain)
```

## src/infrastructure/
- `apiClient.js` - Axios instance với interceptors (auth token, 401→login, 403→unauthorized)
- `apiPath.js` - Base API path config
- `apiPaths/` - API paths theo domain (bankPath, userPath, orderPath, v.v.)
- `constants/` - Hằng số theo domain
- `utilities/` - Helpers (cacheHelper, currencyHelper, reconciliationHelpers, v.v.)

## src/services/
API service layer - mỗi file tương ứng 1 domain entity:
- userService, orderService, truckService, driverService, staffService
- incomeService, expenseService, transactionService, walletService
- reconciliationService, reportService, taxService, vatInvoiceService
- customerService, agencyService, locationService, roleService, menuService
- bankService, bankAccountService, categoryService, priceService
- v.v. (~50 services)

## src/stores/
- `index.js` - Re-export all stores
- `userStore.js` - Authentication state (login, logout, refresh token)
- `datePickerStore.js` - Date picker state
- `editorStore.js` - TinyMCE editor state

## src/routers/
- `index.js` - Router instance + navigation guard (auth required)
- `routes.js` - Tổng hợp all routes
- Các file routes theo domain: auth, finance, order, hr, crm, cms, v.v.

## src/views/ (Views theo domain)
accounts, assets, business, categories, cms, crm, demo, drivers,
finances, fuelManagement, home, hr, layouts, locations, menus,
monitoring, orders, permissions, profile, reconciliation, reports,
settings, shared, system, tracking, trucks, users, utilities, vat-invoices

## src/components/
- `LadaSelect.vue` - Custom select component
- `Empty.vue` - Empty state component
- `AppVersion.vue` - App version display
- `loader.vue` - Loading indicator
- `index.js` - Component re-exports
- Subfolders: accordion, addresses, blockui, charts, daterange, dialogs,
  drawer, expense, income, loaders, locations, orders, pagination, transfer-payment-bill
