Frontend — Environment & Configuration

Installing dependencies and configuring the Next.js client

Step 1 — Install Frontend Dependencies

Open a second VS Code window with the pos-frontend folder. In its terminal, run:

bash

This may take 2–5 minutes.

Step 2 — Create the .env.local File

In the pos-frontend root folder, create a new file named .env.local and add the variables below.

VariableDescriptionDevelopment Value
NEXT_PUBLIC_API_URLBackend REST API base URLhttp://localhost:5000/apiRequired
NEXT_PUBLIC_SOCKET_URLSocket.IO server URLhttp://localhost:5000Required
NEXT_PUBLIC_APP_NAMEApplication display namePosVeloOptional
NEXT_PUBLIC_APP_VERSIONVersion shown in the UI1.0.0Optional

Here is the complete .env.local file you can copy:

.env.local
Warning

The NEXT_PUBLIC_ prefix exposes variables to the browser bundle. Never store secrets, passwords, or API keys with this prefix — they will be visible to all users.