Make sure the following tools are installed on your system:
- Docker
- Docker Compose
cd apicp .env.example .envdocker build -t medical-records-backend-dev . -f docker/Dockerfile.devdocker run --env-file .env -d -p 3000:3000 medical-records-backend-devRun this inside the running container:
docker exec -it <container_id> sh
pnpm run db:migrateReplace <container_id> with the actual ID of your running container.
docker-compose up --build
⚠️ OCR feature will not work if you use local database, as it requires a live database connection. To enable OCR, use a hosted DB like NeonDB. Create a database on Neon and update the.envfile with the provided database URL.
cd ocr-worker
cp .env.example .envpnpm serverless loginpnpm run db:generate
pnpm run deployGo to: AWS Console > S3 > Your Bucket > Properties > Event Notifications > Create Notification
Fill in the following:
- Event Name:
ocr-event - Prefix:
ocr-files/ - Suffix: (leave empty)
- Destination: Select
SQS - Choose
OcrQueuefrom the dropdown
cd apipnpm run testtest might fail because of timeout