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:
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.
| Variable | Description | Development Value | |
|---|---|---|---|
| NEXT_PUBLIC_API_URL | Backend REST API base URL | http://localhost:5000/api | Required |
| NEXT_PUBLIC_SOCKET_URL | Socket.IO server URL | http://localhost:5000 | Required |
| NEXT_PUBLIC_APP_NAME | Application display name | PosVelo | Optional |
| NEXT_PUBLIC_APP_VERSION | Version shown in the UI | 1.0.0 | Optional |
Here is the complete .env.local file you can copy:
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.