You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# POS Frontend
Restaurant-facing Point of Sale (POS) web app built with Next.js.
This project focuses on operational workflows such as orders, menu control, recipes, customer records, analytics, and store settings.
## Purpose
`POS` is the application used by day-to-day operators and managers. It is designed to:
- provide fast access to operational data (orders, menu items, customer details),
- support decision-making with dashboard and reporting screens,
- centralize in-app configuration (general settings, billing/license, backup, notifications),
- integrate with a shared backend API for authentication and business logic.
## Core Feature Areas
The app uses App Router route groups and modules for feature separation:
- `(auth)`: authentication (`login`)
- `(main)`: `dashboard`, `order-management`
- `(menu-management)`: `category`, `menu-management`, `menu-options`
- `(recipes-management)`: `ingredients`, `recipes-management`, `recipes-options`
- `(customer-management)`: customer-detail workflows
- `(analytics)`: financial reports/KPI views
- `(settings)`: backup, billing-license, general settings, payment, notifications, restaurant management
- additional modules such as `branches-management`
## Tech Stack
- Next.js 15 (App Router), React 19, TypeScript
- Tailwind CSS 4
- MUI, Radix UI, Framer Motion
- React Hook Form and Zod
- Recharts and Nivo for analytics visualizations
## API and Environment
API utilities live mainly under `src/lib/util` with related config/auth helpers under `src/lib`.
The code currently contains fallback API URLs, including:
- `http://localhost:8000/api`
- `http://127.0.0.1:8000/api/auth`
Use `NEXT_PUBLIC_API_URL` per environment to avoid mismatch between local/staging/production.
## Project Structure
```text
src/
app/ # Pages, route groups, and layouts
components/ # Shared UI components
lib/
hooks/ # Reusable state and data hooks
util/ # API and domain helper modules
```
## Getting Started
### Prerequisites
- Node.js 18+
- npm 9+
### Install
```bash
npm install
```
### Run in Development
```bash
npm run dev
```
The dev server runs on `http://localhost:3001`.
### Build and Run Production
```bash
npm run build
npm run start
```
## Scripts
- `npm run dev`: start local development server (port 3001)
- `npm run build`: create production build
- `npm run start`: start production server
- `npm run lint`: run lint checks
## Connected Repositories
This repository is part of a connected 3-project architecture:
- `POS` (this repo): operations-facing frontend
- `Pos-Admin`: platform/admin frontend
- `pos-backend`: API and shared business logic
Typical flow:
1. user actions happen in `POS`,
2. requests are sent to `pos-backend`,
3. backend validates auth/rules and returns data,
4. `Pos-Admin` manages global/platform-level configuration and oversight.
## Maintenance Notes
- Some utility files include typo-style names (for example `DsahboradApi`), which can be normalized to improve maintainability.
- The project mixes mock-style utility patterns and real API-style integrations; defining a clear boundary for production behavior is recommended.
# POS