How rifatsakib/grand-gateway-cilent works
Grand-Gateway is a parcel-booking and delivery-management web app with user, delivery-person, and administrator roles. Users register or sign in, book parcels, and track or manage their bookings; administrators manage users and parcels and assign deliveries; delivery people view assigned work and update its status. The React client routes these experiences through shared layouts and role guards, with Firebase authentication and a remote API for application data. The README documents the main capabilities; some feature implementations were not sampled, so their internal API interactions are not detailed here.
Main entry points: Routes.jsx Route map · SignUp.jsx Registration · AuthProvider.jsx Auth provider · SocialLogin.jsx Google sign-in
Components 32
Client entry and routing
- App shell
src/App.jsx - Route map
src/Routes/Routes.jsx - Main layout
src/Layout/Main.jsx - Dashboard layout
src/Layout/Dashboard.jsx - Home experience
src/Pages/Home/Home/Home.jsx - Role-aware navigation
src/Pages/Shared/Navbar/Navbar.jsx
Identity and access
- Auth provider
src/Providers/AuthProvider.jsx - Firebase Auth
- Login
src/Pages/Login/Login.jsx - Registration
src/Pages/SignUp/SignUp.jsx - Google sign-in
src/Components/SocialLogin/SocialLogin.jsx - Auth context hook
src/Hooks/UseAuth.jsx - Signed-in guard
src/Routes/PrivateRoute.jsx - Admin guard
src/Routes/AdminRoute.jsx - Delivery guard
src/Routes/DeliverymanRoute.jsx - Admin role check
src/Hooks/UseAdmin.jsx - Delivery role check
src/Hooks/UseDeliveryman.jsx
Parcel workflows
- Book a parcel
src/Pages/Dashboard/BookAParcel/BookAParcel.jsx - My parcels
src/Pages/Dashboard/MyParcels/MyParcels.jsx - Parcel data hook
src/Hooks/UseItems.jsx - Parcel payment
src/Pages/Dashboard/Payment/Payment.jsx
Delivery operations
- Manage all parcels
src/Pages/Dashboard/AllParcels/AllParcels.jsx - Manage users
src/Pages/Dashboard/AllUsers/AllUsers.jsx - Manage delivery people
src/Pages/Dashboard/AllDeliveryMan/AllDeliveryMan.jsx - Assigned deliveries
src/Pages/Dashboard/MyDeliveryList/MyDeliveryList.jsx - Delivery reviews
src/Pages/Dashboard/MyReviews/MyReviews.jsx - Admin statistics
src/Pages/Dashboard/Statistics/AdminStatistics.jsx - User profile
src/Pages/Dashboard/MyProfile/MyProfile.jsx - Update parcel
src/Pages/Dashboard/UpdateItems/UpdateItems.jsx
Other components
- Visitor or user
- Grand-Gateway API
- Image hosting
Connections 37
- Visitor or user → App shell: opens
- App shell → Route map: renders routes
- Route map → Main layout: routes public pages
src/Routes/Routes.jsx - Route map → Dashboard layout: routes dashboard
src/Routes/Routes.jsx - Route map → Home experience: routes home
src/Routes/Routes.jsx - Main layout → Role-aware navigation: renders
src/Layout/Main.jsx - Route map → Login: routes login
src/Routes/Routes.jsx - Route map → Registration: routes signup
src/Routes/Routes.jsx - Route map → Signed-in guard: protects dashboard
src/Routes/Routes.jsx - Route map → Admin guard: protects admin pages
src/Routes/Routes.jsx - Auth provider → Firebase Auth: authenticates users
src/Providers/AuthProvider.jsx - Auth provider → Grand-Gateway API: requests JWT
src/Providers/AuthProvider.jsx - Login → Auth provider: uses auth
src/Pages/Login/Login.jsx - Registration → Auth provider: creates account
src/Pages/SignUp/SignUp.jsx - Registration → Google sign-in: offers social login
src/Pages/SignUp/SignUp.jsx - Google sign-in → Auth provider: starts Google sign-in
src/Components/SocialLogin/SocialLogin.jsx - Google sign-in → Grand-Gateway API: registers user
src/Components/SocialLogin/SocialLogin.jsx - Registration → Image hosting: uploads image
src/Pages/SignUp/SignUp.jsx - Registration → Grand-Gateway API: creates user record
src/Pages/SignUp/SignUp.jsx - Signed-in guard → Auth context hook: checks session
src/Routes/PrivateRoute.jsx - Admin guard → Admin role check: checks role
src/Routes/AdminRoute.jsx - Delivery guard → Delivery role check: checks role
src/Routes/DeliverymanRoute.jsx - Admin role check → Auth context hook: reads user
src/Hooks/UseAdmin.jsx - Delivery role check → Auth context hook: reads user
src/Hooks/UseDeliveryman.jsx - Book a parcel → Grand-Gateway API: submits booking
src/Pages/Dashboard/BookAParcel/BookAParcel.jsx - My parcels → Parcel data hook: loads bookings
src/Pages/Dashboard/MyParcels/MyParcels.jsx - Parcel data hook → Grand-Gateway API: fetches parcels
src/Hooks/UseItems.jsx - Route map → Parcel payment: routes payment
src/Routes/Routes.jsx - Manage all parcels → Parcel data hook: loads parcel data
src/Pages/Dashboard/AllParcels/AllParcels.jsx - Manage all parcels → Grand-Gateway API: manages parcels
src/Pages/Dashboard/AllParcels/AllParcels.jsx - Manage users → Grand-Gateway API: manages users
src/Pages/Dashboard/AllUsers/AllUsers.jsx - Manage delivery people → Grand-Gateway API: manages delivery roles
src/Pages/Dashboard/AllDeliveryMan/AllDeliveryMan.jsx - Assigned deliveries → Grand-Gateway API: loads assignments
src/Pages/Dashboard/MyDeliveryList/MyDeliveryList.jsx - Delivery reviews → Grand-Gateway API: loads reviews
src/Pages/Dashboard/MyReviews/MyReviews.jsx - Admin statistics → Grand-Gateway API: loads statistics
src/Pages/Dashboard/Statistics/AdminStatistics.jsx - User profile → Grand-Gateway API: loads profile data
src/Pages/Dashboard/MyProfile/MyProfile.jsx - Update parcel → Grand-Gateway API: updates parcel
src/Pages/Dashboard/UpdateItems/UpdateItems.jsx