## 🧭 GressiPos POS Dashboard - Product Specification

### 🔰 Overview

The GressiPos POS Dashboard is a **managerial/admin interface** for overseeing POS system data and activity. It is **not** a storefront or kiosk. It will be a **cross-platform mobile app** built in **React Native (Expo)** and feature a **minimalist, premium design inspired by ShadCN** and **LightspeedPOS-grade functionality**.

---

### 🎯 Core Modules

#### 1. **Authentication**

* Secure login with JWT (uses `/api/v1/auth/login`)
* Refresh tokens (`/api/v1/auth/refresh`)
* Logout support (`/api/v1/auth/logout`)
* Role-based access controls from `/api/v1/roles`

#### 2. **Dashboard (Home)**

* Summary stats (total sales, orders, customers, employees, active stores)
* Charts: Sales by day, hour (`/metrics/salesByDays`, `/metrics/salesByHour`)
* Quick links to reports, employees, inventory, etc.
* Light/dark mode toggle (persisted)

#### 3. **Employees Management**

* List/search employees (`/api/v1/employees`)
* Create/update/delete employee
* Role assignment (`/api/v1/roles`)
* View shifts (`/api/v1/shifts`)
* Manage commissions (`/api/v1/sale-associates/...`)
* Filter by store or modifiedAfter

#### 4. **Customers**

* List/search/create/update/delete customers (`/api/v1/customers`)
* View individual customer orders
* Reporting by customer (`/reports/customer`)

#### 5. **Orders**

* List/search/filter orders (`/api/v1/orders`)
* View order details
* Order status tracking (read-only)
* Shipment integration (`/api/v1/shipments`)

#### 6. **Products & Inventory**

* Product catalog with variants (`/api/v1/products`, `/products/{id}/variants`)
* Inventory levels (`/api/v1/inventory`)
* Inventory transactions (`/inventory/transactions`)
* Count sessions support

#### 7. **Stores**

* Store switching (multi-store)
* View store-based reports and data
* Store-specific register and inventory info

#### 8. **Reports & Analytics**

* Sales Reports (`/reports/sales`, `/reports/sales-by-payment-method`)
* Profit Reports (`/reports/profit`)
* Inventory Reports (`/reports/inventory`)
* Employee Performance
* Store Comparisons
* Export to CSV (via `/reports/export/{reportType}`)

#### 9. **Registers (Backoffice Cash Handling)**

* View register sessions (`/api/v1/register`)
* Open/Close register
* Register withdrawals & counts
* Transaction history (`/register/{id}/transactions`)

#### 10. **Roles & Permissions**

* Assign roles to employees (`/api/v1/roles`)
* Configure permissions (`/roles/{id}/permissions`)
* View access audit logs (if supported later)

---

### 🖼️ Design & UX Goals

* **ShadCN-style cards, modals, tables, buttons**
* **Dark/light mode toggle**
* **Mobile-friendly sidebar navigation**
* Minimalistic yet **insight-rich dashboards**
* Animations (using Framer Motion or similar) for transitions and graphs

---

### 🔌 API Integration Notes

* Use DTOs from Swagger (`/components/schemas`) for TypeScript model generation.
* Implement a centralized API service with automatic token refresh.
* Include optimistic UI updates where appropriate.

---

### 🔧 Tech Stack

* **Frontend**: React Native (Expo)
* **State Mgmt**: React Context + Zustand or Redux Toolkit
* **API Comm**: Axios + OpenAPI-generated types
* **Navigation**: React Navigation (stack + tabs)
* **UI Kit**: Tailwind (via NativeWind), ShadCN-inspired components
* **Charts**: Recharts / Victory Native