-
-
Notifications
You must be signed in to change notification settings - Fork 33
Getting started
This guide covers setting up the LiturgicalCalendar project for local development.
-
PHP 8.4+ with the following extensions:
intl,zip,calendar,yaml,gettext - Composer for dependency management
- Docker and Docker Compose (optional, for infrastructure services)
- PostgreSQL (optional, only needed for RBAC/authentication features — or use the Docker stack)
git clone https://github.com/Liturgical-Calendar/LiturgicalCalendarAPI.git
cd LiturgicalCalendarAPI
composer installCopy the example environment file and adjust as needed:
cp .env.example .env.localThe key variables for local development are:
-
API_PROTOCOL,API_HOST,API_PORT— where the API server listens (defaults:http,localhost,8000) -
APP_ENV— set todevelopment -
JWT_SECRET— for authentication (a default is provided for development)
See .env.example for the full list of configuration options with documentation.
The API requires a multi-worker setup (6 workers) using PHP's built-in server:
composer start # Starts the server on localhost:8000
composer stop # Stops the serverAlternatively, use the shell script directly:
./start-server.shIf using VS Code, you can start the server via Ctrl+Shift+B (the
project includes a tasks.json configuration).
The docker-compose.yml in the API repository provides the supporting infrastructure services.
These are not required for basic API development, but are needed when working on
authentication and RBAC features:
- Zitadel — OIDC identity provider
- Login V2 — Zitadel login UI
- OpenFGA — fine-grained authorization
- PostgreSQL — database
- Mailpit — email testing
- Adminer — database UI
The setup involves several steps:
-
Start the containers:
docker compose up -d
-
Configure the Zitadel project (create project, roles, and applications) via the Zitadel Console at http://localhost:8080/ui/console. See
infrastructure/README.mdfor the detailed steps. -
Run the OpenFGA setup script:
./scripts/setup-openfga.sh --update-env
-
Update
.env.localwith the Zitadel client IDs, project ID, and database credentials from the previous steps. -
Restart the containers to pick up the new environment variables:
docker compose down && docker compose up -d
The API itself still runs natively via composer start — the Docker stack only provides the
services the API connects to. See
infrastructure/README.md
for the full setup walkthrough, port assignments, and troubleshooting.
The frontend is a separate repository with two setup options.
git clone https://github.com/Liturgical-Calendar/LiturgicalCalendarFrontend.git
cd LiturgicalCalendarFrontend
composer install
cp .env.example .env.developmentStart the frontend development server (ensure the API is running first):
php -S localhost:3000The frontend repository has its own docker-compose.yml that orchestrates the entire stack —
API, frontend, test interface, and all infrastructure services — without requiring a local PHP
installation:
git clone https://github.com/Liturgical-Calendar/LiturgicalCalendarFrontend.git
cd LiturgicalCalendarFrontend
docker compose up -dSee the Frontend README for details on the full-stack Docker setup.
# Run all tests (requires the API server to be running for integration tests)
composer test
# Run only fast unit tests (no server needed)
composer test:quick
# Run a single test file
vendor/bin/phpunit phpunit_tests/Services/RateLimiterTest.phpSee How to write unit tests for details on the test infrastructure.
composer lint # Check code style (phpcs, PSR-12)
composer lint:fix # Auto-fix code style
composer analyse # PHPStan static analysis (level 10)
composer parallel-lint # PHP syntax checking
composer lint:md # Markdown lintingThe liturgical event test interface uses a WebSocket server:
composer ws:start # Start the WebSocket test server
composer ws:stop # Stop the WebSocket test serverSee Unit Test server and interface for details.
- API README — full project description, data sources, and characteristics
- Infrastructure README — Docker Compose infrastructure details and troubleshooting
- Source data — how the liturgical calendar source data is organized
- Translating — contributing translations via Weblate
For Contributors: Source data Next → | Home
For Users
For Webmasters
For Liturgists
For Developers
For Contributors
Testing
Authentication & RBAC