OCR Service - Infrastructure
Infrastructure setup
Valkey (queues & event system)
bash
docker compose -f 'docker-compose.yml' up -d --build 'valkey'to stop:
bash
docker compose -f 'docker-compose.yml' down 'valkey'Running the Service
Install Dependencies
bash
pnpm installEnvironment variables
- Add a
.env.devat the service root - Get the environment variables from 1password for the corresponding service
Commands
bash
# Development
nx run ocr:dev
# Build
nx run ocr:build
# Test
nx run ocr:test
# Lint
nx run ocr:lint
# Run in Docker
docker compose -f 'docker-compose.yml' up -d --build 'ocr'
# Check dependencies
nx show project ocr
# Show affected projects (based on git changes)
nx affected:graphShared Packages
The shared packages (dto, models, utils) are automatically linked and can be imported in both backend and frontend applications. Any changes to these packages will trigger rebuilds in dependent applications.
These packages mostly contain global functions (like logger, utils, ...) shared among services, providing common functionality and ensuring consistency across the monorepo.
Available Packages
- dto - Data Transfer Objects
- models - Shared data models
- utils - Utility functions and helpers