This is the source code of Paremiologia catalana comparada digital website.
-
Copy
.env.sampleto.env. -
Build the container using the default Debian-based image:
docker compose upWhen the database has finished importing, the website should be available at http://localhost:8092, depending on your
.env file.
Note: If you don't have a database, you can copy tmp/schema.sql and tmp/schema_init_sample.sql files to
install/db/. That will import an empty database and should allow you to browse the website locally.
For detailed instructions on updating the content and pushing a new release, please see the Content Update and Release Guide, which includes the instructions to install all developer dependencies.
- PHP: version 8.4 or later is required.
- Node.js: version 22.16.0 or later is required.
CSS/JavaScript code resides in src/js/ and src/css/. Assets are built and minified running:
npm run build:assetsLinting and static code analysis:
npm run check:codeAutomatic fixing code and formatting:
npm run fixnpm testBASE_URL environment variable can be overridden in tests that target the web server (e.g. Playwright):
BASE_URL=https://pccd.dites.cat npm testYou may need to run npm run refresh:test-data if the data has changed, in order to pass some e2e tests.
If Lighthouse audits crash, try specifying the Chrome path:
CHROME_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" npm run validate:lighthouseFor running some tests in all pages, run:
npm run validate:sitemap-urlsSPX and XHProf profilers are available:
npm run docker:build:spxnpm run docker:build:xhprofProfiler reports can be accessed in /admin/, alongside the other reports (web admin password is set in the .env
file).
For details on contributing to this repository, see the contributing guidelines:
Copyright (c) Pere Orga Esteve [email protected], 2020.
Copyright (c) Víctor Pàmies i Riudor [email protected], 2020.
This source code is licensed under the GNU Affero General Public License, version 3 or later, as detailed in the LICENSE file or available at https://www.gnu.org/licenses/agpl-3.0.html.
Note that the database and media files are not distributed with this repository. For more details about PCCD, visit https://pccd.dites.cat/.
This repository includes:
- Chart.js, licensed under the MIT License.
- Composer, licensed under the MIT License.
- Roboto font, licensed under the Apache License Version 2.0.
- simple-datatables, licensed under the LGPL Version 3.
The following tools were originally developed as part of this project and are now maintained in separate repositories:
- @pccd/lt-filter - A command-line tool for filtering Catalan sentences using LanguageTool. It separates grammatically or orthographically incorrect sentences from correct ones. Licensed under the LGPL 2.1 or later.
- pereorga/phpstan-rules - Custom opinionated rules for PHPStan. Licensed under the MIT License.
