Configuration
This guide explains how to configure the Hospitality Management Platform for your property.
Environment Configuration
Core Settings
# Application
NODE_ENV=production
API_PORT=3000
API_HOST=0.0.0.0
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/hmp
DATABASE_POOL_SIZE=20
# Redis
REDIS_URL=redis://localhost:6379
REDIS_PREFIX=hmp:
# Security
JWT_SECRET=your-256-bit-secret
JWT_EXPIRY=24h
REFRESH_TOKEN_EXPIRY=7d
Multi-Tenancy Configuration
HMP supports multiple tenancy models:
# Tenancy Mode: 'schema' or 'database'
TENANCY_MODE=schema
# Default tenant for development
DEFAULT_TENANT=demo
Property Configuration
General Settings
Configure your property in the admin dashboard or via API:
{
"property": {
"name": "Grand Hotel",
"code": "GH001",
"timezone": "Asia/Kolkata",
"currency": "INR",
"locale": "en-IN",
"checkInTime": "14:00",
"checkOutTime": "11:00"
}
}
Room Types
Define room types for your property:
{
"roomTypes": [
{
"code": "STD",
"name": "Standard Room",
"maxOccupancy": 2,
"baseRate": 5000
},
{
"code": "DLX",
"name": "Deluxe Room",
"maxOccupancy": 3,
"baseRate": 7500
},
{
"code": "STE",
"name": "Suite",
"maxOccupancy": 4,
"baseRate": 15000
}
]
}
Rate Plans
Configure rate plans for different market segments:
{
"ratePlans": [
{
"code": "BAR",
"name": "Best Available Rate",
"type": "PUBLIC",
"cancellationPolicy": "FLEXIBLE"
},
{
"code": "CORP",
"name": "Corporate Rate",
"type": "NEGOTIATED",
"cancellationPolicy": "MODERATE"
}
]
}
Integration Settings
Payment Gateway
# Payment Gateway Configuration
PAYMENT_GATEWAY=razorpay
RAZORPAY_KEY_ID=rzp_live_xxxxx
RAZORPAY_KEY_SECRET=xxxxx
Channel Manager
# Channel Manager Integration
CHANNEL_MANAGER_ENABLED=true
CHANNEL_MANAGER_PROVIDER=siteminder
SITEMINDER_HOTEL_ID=12345
SITEMINDER_API_KEY=xxxxx
Email Configuration
# SMTP Settings
SMTP_HOST=smtp.sendgrid.net
SMTP_PORT=587
SMTP_USER=apikey
SMTP_PASSWORD=xxxxx
EMAIL_FROM=noreply@hotel.com
Security Configuration
Authentication
# OAuth2 / SSO
OAUTH_ENABLED=true
OAUTH_PROVIDER=google
OAUTH_CLIENT_ID=xxxxx
OAUTH_CLIENT_SECRET=xxxxx
CORS Settings
# Allowed Origins
CORS_ORIGINS=https://hotel.com,https://admin.hotel.com
CORS_METHODS=GET,POST,PUT,DELETE
Rate Limiting
# API Rate Limiting
RATE_LIMIT_WINDOW=60000
RATE_LIMIT_MAX=100
Logging Configuration
# Logging
LOG_LEVEL=info
LOG_FORMAT=json
LOG_FILE=/var/log/hmp/app.log