# oasif-ahmed/gearup-client architecture

> Architecture diagram of the GitHub repository oasif-ahmed/gearup-client, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/oasif-ahmed/gearup-client
- Repository: https://github.com/oasif-ahmed/gearup-client

## Overview

GearUp is a Next.js rental frontend for customers, providers, and administrators. The main customer journey is catalog discovery, gear inspection, rental checkout, payment, order tracking, and post-return reviews; separate branches support account access and provider/admin operations. Server-side service modules connect UI workflows to the backend, while the gear service also uploads images to an external host. Some operational screens and services were not sampled, so their documented capabilities are included but uncertain implementation links are omitted.

Main entry points: [`app/customer-cart/page.tsx`](https://github.com/oasif-ahmed/gearup-client/blob/main/app/customer-cart/page.tsx) (Customer portal route), [`app/dashboard/provider/page.tsx`](https://github.com/oasif-ahmed/gearup-client/blob/main/app/dashboard/provider/page.tsx) (Provider dashboard route), [`services/gear-item.service.ts`](https://github.com/oasif-ahmed/gearup-client/blob/main/services/gear-item.service.ts) (Gear catalog service), [`services/auth.service.ts`](https://github.com/oasif-ahmed/gearup-client/blob/main/services/auth.service.ts) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Gear discovery"]
  node_home["Home &amp; featured gear<br/>[page.tsx]"]
  node_catalog["Browse &amp; filter<br/>[page.tsx]"]
  node_gear_card["Gear card<br/>[gearItemCard.tsx]"]
  node_gear_detail["Details &amp; reviews"]
end

subgraph group_customer["Customer journeys"]
  node_login["Login form<br/>[login-form.tsx]"]
  node_register["Registration form<br/>[register-form.tsx]"]
  node_cart_page["Customer portal route<br/>[page.tsx]"]
  node_cart["Cart &amp; order tracking<br/>[customerCart.tsx]"]
  node_payment_success["Payment outcome pages<br/>[page.tsx]"]
  node_payment_cancel["Payment cancellation<br/>[page.tsx]"]
  node_profile["Profile settings"]
end

subgraph group_operations["Platform operations"]
  node_provider_page["Provider dashboard route<br/>[page.tsx]"]
  node_provider_dashboard["Inventory &amp; order console"]
  node_admin_page["Admin dashboard route<br/>[page.tsx]"]
  node_admin_client["Users &amp; moderation<br/>[adminClient.tsx]"]
end

subgraph group_services["Server services"]
  node_auth_service["Authentication<br/>[auth.service.ts]"]
  node_payment_service["Payment operations<br/>[payment.service.ts]"]
  node_rental_service["Rental orders"]
  node_review_service["Reviews<br/>[review.service.ts]"]
  node_provider_service["Provider operations"]
  node_gear_service["Gear catalog service"]
  node_admin_service["Admin operations<br/>[admin.service.ts]"]
  node_get_me["Current user lookup<br/>[getMe.ts]"]
end

node_visitor(("Customer"))
node_payment_gateway["Payment gateway"]
node_backend["GearUp backend API"]
node_image_host["Image upload host"]

node_visitor -->|"explores"| node_home
node_home -->|"loads featured gear"| node_gear_service
node_visitor -->|"browses"| node_catalog
node_catalog -->|"loads inventory"| node_gear_service
node_catalog -->|"renders listings"| node_gear_card
node_visitor -->|"inspects gear"| node_gear_detail
node_gear_service -->|"fetches gear"| node_backend
node_gear_service -->|"uploads images"| node_image_host
node_visitor -->|"signs in"| node_login
node_visitor -->|"creates account"| node_register
node_login -->|"submits credentials"| node_auth_service
node_register -->|"submits registration"| node_auth_service
node_auth_service -->|"authenticates"| node_backend
node_visitor -->|"opens portal"| node_cart_page
node_cart_page -->|"renders portal"| node_cart
node_cart_page -->|"loads rentals"| node_rental_service
node_cart_page -->|"loads payments"| node_payment_service
node_cart_page -->|"loads reviews"| node_review_service
node_cart -.->|"starts payment"| node_payment_service
node_payment_service -.->|"initiates checkout"| node_payment_gateway
node_payment_gateway -.->|"confirms outcome"| node_payment_success
node_payment_gateway -.->|"returns cancelled"| node_payment_cancel
node_visitor -->|"manages rentals"| node_provider_page
node_provider_page -->|"renders dashboard"| node_provider_dashboard
node_provider_page -->|"loads orders"| node_provider_service
node_provider_page -->|"loads inventory"| node_gear_service
node_provider_page -->|"loads identity"| node_get_me
node_visitor -->|"administers platform"| node_admin_page
node_admin_page -->|"renders console"| node_admin_client
node_admin_page -->|"loads admin data"| node_admin_service
node_visitor -->|"updates profile"| node_profile
node_profile -->|"saves changes"| node_auth_service
node_visitor -.->|"submits review"| node_gear_detail
node_review_service -->|"reads and writes reviews"| node_backend

click node_home "https://github.com/oasif-ahmed/gearup-client/blob/main/app/(public)/page.tsx"
click node_catalog "https://github.com/oasif-ahmed/gearup-client/blob/main/app/(public)/gear-items/page.tsx"
click node_gear_card "https://github.com/oasif-ahmed/gearup-client/blob/main/components/gear/gearItemCard.tsx"
click node_gear_detail "https://github.com/oasif-ahmed/gearup-client/blob/main/app/(public)/gear-items/%5Bid%5D/gearDetails%2Breview.tsx"
click node_login "https://github.com/oasif-ahmed/gearup-client/blob/main/components/login-form.tsx"
click node_register "https://github.com/oasif-ahmed/gearup-client/blob/main/components/register-form.tsx"
click node_auth_service "https://github.com/oasif-ahmed/gearup-client/blob/main/services/auth.service.ts"
click node_cart_page "https://github.com/oasif-ahmed/gearup-client/blob/main/app/customer-cart/page.tsx"
click node_cart "https://github.com/oasif-ahmed/gearup-client/blob/main/app/customer-cart/customerCart.tsx"
click node_payment_service "https://github.com/oasif-ahmed/gearup-client/blob/main/services/payment.service.ts"
click node_payment_success "https://github.com/oasif-ahmed/gearup-client/blob/main/app/payment/success/page.tsx"
click node_payment_cancel "https://github.com/oasif-ahmed/gearup-client/blob/main/app/payment/cancel/page.tsx"
click node_rental_service "https://github.com/oasif-ahmed/gearup-client/blob/main/services/rental-order.service.ts"
click node_review_service "https://github.com/oasif-ahmed/gearup-client/blob/main/services/review.service.ts"
click node_provider_page "https://github.com/oasif-ahmed/gearup-client/blob/main/app/dashboard/provider/page.tsx"
click node_provider_dashboard "https://github.com/oasif-ahmed/gearup-client/blob/main/app/dashboard/provider/ProviderDashboard-aligned.tsx"
click node_provider_service "https://github.com/oasif-ahmed/gearup-client/blob/main/services/provider.service.ts"
click node_gear_service "https://github.com/oasif-ahmed/gearup-client/blob/main/services/gear-item.service.ts"
click node_admin_page "https://github.com/oasif-ahmed/gearup-client/blob/main/app/dashboard/admin/page.tsx"
click node_admin_client "https://github.com/oasif-ahmed/gearup-client/blob/main/app/dashboard/admin/adminClient.tsx"
click node_admin_service "https://github.com/oasif-ahmed/gearup-client/blob/main/services/admin.service.ts"
click node_profile "https://github.com/oasif-ahmed/gearup-client/blob/main/app/profile/ProfilePageClient.tsx"
click node_get_me "https://github.com/oasif-ahmed/gearup-client/blob/main/services/getMe.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_home,node_catalog,node_gear_card,node_gear_detail toneBlue
class node_login,node_register,node_cart_page,node_cart,node_payment_success,node_payment_cancel,node_profile toneAmber
class node_provider_page,node_provider_dashboard,node_admin_page,node_admin_client,node_backend toneMint
class node_auth_service,node_payment_service,node_rental_service,node_review_service,node_provider_service,node_gear_service,node_admin_service,node_get_me toneRose
class node_visitor,node_payment_gateway,node_image_host toneIndigo
```

## Components

### Gear discovery

- [Home & featured gear](https://github.com/oasif-ahmed/gearup-client/blob/main/app/(public)/page.tsx): `app/(public)/page.tsx`
- [Browse & filter](https://github.com/oasif-ahmed/gearup-client/blob/main/app/(public)/gear-items/page.tsx): `app/(public)/gear-items/page.tsx`
- [Gear card](https://github.com/oasif-ahmed/gearup-client/blob/main/components/gear/gearItemCard.tsx): `components/gear/gearItemCard.tsx`
- [Details & reviews](https://github.com/oasif-ahmed/gearup-client/blob/main/app/(public)/gear-items/%5Bid%5D/gearDetails%2Breview.tsx): `app/(public)/gear-items/[id]/gearDetails+review.tsx`

### Customer journeys

- [Login form](https://github.com/oasif-ahmed/gearup-client/blob/main/components/login-form.tsx): `components/login-form.tsx`
- [Registration form](https://github.com/oasif-ahmed/gearup-client/blob/main/components/register-form.tsx): `components/register-form.tsx`
- [Customer portal route](https://github.com/oasif-ahmed/gearup-client/blob/main/app/customer-cart/page.tsx): `app/customer-cart/page.tsx`
- [Cart & order tracking](https://github.com/oasif-ahmed/gearup-client/blob/main/app/customer-cart/customerCart.tsx): `app/customer-cart/customerCart.tsx`
- [Payment outcome pages](https://github.com/oasif-ahmed/gearup-client/blob/main/app/payment/success/page.tsx): `app/payment/success/page.tsx`
- [Payment cancellation](https://github.com/oasif-ahmed/gearup-client/blob/main/app/payment/cancel/page.tsx): `app/payment/cancel/page.tsx`
- [Profile settings](https://github.com/oasif-ahmed/gearup-client/blob/main/app/profile/ProfilePageClient.tsx): `app/profile/ProfilePageClient.tsx`

### Platform operations

- [Provider dashboard route](https://github.com/oasif-ahmed/gearup-client/blob/main/app/dashboard/provider/page.tsx): `app/dashboard/provider/page.tsx`
- [Inventory & order console](https://github.com/oasif-ahmed/gearup-client/blob/main/app/dashboard/provider/ProviderDashboard-aligned.tsx): `app/dashboard/provider/ProviderDashboard-aligned.tsx`
- [Admin dashboard route](https://github.com/oasif-ahmed/gearup-client/blob/main/app/dashboard/admin/page.tsx): `app/dashboard/admin/page.tsx`
- [Users & moderation](https://github.com/oasif-ahmed/gearup-client/blob/main/app/dashboard/admin/adminClient.tsx): `app/dashboard/admin/adminClient.tsx`

### Server services

- [Authentication](https://github.com/oasif-ahmed/gearup-client/blob/main/services/auth.service.ts): `services/auth.service.ts`
- [Payment operations](https://github.com/oasif-ahmed/gearup-client/blob/main/services/payment.service.ts): `services/payment.service.ts`
- [Rental orders](https://github.com/oasif-ahmed/gearup-client/blob/main/services/rental-order.service.ts): `services/rental-order.service.ts`
- [Reviews](https://github.com/oasif-ahmed/gearup-client/blob/main/services/review.service.ts): `services/review.service.ts`
- [Provider operations](https://github.com/oasif-ahmed/gearup-client/blob/main/services/provider.service.ts): `services/provider.service.ts`
- [Gear catalog service](https://github.com/oasif-ahmed/gearup-client/blob/main/services/gear-item.service.ts): `services/gear-item.service.ts`
- [Admin operations](https://github.com/oasif-ahmed/gearup-client/blob/main/services/admin.service.ts): `services/admin.service.ts`
- [Current user lookup](https://github.com/oasif-ahmed/gearup-client/blob/main/services/getMe.ts): `services/getMe.ts`

### Other components

- **Customer**
- **Payment gateway**
- **GearUp backend API**
- **Image upload host**

## Connections

- Customer → Home & featured gear: explores
- Home & featured gear → Gear catalog service: loads featured gear (evidence: `app/(public)/page.tsx`)
- Customer → Browse & filter: browses
- Browse & filter → Gear catalog service: loads inventory (evidence: `app/(public)/gear-items/page.tsx`)
- Browse & filter → Gear card: renders listings (evidence: `app/(public)/gear-items/page.tsx`)
- Customer → Details & reviews: inspects gear
- Gear catalog service → GearUp backend API: fetches gear (evidence: `services/gear-item.service.ts`)
- Gear catalog service → Image upload host: uploads images (evidence: `services/gear-item.service.ts`)
- Customer → Login form: signs in
- Customer → Registration form: creates account
- Login form → Authentication: submits credentials (evidence: `components/login-form.tsx`)
- Registration form → Authentication: submits registration (evidence: `components/register-form.tsx`)
- Authentication → GearUp backend API: authenticates (evidence: `services/auth.service.ts`)
- Customer → Customer portal route: opens portal
- Customer portal route → Cart & order tracking: renders portal (evidence: `app/customer-cart/page.tsx`)
- Customer portal route → Rental orders: loads rentals (evidence: `app/customer-cart/page.tsx`)
- Customer portal route → Payment operations: loads payments (evidence: `app/customer-cart/page.tsx`)
- Customer portal route → Reviews: loads reviews (evidence: `app/customer-cart/page.tsx`)
- Cart & order tracking → Payment operations: starts payment
- Payment operations → Payment gateway: initiates checkout
- Payment gateway → Payment outcome pages: confirms outcome
- Payment gateway → Payment cancellation: returns cancelled
- Customer → Provider dashboard route: manages rentals
- Provider dashboard route → Inventory & order console: renders dashboard (evidence: `app/dashboard/provider/page.tsx`)
- Provider dashboard route → Provider operations: loads orders (evidence: `app/dashboard/provider/page.tsx`)
- Provider dashboard route → Gear catalog service: loads inventory (evidence: `app/dashboard/provider/page.tsx`)
- Provider dashboard route → Current user lookup: loads identity (evidence: `app/dashboard/provider/page.tsx`)
- Customer → Admin dashboard route: administers platform
- Admin dashboard route → Users & moderation: renders console (evidence: `app/dashboard/admin/page.tsx`)
- Admin dashboard route → Admin operations: loads admin data (evidence: `app/dashboard/admin/page.tsx`)
- Customer → Profile settings: updates profile
- Profile settings → Authentication: saves changes (evidence: `app/profile/ProfilePageClient.tsx`)
- Customer → Details & reviews: submits review
- Reviews → GearUp backend API: reads and writes reviews (evidence: `services/review.service.ts`)
