Bitezo Admin is a React + TypeScript dashboard for managing customers, users, employees, and dealers, with reporting tools and JWT-based authentication.
- React 19
- TypeScript
- Vite
- Redux Toolkit + React Redux
- React Router
- Axios
- Tailwind CSS
- Recharts
- jsPDF / ExcelJS / XLSX
- Authentication flow
- Login
- Forgot password
- OTP verification
- Reset password
- Token refresh via Axios interceptor
- Customer management
- Create, edit, list
- Validation and formatting
- User management
- Create and list users
- Employee management
- Create, edit, delete
- Dealer mapping
- Filtered listing (
empName,dealerId,country)
- Dealer management
- Create, edit, list
- Reports
- Customer reports
- User reports
- Export utilities (PDF/Excel)
src/
components/
common/
layout/
context/
ToastContext.tsx
features/
auth/
customer/
dealer/
employees/
dashboard/
reports/
user/
routes/
AppRoutes.tsx
ProtectedRoute.tsx
store/
store.ts
authSlice.ts
customerSlice.ts
userSlice.ts
utils/
api.ts
Create a .env file in the project root:
VITE_API_BASE_URL=http://84.255.173.131:8088- Install dependencies
npm install- Run development server
npm run dev- Build for production
npm run build- Preview production build
npm run previewnpm run dev: start Vite development servernpm run build: TypeScript build + Vite production buildnpm run lint: run ESLintnpm run preview: preview production build locally
Public routes:
//forgot-password/verify-otp/reset-password
Protected routes (under /dashboard):
/dashboard/dashboard/customers/dashboard/customers/create/dashboard/customers/edit/:id/dashboard/users/dashboard/user/create/dashboard/employees/dashboard/dealers/dashboard/customers-reports/dashboard/users-reports
- Centralized API client:
src/utils/api.ts - Bearer token is attached from Redux auth state
- On
401, refresh token flow is attempted automatically - If refresh fails, auth is cleared and user is redirected to login
Global state is handled with Redux Toolkit:
auth: access/refresh token + user sessioncustomers: customer list and loading/error stateusers: user list and loading/error state
Feature-level UI state (modals, local form state, temporary filters) is managed locally where appropriate.
- Use typed models in each feature's
types.ts - Keep API calls in feature
services/ - Prefer reusable UI from
components/common - Keep shared cross-feature logic in
utils/and Redux slices
Private project. Internal use only.