schreifuchs 74d81e4271
All checks were successful
Go / build (push) Successful in 54s
Release / publish (push) Successful in 1m4s
chore: bump go version
2025-11-04 21:17:13 +01:00
2025-11-04 21:17:13 +01:00
2025-08-26 22:40:49 +02:00
2025-11-04 21:15:05 +01:00
2025-11-04 20:16:44 +01:00
2025-11-04 21:15:05 +01:00
2025-08-27 21:29:52 +02:00
2025-11-04 21:17:13 +01:00
2025-11-04 21:17:13 +01:00
2025-09-16 21:14:39 +02:00
2025-08-27 21:29:52 +02:00

docker run --rm -p 3030:3000 gotenberg/gotenberg:8

Configuration

This application can be configured using a config.json file in the root of the project, or by using environment variables. Values set in environment variables will override the values from the config.json file.

You can use the config.example.json file as a starting point for your config.json.

Environment Variables

The following environment variables can be used for configuration:

Variable Description
PDF_HOSTNAME The hostname of the PDF generator (Gotenberg)
GITEA_URL The URL of your Gitea instance
GITEA_TOKEN Your Gitea API token
EMAIL_FROM The "From" address for sending emails
EMAIL_SMTP_HOST The SMTP server host
EMAIL_SMTP_PORT The SMTP server port
EMAIL_SMTP_USER The username for SMTP authentication
EMAIL_SMTP_PASSWORD The password for SMTP authentication

API Endpoints

POST /invoice

Creates a new invoice.

curl -X POST -H "Content-Type: application/json" -d '{
  "debtor": {
    "name": "John Doe",
    "Address": {
      "street": "Musterstrasse",
      "number": "1",
      "zipCode": "1234",
      "place": "Musterstadt",
      "country": "CH"
    },
    "contact": "john.doe@example.com"
  },
  "creditor": {
    "name": "Jane Doe",
    "Address": {
      "street": "Beispielweg",
      "number": "2",
      "zipCode": "5678",
      "place": "Beispielhausen",
      "country": "CH"
    },
    "contact": "jane.doe@example.com",
    "iban": "CH1234567890123456789"
  },
  "durationThreshold": "1h",
  "hourlyRate": 100,
  "repositories": [
    "lou-taylor/accounting"
  ]
}' http://localhost:8080/invoice

POST /invoice/send

Creates a new invoice and sends it by email.

curl -X POST -H "Content-Type: application/json" -d '{
  "to": ["john.doe@example.com"],
  "subject": "Invoice for project lou-taylor/accounting",
  "body": "Hi John,\n\nPlease find attached the invoice for the project lou-taylor/accounting.\n\nBest regards,\nJane Doe",
  "invoice": {
    "debtor": {
      "name": "John Doe",
      "Address": {
        "street": "Musterstrasse",
        "number": "1",
        "zipCode": "1234",
        "place": "Musterstadt",
        "country": "CH"
      },
      "contact": "john.doe@example.com"
    },
    "creditor": {
      "name": "Jane Doe",
      "Address": {
        "street": "Beispielweg",
        "number": "2",
        "zipCode": "5678",
        "place": "Beispielhausen",
        "country": "CH"
      },
      "contact": "jane.doe@example.com",
      "iban": "CH1234567890123456789"
    },
    "durationThreshold": "1h",
    "hourlyRate": 100,
    "repositories": [
      "lou-taylor/accounting"
    ]
  }
}' http://localhost:8080/invoice/send

Description
No description provided
Readme 8.6 MiB
2025-12-01 21:29:58 +01:00
Languages
Go 85.5%
HTML 10.5%
CSS 3.3%
Dockerfile 0.7%