-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.example
More file actions
97 lines (89 loc) · 5.61 KB
/
env.example
File metadata and controls
97 lines (89 loc) · 5.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# ─── CourtReserve ────────────────────────────────────────────────────────────
# Authentication: HTTP Basic Auth (orgId as username, apiKey as password)
CR_BASE_URL=https://api.courtreserve.com
CR_ORG_ID=your_org_id_here
CR_API_KEY=your_api_key_here
# ─── UniFi Access ─────────────────────────────────────────────────────────────
# API token requires scopes: view:credential, edit:visitor
UNIFI_HOST=https://YOUR_PUBLIC_IP:12445
UNIFI_API_TOKEN=your_unifi_api_token_here
# Format: door_group:ID or door:ID (comma-separated for multiple)
# Leave empty to test without door access
UNIFI_RESOURCES=
# ─── Email transport ─────────────────────────────────────────────────────────
# CourtPin supports two email transports. Set ONE of the options below.
# If RESEND_API_KEY is set it takes priority. Otherwise SMTP is used.
#
# OPTION A — Resend (recommended for Railway and cloud hosting)
# Resend sends via HTTPS so it works on Railway where SMTP ports are blocked.
# Free tier at resend.com includes 3,000 emails/month.
# Use onboarding@resend.dev for testing before your domain is verified in Resend.
RESEND_API_KEY=re_xxxxxxxxxxxxxxxxxxxx
#
# OPTION B — SMTP (recommended for local/self-hosted setups)
# Works with any SMTP server: your existing email host (Bluehost, Google Workspace,
# Microsoft 365), or a local SMTP server on the same network.
# Leave RESEND_API_KEY blank or remove it to activate SMTP mode.
SMTP_HOST=mail.yourclub.com
SMTP_PORT=587
# Set SMTP_SECURE=true only for port 465 (implicit TLS). Use false for port 587 (STARTTLS).
SMTP_SECURE=false
SMTP_USER=noreply@yourclub.com
SMTP_PASS=your_smtp_password_here
#
# The FROM address is used by both Resend and SMTP.
EMAIL_FROM=noreply@yourclub.com
# ─── SMS / Twilio (Optional) ──────────────────────────────────────────────────
# Set TWILIO_ENABLED=true to send SMS in addition to email.
# Free trial at twilio.com includes $15 credit (~1,900 texts).
TWILIO_ENABLED=false
TWILIO_ACCOUNT_SID=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWILIO_AUTH_TOKEN=your_auth_token_here
TWILIO_FROM_NUMBER=+13045550100
# ─── Branding ────────────────────────────────────────────────────────────────
# These values appear in every email and in the admin portal.
BRAND_CLUB_NAME=Your Club Name
BRAND_TAGLINE=Court Access
# Hex colors — enter WITHOUT the # symbol (Railway treats # as a comment)
# e.g. for #1a56db enter: 1a56db
BRAND_HEADER_COLOR=1a56db
BRAND_ACCENT_COLOR=1a56db
# Optional contact info shown in the email footer
BRAND_WEBSITE=https://yourclub.com
BRAND_PHONE=555-555-0100
BRAND_ADDRESS=123 Main St, Your City ST
# ─── Admin Portal ─────────────────────────────────────────────────────────────
# Visit https://YOUR_RAILWAY_URL/admin to look up and resend PINs on mobile.
# Railway: Settings → Networking → Generate Domain to get your URL.
ADMIN_PORT=3000
ADMIN_SECRET=choose_a_strong_password_here
# ─── Behaviour ────────────────────────────────────────────────────────────────
# ─── Events ──────────────────────────────────────────────────────────────────
# Controls how door access is granted to event registrants.
# pin_individual — each registrant gets their own unique Visitor + PIN (default)
# pin_shared — one PIN generated for the event, sent to all registrants
# unlock — door(s) in UNIFI_RESOURCES unlocked for the event duration
EVENT_ACCESS_MODE=pin_individual
# How early the door access activates before the event start (default: 30)
EVENT_ACCESS_BUFFER_MINUTES=30
# unlock mode only: send email/SMS notification that the facility is open
# true = send notification, false = unlock silently (default)
EVENT_UNLOCK_NOTIFY=false
# ─── PIN mode ─────────────────────────────────────────────────────────────────
# PIN mode — controls how door PINs are generated
# random — generates a new random PIN for each reservation (default)
# static — uses the member's CourtReserve OrganizationMemberId as their PIN
# members get the same PIN every time and only need to learn it once
# requires UniFi Access PIN mode set to Variable Length:
# Access → Settings → General → PIN → Variable Length
PIN_MODE=random
# Minutes before reservation start to send the PIN (default: 60)
NOTIFY_MINUTES_BEFORE=60
# Minutes before reservation start that the PIN becomes active (default: 30)
ACCESS_BUFFER_MINUTES=30
# Minutes after reservation end before deleting the visitor (default: 15)
CLEANUP_BUFFER_MINUTES=15
# Your timezone — critical on Railway which runs in UTC
TZ=America/New_York
# State file — use /tmp/ on Railway
STATE_FILE=/tmp/state.json