Skip to content

Web UI Overview

Open a terminal and run photoprism start (or make start inside the main repository) to bring up the built-in web server on http://localhost:2342. The development compose file (compose.yaml) exposes the same port, so once the backend is reachable you can iterate on the frontend without rebuilding the entire container stack.

Frameworks and Bundling

For a detailed tour of every directory see frontend/CODEMAP.md in the main repository.

Components

Reusable Vue components live under frontend/src/component/, while top-level pages that map to Vue Router routes are stored in frontend/src/page/. Global component registration happens in frontend/src/component/components.js. The UI Components page explains how we group and reference shared widgets, while Vuetify’s own component catalog covers the standard building blocks that ship with the framework.

Dependencies

  • The authoritative dependency list is frontend/package.json.
  • The frontend is an npm workspace of the repository root, so node_modules/ and package-lock.json live at the root. Install or refresh dependencies from the root with make dep-js, which runs npm ci; make dep also downloads the models.
  • Add a dependency with npm install --ignore-scripts --workspace frontend <package> from the repository root, so it is recorded in frontend/package.json and the root package-lock.json. Always check frontend/CODEMAP.md before adding new runtime libraries.

Build, Watch, and Test

  • Development server / watcher: make watch-js from the repo root, or cd frontend && npm run watch. This rebuilds the bundle whenever you change files under frontend/src/.
  • Production build: make build-js (root) or cd frontend && npm run build.
  • Dev build without watcher: npm run build-dev.
  • Unit tests (Vitest): make vitest-watch / make vitest-coverage or cd frontend && npm run test.
  • Linting & formatting: npm run lint and npm run fmt keep ESLint + Prettier aligned with CI.

External Resources

Older Vue 2 tutorials can still provide inspiration, but always cross-check APIs with the current Vue 3 / Vuetify 4 documentation before copying snippets into the codebase.