Ingests Square invoices/payments, extracts event scheduling from order notes, and pushes approved entries to a CalDAV calendar after human review. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
51 lines
2.1 KiB
Plaintext
51 lines
2.1 KiB
Plaintext
# Copy this file to .env and fill in real values before running
|
|
# `docker compose up`. Never commit the real .env file.
|
|
|
|
# --- App ---
|
|
NODE_ENV=production
|
|
PORT=3000
|
|
# Generate with: openssl rand -base64 48
|
|
JWT_SECRET=changeme-generate-a-long-random-string
|
|
|
|
# IANA timezone the business operates in (e.g. America/New_York, America/Chicago).
|
|
# Used to interpret dates/times extracted from delivery/strike order notes, and
|
|
# as a fallback for invoices Square doesn't tag with a timezone. Defaults to
|
|
# UTC, which is almost certainly wrong for you — set this.
|
|
BUSINESS_TIMEZONE=America/New_York
|
|
|
|
# --- Bootstrap admin (only used the very first time the app starts, when
|
|
# the users table is empty) ---
|
|
BOOTSTRAP_ADMIN_EMAIL=admin@example.com
|
|
BOOTSTRAP_ADMIN_PASSWORD=changeme
|
|
BOOTSTRAP_ADMIN_NAME=Admin
|
|
|
|
# --- Database (used by both the app and the postgres container) ---
|
|
POSTGRES_USER=ordertopdf
|
|
POSTGRES_PASSWORD=changeme
|
|
POSTGRES_DB=ordertopdf
|
|
# When running outside docker-compose, set the full URL yourself, e.g.:
|
|
# DATABASE_URL=postgresql://ordertopdf:changeme@localhost:5432/ordertopdf
|
|
|
|
# --- Square (developer.squareup.com > your app > Credentials) ---
|
|
SQUARE_ENVIRONMENT=sandbox
|
|
SQUARE_APP_ID=sq0idp-xxxxxxxxxxxxxxxxxxxxxx
|
|
SQUARE_ACCESS_TOKEN=EAAAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
# Optional: comma-separated location IDs. Leave blank to sync all locations.
|
|
SQUARE_LOCATION_ID=
|
|
SYNC_INTERVAL_CRON=*/15 * * * *
|
|
SYNC_MAX_PAGES=10
|
|
SYNC_OVERLAP_MINUTES=60
|
|
# Square's Invoices API has no date filter, so we page newest-first and stop
|
|
# once we're this many days back in invoice history.
|
|
SYNC_INVOICE_LOOKBACK_DAYS=180
|
|
PAYMENT_DEFAULT_DURATION_MINUTES=60
|
|
|
|
# --- CalDAV ---
|
|
# The CalDAV server root (used for auth/discovery).
|
|
CALDAV_SERVER_URL=https://cloud.example.com/remote.php/dav
|
|
# The specific calendar collection events get written to. MUST end with a
|
|
# trailing slash. See docs/caldav-setup.md for how to find this per provider.
|
|
CALDAV_CALENDAR_URL=https://cloud.example.com/remote.php/dav/calendars/user/orders/
|
|
CALDAV_USERNAME=caldavuser
|
|
CALDAV_PASSWORD=app-specific-password
|