JEISA-WEBAPP/.env.example
Dave c272526d67 feat(automation): add PO-to-invoice pipeline
- 6 new PocketBase migrations: customer_pos, customer_po_lines, invoices,
  invoice_items, email_inbox, workflow_runs
- n8N workflow JSON: 01-customer-po-to-parsed.json + 02-parsed-po-to-invoice.json
- MCP server config (.cursor/mcp.json + .mcp.json) for AI agent PB access
- .env.example template with all required credentials documented
- n8n/README.md with deployment, testing, and customization notes
2026-09-06 23:40:33 +02:00

49 lines
No EOL
1.9 KiB
Text

# =============================================================
# JEISA Automation: Customer PO → Invoice → Stock decrement
# =============================================================
#
# Copy this file to `.env` (root of the JEISA app) and fill in
# the values. These are read by:
# • The PocketBase MCP server (so an AI agent can read/write PB)
# • n8N credentials (when you configure the IMAP / QB / SMTP nodes)
#
# DO NOT commit `.env` to git. (Already in .gitignore.)
# =============================================================
# ---------- PocketBase ----------
VITE_PB_URL=https://pb.jeistk.apphub.co.za
POCKETBASE_URL=https://pb.jeistk.apphub.co.za
# Superuser (admin) credentials for the MCP and n8N HTTP Request nodes.
# You can find these in /Volumes/EXT/DEVELOPMENT-FORGEJO/JEISA-APP/setup-users.js
# or in your PB dashboard under Settings → Admins.
POCKETBASE_ADMIN_EMAIL=david@wfsales.co.za
POCKETBASE_ADMIN_PASSWORD=REPLACE_ME_admin_password
# ---------- IMAP (incoming customer PO inbox) ----------
# This is the mailbox customers send their POs to.
# IMAP_HOST is host:port (e.g. imap.gmail.com:993)
IMAP_HOST=imap.gmail.com
IMAP_PORT=993
IMAP_USER=orders@jeisa.co.za
IMAP_PASSWORD=REPLACE_ME_app_password
IMAP_TLS=true
# ---------- QuickBooks Online ----------
# OAuth2 app credentials (https://developer.intuit.com/app/developer/dashboard)
# After you create the app, generate sandbox + production keys.
QB_CLIENT_ID=REPLACE_ME_client_id
QB_CLIENT_SECRET=REPLACE_ME_client_secret
QB_REALM_ID=REPLACE_ME_realm_id
QB_ENVIRONMENT=sandbox
# ---------- SMTP (fallback for sending invoice if QB can't) ----------
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=invoices@jeisa.co.za
SMTP_PASSWORD=REPLACE_ME_smtp_password
SMTP_FROM_NAME=JEISA Invoices
# ---------- Optional: OpenAI (for AI-powered PDF parsing) ----------
# If your POs aren't machine-readable, use AI to extract line items.
OPENAI_API_KEY=REPLACE_ME_openai_key