Skip to main content

Frontend Setup

Prerequisites

  • Node.js 16+ and npm
  • A running Backend instance (default: http://localhost:8080)

Running Locally

  1. Clone the repository:
git clone https://github.com/qlarr-surveys/frontend.git && cd frontend
  1. Install dependencies:
npm install
  1. Configure the backend URL in public/config.js:
window.APP_CONFIG = {
FRONT_END_HOST: "localhost:3000",
PROTOCOL: "http",
BE_URL: "http://localhost:8080"
};
  1. Start the development server:
npm start

The app will be available at http://localhost:3000. Log in with the default admin account from the backend: admin@admin.admin / admin.

Building for Production

npm run build

The output is written to the build/ directory.

Docker

The production Docker image uses Caddy as the web server:

docker build -t qlarr-frontend .
docker run -p 80:80 qlarr-frontend

The entrypoint.sh script handles runtime configuration injection so the same image can be deployed to different environments.