16ed6e412f
- Remove progress meter for faster perceived load times - Fix async getGraphToken() calls with await - Implement service principal (app-only) authentication for file caching - Pre-cache jobs (2242 jobs) at startup via Redis - Background file caching for first 300 jobs on continuous cycle - Cache refreshes every 5 minutes to keep data current - All caches served instantly from Redis for all users/devices - No user authentication required for backend caching - App token auto-refreshes every 55 minutes Changes: - backend/src/index.ts: Added service principal flow, startup cache warming, background file caching - frontend/public/index.html: Removed progress bar, fixed getGraphToken() awaits - .env.example: Added GRAPH_TOKEN documentation
34 lines
739 B
Bash
34 lines
739 B
Bash
# Server
|
|
PORT=3005
|
|
NODE_ENV=development
|
|
|
|
# Redis/Valkey
|
|
REDIS_HOST=localhost
|
|
REDIS_PORT=6379
|
|
REDIS_PASSWORD=
|
|
|
|
# PocketBase
|
|
POCKETBASE_URL=https://pocketbase.ccllc.pro
|
|
POCKETBASE_ADMIN_EMAIL=
|
|
POCKETBASE_ADMIN_PASSWORD=
|
|
|
|
# Microsoft OAuth
|
|
MICROSOFT_CLIENT_ID=
|
|
MICROSOFT_CLIENT_SECRET=
|
|
MICROSOFT_TENANT=common
|
|
MICROSOFT_REDIRECT_URI=http://localhost:3005/api/auth/callback
|
|
|
|
# Microsoft Graph API Token (for server-side file caching)
|
|
# This token is used by the backend to pre-cache SharePoint files
|
|
# Note: Graph tokens expire after ~60 minutes and need manual refresh
|
|
GRAPH_TOKEN=
|
|
|
|
# Logging
|
|
LOG_LEVEL=info
|
|
LOG_FILE=logs/app.log
|
|
ERROR_LOG_FILE=logs/error.log
|
|
|
|
# Token Settings
|
|
TOKEN_REFRESH_INTERVAL_MS=1800000
|
|
TOKEN_EXPIRY_BUFFER_MS=900000
|