This guide walks you through cloning Kantuta POS, installing dependencies, pointing the app at your NestJS backend, and logging in for the first time. By the end you will have a running development server, an open cash session, and a completed sale.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Eleazarguitar18/kantuta_pos_front/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, confirm the following are available on your machine:- Node.js 18 or later — Vite 6 and React 19 both require it. Run
node -vto check. - npm 9+ (bundled with Node 18) — or Yarn / pnpm if you prefer.
- Git — to clone the repository.
- A running NestJS backend — exposing a REST API (default:
http://localhost:3000). The frontend expects JWT-based auth endpoints and the full Kantuta API surface.
Full setup walkthrough
Install dependencies
Choose your package manager. All three produce an identical The install pulls ~40 packages including React 19, Vite 6, Axios, Socket.IO Client, ApexCharts, and
node_modules from the lockfile.@react-pdf/renderer.Create your .env file
Copy the example below into a new file named
.env at the project root. Replace the value with the actual URL of your running NestJS API:.env
VITE_API_BASE_URL is consumed in two places:src/components/auth/services/urlBase.ts— exportsAPI_BASE_URLused by every Axios service.src/context/SocketContext.tsx— strips the/apisuffix and opens a Socket.IO connection to the same host.
Start the development server
http://localhost:5173 — and prints the exact URL in the terminal. Open that address in your browser.Sign in
The app redirects unauthenticated visitors to
/signin automatically (handled by ProtectedRoute).- Enter the username and password for an existing backend user.
- On success,
AuthContextstores the JWT access token, refresh token, and user object inlocalStorageand redirects you to the dashboard (/).
| Role | Access level |
|---|---|
Administrador | Full access to all modules including Reportes, user management, and register configuration |
Cajero | Dashboard, POS terminal, Cajas control, Recargas operations, and Agentes |
Open a cash session
Before processing any sale, a cash register session must be active:
- Navigate to Cajas in the sidebar.
- Click the Control button on the register assigned to your workstation.
- Select Abrir Caja, enter the opening cash amount, and confirm.
CajaContext provider makes the active session available to the POS terminal and all sale-recording components.Available npm scripts
These are the scripts defined inpackage.json:
| Script | Command | Purpose |
|---|---|---|
dev | vite | Start the Vite HMR development server |
build | tsc -b && vite build | Type-check then compile an optimised production bundle to dist/ |
preview | vite preview | Serve the production build locally to verify it before deploying |
lint | eslint . | Run ESLint across the entire src/ tree |
What’s next?
With the app running, explore the rest of the documentation to understand how each module works and how to tune the application for a production deployment.- Configuration — environment variables, build modes, and session settings.
- Inventory module — add products and categories before going live.
- Sales & POS module — customise the POS terminal layout.