Skip to content

Accés en línia a la base de dades de Víctor Pàmies.

License

Notifications You must be signed in to change notification settings

Softcatala/pccd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paremiologia catalana comparada digital (PCCD)

This is the source code of Paremiologia catalana comparada digital website. The PCCD database and media files are not distributed with this repository.

Installation

  1. Copy .env.sample to .env.

  2. Build the container using the default Debian-based image:

docker-compose up

When the database has finished importing, the website should be available at http:https://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.

Alpine-based image

An Alpine-based image is used in production, and is also available locally:

docker-compose -f docker-compose-alpine.yml up

Or:

docker system prune -f
docker-compose -f docker-compose-alpine.yml -f docker-compose-alpine.override.sample.yml up --build

Updating the content and creating a new release

For detailed instructions on updating the content and pushing a new release, please see the Content Update and Release Guide.

Local development

Development requirements

  • PHP: 8.2 or later is required.
  • Node.js: 18.16 or later is required.
  • Docker

Assets

CSS/JavaScript code resides in src/js/ and src/css/. Assets are built and minified running:

npm run build:assets

Code linting, formatting and static code analysis

Linting and static code analysis:

npm run check:code

Automatic fixing code and formatting:

npm run fix

Automated tests

npm test

BASE_URL environment variable can be overridden in tests that target the web server (e.g. Playwright):

BASE_URL=https://pccd.dites.cat npm test

You may need to run npm run refresh:test-data if the data has changed, in order to pass some e2e tests.

For running some tests in all pages, run:

npm run check:sitemap

Profiling

SPX and XHProf profilers are available:

npm run build:docker:spx
npm run build:docker:xhprof

Profiler reports can be accessed in /admin/, alongside the other reports (web admin password is set in the .env file).

Contributing

For details on contributing to this repository, see the contributing guidelines:

TODO

  • Compliance: consider start using GA conditionally when the cookie dialog has been accepted, or better, consider removing Google Tag Manager or switching to a lighter Google Analytics alternative (see https://news.ycombinator.com/item?id=32068539)

License

Copyright (c) Pere Orga Esteve [email protected], 2020.

Copyright (c) Víctor Pàmies i Riudor [email protected], 2020.

Use of this source code is governed by the GNU Affero General Public License v3.0 found in the LICENSE file or at https://www.gnu.org/licenses/agpl-3.0.html.

File scripts/common-voice-export/pccd.txt is Copyright (c) Víctor Pàmies i Riudor and is made available under the Creative Commons Zero 1.0 Universal license (CC0 1.0).

For more details about PCCD, visit https://pccd.dites.cat/.

This repository includes: