Skip to main content

Configuration

Configure FacilFlow for your environment.

Environment Variables

Frontend (.env)

# API endpoint
REACT_APP_API_URL=http://localhost:3002

# Firebase (for authentication)
REACT_APP_FIREBASE_API_KEY=your-api-key
REACT_APP_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
REACT_APP_FIREBASE_PROJECT_ID=your-project-id

Backend (backend/.env)

# Server
PORT=3002
NODE_ENV=development

# CORS
ALLOWED_ORIGINS=http://localhost:3001

# Database connections
POSTGRES_URL=postgresql://user:pass@localhost:5432/facilflow
INFLUXDB_URL=http://localhost:8086
INFLUXDB_TOKEN=your-token
INFLUXDB_ORG=facilisai
INFLUXDB_BUCKET=facilflow

# Firebase Admin
FIREBASE_SERVICE_ACCOUNT_PATH=./firebase-service-account.json

Database Setup

PostgreSQL

# Create database
createdb facilflow

# Run migrations (when available)
cd backend && npm run migrate

InfluxDB

FacilFlow uses InfluxDB for time-series data storage. Configure the connection in your backend .env file.