Development
Command Reference
Complete reference for all Taskfile commands and development scripts.
Command Reference
This reference covers all available commands for developing, building, and deploying LAREX.
Taskfile Commands
All commands are run from the repository root using task <command>.
Setup & Installation
| Command | Description |
|---|---|
task setup | One-time setup for new developers (installs deps, starts infra) |
task install | Install all dependencies (frontend + keycloak-theme) |
task dev | Start development environment instructions |
Docker Orchestration
| Command | Description |
|---|---|
task docker:up | Start all services with Docker Compose |
task docker:up:build | Build and start all services |
task docker:down | Stop all services |
task docker:down:clean | Stop services and remove volumes |
task docker:infra | Start only infrastructure (postgres, keycloak, traefik) |
task docker:logs | View logs from all services |
task docker:logs:backend | View backend logs |
task docker:logs:frontend | View frontend logs |
task docker:ps | Show running containers |
Production Docker
| Command | Description |
|---|---|
task docker:prod:up | Start production services |
task docker:prod:down | Stop production services |
task docker:prod:logs | View production logs |
Testing
| Command | Description |
|---|---|
task test | Run all tests (backend + frontend) |
task test:backend | Run backend tests only |
task test:frontend | Run frontend lint + typecheck |
Building
| Command | Description |
|---|---|
task build | Build all projects (backend, frontend, theme) |
task build:docker | Build production Docker images |
Version Management
| Command | Description |
|---|---|
task ver | Show current version |
task ver:sync | Sync VERSION to all projects |
task ver:bump:major | Bump major version (X.0.0) |
task ver:bump:minor | Bump minor version (0.X.0) |
task ver:bump:patch | Bump patch version (0.0.X) |
Release
| Command | Description |
|---|---|
task release:docker | Build and tag Docker images for release |
task release:docker:push | Push Docker images to registry |
Utilities
| Command | Description |
|---|---|
task clean | Clean all build artifacts |
task status | Show status of all services |
task db:shell | Open PostgreSQL shell |
task keycloak:shell | Open Keycloak container shell |
Backend Commands
Run from backend/ directory:
| Command | Description |
|---|---|
./gradlew bootRun | Start development server |
./gradlew bootRun -Pdebug | Start with debug enabled |
./gradlew build | Build application |
./gradlew build -x test | Build without tests |
./gradlew bootJar | Build JAR file |
./gradlew test | Run tests |
./gradlew test --info | Run tests with verbose output |
./gradlew clean | Clean build artifacts |
./gradlew dependencies | List dependencies |
./gradlew dependencyUpdates | Check for updates |
./gradlew spotlessApply | Format code |
Backend Taskfile
From root, use: task backend:<command>
| Command | Description |
|---|---|
task backend:dev | Run backend development server |
task backend:dev:debug | Run with debug enabled |
task backend:build | Build backend |
task backend:test | Run backend tests |
task backend:clean | Clean backend artifacts |
Frontend Commands
Run from frontend/ directory:
| Command | Description |
|---|---|
pnpm dev | Start development server |
pnpm build | Build for production |
pnpm preview | Preview production build |
pnpm lint | Run ESLint |
pnpm lint --fix | Auto-fix linting issues |
pnpm typecheck | Run TypeScript typecheck |
pnpm install | Install dependencies |
Frontend Taskfile
From root, use: task frontend:<command>
| Command | Description |
|---|---|
task frontend:dev | Start frontend development server |
task frontend:build | Build frontend |
task frontend:lint | Run ESLint |
task frontend:typecheck | Run TypeScript check |
task frontend:install | Install dependencies |
task frontend:clean | Clean build artifacts |
Keycloak Theme Commands
Run from keycloak-theme/ directory:
| Command | Description |
|---|---|
npm install | Install dependencies |
npm run build | Build theme JAR |
Theme Taskfile
From root, use: task theme:<command>
| Command | Description |
|---|---|
task theme:install | Install dependencies |
task theme:build | Build theme JAR |
task theme:clean | Clean build artifacts |
Direct Docker Commands
Docker Compose (Development)
# Start services
docker compose -f compose.yaml up -d
# View logs
docker compose -f compose.yaml logs -f
# Stop services
docker compose -f compose.yaml down
# Stop with volumes
docker compose -f compose.yaml down -v
Docker Compose (Production)
# Start services
docker compose -f compose.prod.yaml up -d
# View logs
docker compose -f compose.prod.yaml logs -f
# Stop services
docker compose -f compose.prod.yaml down
Useful Docker Commands
# Open PostgreSQL shell
docker compose exec postgres psql -U larex -d larexdb
# Open Keycloak shell
docker compose exec keycloak bash
# View container logs
docker compose logs -f <service-name>
# Restart a service
docker compose restart <service-name>
# Check resource usage
docker stats
Environment Variables Reference
| Variable | Used By | Description |
|---|---|---|
POSTGRES_USER | PostgreSQL | Database username |
POSTGRES_PASSWORD | PostgreSQL | Database password |
KEYCLOAK_ADMIN | Keycloak | Admin username |
KEYCLOAK_ADMIN_PASSWORD | Keycloak | Admin password |
KEYCLOAK_ADMIN_CLIENT_SECRET | Backend | OAuth client secret |
FRONTEND_HOSTNAME | Traefik | Production frontend domain |
API_HOSTNAME | Traefik | Production API domain |
KEYCLOAK_HOSTNAME | Traefik | Production Keycloak domain |
ACME_EMAIL | Traefik | LetsEncrypt email |
Next Steps
- Local Setup - Start local development
- Docker Setup - Use Docker for development
- Production Deployment - Deploy to production