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.
  • Install or refresh dependencies by running npm install inside the frontend directory. The root Makefile wraps this via make deps / make install, which creates frontend/node_modules/ and the shared venv/ in one step.
  • Add a dependency with npm install <package> --save so it is recorded in package.json + 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 3 documentation before copying snippets into the codebase.