Parcel Delivery System frontend built with React + TypeScript. It provides role-based dashboards for Admin, Sender, and Receiver, and communicates with a REST API via Redux Toolkit Query.
- Role-based authentication (Admin / Sender / Receiver)
- JWT-based login flow
- Sender dashboard
- Create parcel delivery requests
- Cancel a parcel (when not dispatched)
- View created parcels
- Receiver dashboard
- View incoming parcels
- Confirm delivery
- View delivery history
- Admin dashboard
- View/manage users and parcels
- Block/unblock users
- Update parcel statuses (e.g., Approved, In Transit, Delivered)
- React (Vite)
- TypeScript
- Redux Toolkit + RTK Query
- Tailwind CSS + shadcn/ui (Radix UI)
- React Router
- Node.js (LTS recommended)
- npm (comes with Node)
git clone <your-repo-url>
cd Parcel-Delivery-system-frontend
npm installCreate a .env file in the project root (you can copy from .env.example).
Required:
VITE_BASE_URL=http://localhost:5000/apiOptional (used for demo/prefill in UI if implemented in the app):
VITE_DEMO_ADMIN_EMAIL=
VITE_DEMO_ADMIN_PASSWORD=
VITE_DEMO_SENDER_EMAIL=
VITE_DEMO_SENDER_PASSWORD=
VITE_DEMO_RECEIVER_EMAIL=
VITE_DEMO_RECEIVER_PASSWORD=- Create your environment file:
copy .env.example .env-
Update
VITE_BASE_URLin.envto your backend API URL. -
Start the dev server:
npm run devThen open:
npm run dev— start the development servernpm run build— type-check and build for productionnpm run preview— preview the production build locallynpm run lint— run ESLint across the project
src/components— UI and feature components (layout, modules, ui)src/page— route-level pages grouped by rolesrc/redux— store setup + RTK Query APIssrc/routes— route configuration and sidebar itemssrc/config— app configuration (API base URL)
src/
assets/
components/
layout/
modules/
provider/
ui/
config/
constant/
hooks/
lib/
page/
admin/
receiver/
sender/
redux/
features/
auth/
parcel/
routes/
types/
ults/
App.tsx
main.tsx
index.css
- Set
VITE_BASE_URLin your Vercel environment variables to point at your deployed backend API. - Build command:
npm run build - Output directory:
dist
This project is provided for educational purposes.