Introduction
Open a terminal and type photoprism start
to start the built-in server. It will listen on localhost:2342 by default, see compose.yaml and Configuration.
Frameworks¶
Vuetify is a powerful open-source Material Design UI component framework for building modern single-page applications.
It is based on VueJS, a JavaScript library that combines the best ideas from AngularJS (Google) and React (Facebook); development is community driven and the API fairly stable.
Vuetify and VueJS are initialized in frontend/src/app.js. Webpack is used as a module loader / bundler. It creates single, optimized JS and CSS files in the server assets public build directory from the original source code. You can find the build configuration in frontend/webpack.config.js
.
For our docs and landing pages, we may use https://materializecss.com/ as a lightweight alternative to Vuetify.
Components¶
Components are reusable user-interface widgets. UI Components contains a list of custom components. Standard components like buttons or forms are well documented on vuetifyjs.com.
Dependencies¶
The full list of dependencies can be found in frontend/package.json
. You need to run npm install
in the frontend directory to install them (automatically happens during installation, see Makefile
). Run npm install -P [package name]
to add a new package (library or framework).
Building¶
A build can be triggered by running npm run watch
(watches for changes and re-builds when needed) or npm run build
(single build) in the frontend directory. NPM is the default package manager that comes with NodeJS, a JavaScript run-time environment that executes JavaScript code outside of a browser.
External Resources¶
- https://web.dev/progressive-web-apps/
- vuejs-templates/pwa - a progressive web app template for VueJS
- https://hackernoon.com/a-progressive-web-app-in-vue-tutorial-part-1-the-vue-app-f9231b032a0b
- https://medium.com/the-web-tub/creating-your-first-vue-js-pwa-project-22f7c552fb34
- https://developers.google.com/web/fundamentals/native-hardware/fullscreen/
- https://webpack.js.org/configuration/optimization/
- https://photoswipe.com/documentation/responsive-images.html
- https://seregpie.github.io/VueWordCloud/ - Word cloud for VueJS
- snorpey/jpg-glitch - JPEG Glitch lib for JS
- https://stylable.io/ - scopes styles to components so they don’t “leak” and clash with other styles (not sure if this is of any use for us)
- Building the Google Photos Web UI - Antin Harasymiv on Medium
- Progressive Image Grid - arrange images in a responsive, progressive-loading grid managed in JavaScript, see #85