This repository contains the code base for a Laravel based front end for the latest version of @fitzwilliammuseum website.
The front end is very simple and uses Bootstrap latest framework, latest JQuery and various libraries to interface with a headless API provided by our installation of the @directus 8 system, Solr and ElasticSearch endpoints.
The models in this system point at an API rather than a database.
Data comes from various systems and API endpoints.
- Main content - Directus Headless CMS
- Search content - SOLR 8.11.1 instance
- Collections content - CIIM version 5 ElasticSearch instance from Knowledge Integration, standard mappings and the nascent API
- Twitter - API driven
- Shopify - FME systems queried and indexed daily into SOLR
- Sketchfab
- Libsyn for podcasts
- UCAM streaming media service
- YouTube
- Vimeo
In production, we use REDIS. Locally use File based caching unless you want to install REDIS.
View deployment information on the Fitzwilliam Docs.
- Install php 8.1 into your environment
- Install composer and then do the following:
git clone git@github.com:FitzwilliamMuseum/fitz-main-website.git
cd fitz-main-website
composer install
php artisan key:generate
cp .env.example .env
npm install
On some ubuntu machines, the npm install script fails at the npm run copy command. To fix this run the commands separately:
npm run copy-uv-html # "cp -R node_modules/universalviewer/dist/uv.html ./public", Universal viewer copy
npm run copy-uv-css # "cp -R node_modules/universalviewer/dist/uv.css ./public/",
npm run copy-uv-assets # "cp -R node_modules/universalviewer/dist/umd/ ./public/umd/",
npm run copy-icons # "cp -R node_modules/super-tiny-icons/images/svg/ ./public/images/svg/",
npm run copy-cookie-css # cp -R node_modules/vanilla-cookieconsent/dist/*.css ./resources/css/",
npm run copy-cookie-js # "cp -R node_modules/vanilla-cookieconsent/dist/*.js ./resources/js/",
npm run copy-pannellum-css # "cp -R node_modules/pannellum/build/*.css ./public/css/",
npm run copy-pannellum-js # "cp -R node_modules/pannellum/build/*.js ./public/js/",
If the versions have been updated you may need to run:
npm run production
Which will compress all the css and js files.
Fill in variables for your instance (Cache etc), values from the production version of the websites are on the main network drive.
nano .env
Set CACHE_DRIVER
to redis
or file
depending on your environment.
Set the SOLR_ENABLED
flag to true
or false
based on whether Solr is supported in your environment.
If you are running locally you can preview the website via:
php artisan serve
To cache icons and routes:
php artisan icons:cache
php artisan route:cache
GPL V3
Daniel Pett @portableant