The Automated Invoice Description Generator is a web application designed to streamline the process of generating invoice descriptions for AGH University procurement.
Use docker buildx to create a multi-platform image (for both amd64 and arm64):
docker buildx build \
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/aghrapidpro/invoice-description-generator:1.0 \
-t ghcr.io/aghrapidpro/invoice-description-generator:latest \
--push .✅ Ensure Docker Buildx is available on your system (
docker buildx lsto check).
You can run the invoice-description-generator independently with:
docker run --name invoice-description-generator --rm \
-v ./invoice-description-generator-data:/api/data \
-v ./latest.json:/usr/local/apache2/htdocs/assets/cpv/latest.json:ro \
-p 80:80 -p 3000:3000 --pull=always \
-e API_URL=http://localhost:3000 \
ghcr.io/aghrapidpro/invoice-description-generator:latestor...
For a full setup including the CPV scraper service, use Docker Compose:
git clone git@github.com:AGHRapidPro/invoice-description-generator.git
cd invoice-description-generator/
docker-compose up -dThis will:
-
Start two containers:
invoice-description-generator– the main appagh-cpv-scraper– provides current procurement data from AGH DZP website- Parsed CPV data is mounted into the front-end so it's immediately available
- Invoice data is persisted to
./invoice-description-generator-data
-
Map ports:
3000:3000– Back-end API4200:80– Front-end UI
You can now access the app via: 👉 http://localhost:4200 (or your configured domain)
Changes to CPV data will be picked up automatically by the
agh-cpv-scrapercontainer that checks the upstream daily at 5:00 AM.
By default, the application is configured to work only on localhost. To set up for remote usage:
- Set the environment variable
API_URLto point to your server's IP or domain:
# Example for remote setup
export API_URL=http://your.domain:3000 # or http://your-ip:3000If not set, the application will default to
http://localhost:3000
-
Frontend
- Angular with Material UI
- PDF generation using pdfmake
- Reactive forms for data handling
- Material table for data display
-
Backend
- Node.js API server
- RESTful endpoints for grants and users
- Persistent data storage
- Automatic Procurement data tracking and parsing delivered by agh-cpv-scraper
To serve the application securely over HTTPS and resolve mixed content issues;
Mixed Content: The page at 'https://faktury.example.domain/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://faktury.example.domain:3000/api/grants'. This request has been blocked; the content must be served over HTTPS.
you should configure a reverse proxy. This setup ensures both frontend and backend communicate exclusively over HTTPS.
(cloudflare-dns01) {
tls {
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
}
}
faktury.example.domain {
import cloudflare-dns01
reverse_proxy invoice-description-generator:80
}
faktury-api.example.domain {
import cloudflare-dns01
reverse_proxy invoice-description-generator:3000
}---
services:
invoice-description-generator:
image: ghcr.io/aghrapidpro/invoice-description-generator:latest
container_name: invoice-description-generator
environment:
- API_URL=https://faktury-api.example.domain
volumes:
- ./invoice-description-generator-data/:/api/data/
- ./agh-cpv-scraper-data/:/usr/local/apache2/htdocs/assets/cpv/
depends_on:
- agh-cpv-scraper
restart: unless-stopped
agh-cpv-scraper:
image: ghcr.io/aghrapidpro/agh-cpv-scraper:latest
container_name: agh-cpv-scraper
volumes:
- ./agh-cpv-scraper-data/:/app/cpv/
restart: unless-stopped
caddy:
# https://github.com/AGHRapidPro/caddy-cloudflare
image: ghcr.io/aghrapidpro/caddy-cloudflare:latest
container_name: caddy
restart: always
environment:
- ACME_AGREE=true
- CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_KEY}
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- ./caddy/data:/data
- ./caddy/config:/config
ports:
- "80:80"
- "443:443"Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is maintained by KN AGH Rapid Prototyping . See the LICENSE for details.