Configuration Guide
The ReadyGolf platform provides extensive configuration options to customise the system for specific golf club requirements. This guide covers all configuration aspects including system settings, user management, security, and customisation options.
🎯 Configuration Overview
ReadyGolf's configuration system allows clubs to tailor the platform to their specific needs while maintaining system integrity and performance. Configuration changes can be made through the administrative interface or via configuration files.
Configuration Levels
- System Configuration: Platform-wide settings and defaults
- Club Configuration: Club-specific settings and customisation
- User Configuration: Individual user preferences and settings
- Feature Configuration: Feature-specific settings and options
⚙️ System Configuration
Environment Configuration
Environment Variables
# Database Configuration
DATABASE_URL=postgresql://user:password@localhost:5432/readygolf
DATABASE_POOL_SIZE=20
DATABASE_TIMEOUT=30000
# Authentication Configuration
JWT_SECRET=your_jwt_secret_here
JWT_EXPIRES_IN=24h
REFRESH_TOKEN_EXPIRES_IN=7d
# Email Configuration
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASSWORD=your_app_password
EMAIL_FROM=noreply@readygolf.com
# Payment Configuration
STRIPE_PUBLISHABLE_KEY=pk_test_...
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
# File Storage Configuration
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_REGION=eu-west-2
AWS_S3_BUCKET=readygolf-uploads
# Redis Configuration
REDIS_URL=redis://localhost:6379
REDIS_PASSWORD=your_redis_password
# Monitoring Configuration
SENTRY_DSN=https://your_sentry_dsn
LOG_LEVEL=info
Configuration Files
// config/database.js
module.exports = {
development: {
url: process.env.DATABASE_URL,
dialect: 'postgres',
pool: {
max: 20,
min: 5,
acquire: 30000,
idle: 10000
},
logging: false
},
production: {
url: process.env.DATABASE_URL,
dialect: 'postgres',
pool: {
max: 50,
min: 10,
acquire: 30000,
idle: 10000
},
logging: false,
ssl: {
require: true,
rejectUnauthorized: false
}
}
};
Application Configuration
Server Configuration
// config/server.js
module.exports = {
port: process.env.PORT || 3000,
host: process.env.HOST || '0.0.0.0',
cors: {
origin: process.env.CORS_ORIGIN || 'http://localhost:3000',
credentials: true
},
rateLimit: {
windowMs: 15 * 60 * 1000, // 15 minutes
max: 100 // limit each IP to 100 requests per windowMs
},
compression: {
level: 6,
threshold: 1024
}
};
Security Configuration
// config/security.js
module.exports = {
bcrypt: {
rounds: 12
},
jwt: {
secret: process.env.JWT_SECRET,
expiresIn: process.env.JWT_EXPIRES_IN || '24h',
refreshExpiresIn: process.env.REFRESH_TOKEN_EXPIRES_IN || '7d'
},
session: {
secret: process.env.SESSION_SECRET,
resave: false,
saveUninitialized: false,
cookie: {
secure: process.env.NODE_ENV === 'production',
httpOnly: true,
maxAge: 24 * 60 * 60 * 1000 // 24 hours
}
},
helmet: {
contentSecurityPolicy: {
directives: {
defaultSrc: ["'self'"],
styleSrc: ["'self'", "'unsafe-inline'"],
scriptSrc: ["'self'"],
imgSrc: ["'self'", "data:", "https:"],
connectSrc: ["'self'", "https://api.stripe.com"]
}
}
}
};
🏢 Club Configuration
Club Profile Settings
Basic Information
{
"club_name": "Royal Golf Club",
"club_code": "RGC001",
"address": {
"street": "123 Golf Course Road",
"city": "London",
"postcode": "SW1A 1AA",
"country": "United Kingdom"
},
"contact": {
"phone": "+44 20 7123 4567",
"email": "info@royalgolfclub.com",
"website": "https://www.royalgolfclub.com"
},
"operating_hours": {
"monday": { "open": "06:00", "close": "22:00" },
"tuesday": { "open": "06:00", "close": "22:00" },
"wednesday": { "open": "06:00", "close": "22:00" },
"thursday": { "open": "06:00", "close": "22:00" },
"friday": { "open": "06:00", "close": "22:00" },
"saturday": { "open": "06:00", "close": "22:00" },
"sunday": { "open": "06:00", "close": "22:00" }
}
}
Branding Configuration
{
"branding": {
"logo_url": "https://cdn.readygolf.com/logos/rgc-logo.png",
"primary_color": "#1a5f7a",
"secondary_color": "#f4a261",
"accent_color": "#e76f51",
"font_family": "Inter, sans-serif",
"custom_css": "https://cdn.readygolf.com/custom/rgc-styles.css"
},
"email_templates": {
"welcome_email": "custom-welcome-template",
"booking_confirmation": "custom-booking-template",
"payment_receipt": "custom-payment-template"
}
}
Course Configuration
Course Settings
{
"courses": [
{
"id": "course_1",
"name": "Main Course",
"holes": 18,
"par": 72,
"length": 6500,
"difficulty": "championship",
"tee_time_interval": 10,
"max_players_per_group": 4,
"booking_window_days": 30,
"cancellation_hours": 24
},
{
"id": "course_2",
"name": "Practice Course",
"holes": 9,
"par": 36,
"length": 2800,
"difficulty": "beginner",
"tee_time_interval": 15,
"max_players_per_group": 4,
"booking_window_days": 7,
"cancellation_hours": 12
}
]
}
Pricing Configuration
{
"pricing": {
"base_rates": {
"weekday": {
"member": 45.00,
"guest": 75.00,
"junior": 25.00
},
"weekend": {
"member": 55.00,
"guest": 85.00,
"junior": 30.00
}
},
"dynamic_pricing": {
"enabled": true,
"peak_hours": {
"start": "08:00",
"end": "16:00",
"multiplier": 1.2
},
"weather_adjustment": {
"enabled": true,
"rain_discount": 0.1,
"sunny_premium": 0.05
}
}
}
}
👥 User Management Configuration
Role-Based Access Control
Role Definitions
{
"roles": {
"system_admin": {
"permissions": [
"system:read",
"system:write",
"system:delete",
"user:read",
"user:write",
"user:delete",
"club:read",
"club:write",
"club:delete"
],
"description": "Full system administration access"
},
"club_admin": {
"permissions": [
"club:read",
"club:write",
"member:read",
"member:write",
"booking:read",
"booking:write",
"financial:read",
"financial:write"
],
"description": "Club administration access"
},
"staff": {
"permissions": [
"member:read",
"booking:read",
"booking:write",
"pos:read",
"pos:write"
],
"description": "Staff operational access"
},
"member": {
"permissions": [
"profile:read",
"profile:write",
"booking:read",
"booking:write"
],
"description": "Member access"
}
}
}
Permission Matrix
{
"permissions": {
"system": {
"read": "View system configuration",
"write": "Modify system configuration",
"delete": "Delete system data"
},
"user": {
"read": "View user information",
"write": "Create and modify users",
"delete": "Delete users"
},
"club": {
"read": "View club information",
"write": "Modify club settings",
"delete": "Delete club data"
},
"member": {
"read": "View member information",
"write": "Create and modify members",
"delete": "Delete members"
},
"booking": {
"read": "View bookings",
"write": "Create and modify bookings",
"delete": "Cancel bookings"
},
"financial": {
"read": "View financial data",
"write": "Process payments",
"delete": "Void transactions"
},
"pos": {
"read": "View POS data",
"write": "Process sales",
"delete": "Void sales"
}
}
}
User Settings
Default User Preferences
{
"user_preferences": {
"notifications": {
"email": {
"booking_confirmations": true,
"booking_reminders": true,
"payment_receipts": true,
"newsletters": false
},
"sms": {
"booking_reminders": true,
"urgent_notifications": true
},
"push": {
"booking_updates": true,
"promotions": false
}
},
"privacy": {
"profile_visibility": "members_only",
"contact_visibility": "staff_only",
"activity_sharing": false
},
"display": {
"language": "en",
"timezone": "Europe/London",
"date_format": "DD/MM/YYYY",
"time_format": "24h"
}
}
}
🔒 Security Configuration
Authentication Settings
Password Policy
{
"password_policy": {
"min_length": 8,
"require_uppercase": true,
"require_lowercase": true,
"require_numbers": true,
"require_special_chars": true,
"max_age_days": 90,
"prevent_reuse": 5,
"lockout_attempts": 5,
"lockout_duration_minutes": 30
}
}
Multi-Factor Authentication
{
"mfa": {
"enabled": true,
"methods": ["totp", "sms", "email"],
"required_for_roles": ["system_admin", "club_admin"],
"backup_codes": {
"enabled": true,
"count": 10
},
"remember_device": {
"enabled": true,
"duration_days": 30
}
}
}
Data Protection
Encryption Settings
{
"encryption": {
"algorithm": "aes-256-gcm",
"key_rotation_days": 90,
"sensitive_fields": [
"password",
"credit_card_number",
"bank_account_number",
"national_insurance_number"
],
"at_rest": {
"enabled": true,
"algorithm": "aes-256-gcm"
},
"in_transit": {
"enabled": true,
"protocol": "TLS 1.3"
}
}
}
Data Retention
{
"data_retention": {
"member_data": {
"retention_period": "7_years",
"anonymisation_after": "3_years"
},
"booking_data": {
"retention_period": "3_years",
"anonymisation_after": "1_year"
},
"payment_data": {
"retention_period": "7_years",
"anonymisation_after": "5_years"
},
"audit_logs": {
"retention_period": "10_years",
"anonymisation_after": "7_years"
}
}
}
📧 Communication Configuration
Email Settings
SMTP Configuration
{
"email": {
"smtp": {
"host": "smtp.gmail.com",
"port": 587,
"secure": false,
"auth": {
"user": "noreply@readygolf.com",
"pass": "app_password_here"
}
},
"templates": {
"welcome": "welcome-email-template",
"booking_confirmation": "booking-confirmation-template",
"payment_receipt": "payment-receipt-template",
"password_reset": "password-reset-template"
},
"defaults": {
"from": "ReadyGolf <noreply@readygolf.com>",
"reply_to": "support@readygolf.com"
}
}
}
SMS Configuration
{
"sms": {
"provider": "twilio",
"config": {
"account_sid": "your_account_sid",
"auth_token": "your_auth_token",
"from_number": "+44123456789"
},
"templates": {
"booking_reminder": "Hi {name}, your tee time is tomorrow at {time}. Course: {course}",
"urgent_notification": "URGENT: {message}",
"verification_code": "Your ReadyGolf verification code is: {code}"
}
}
}
💳 Payment Configuration
Payment Methods
Stripe Configuration
{
"stripe": {
"publishable_key": "pk_test_...",
"secret_key": "sk_test_...",
"webhook_secret": "whsec_...",
"currency": "gbp",
"payment_methods": [
"card",
"bank_transfer",
"apple_pay",
"google_pay"
],
"automatic_payment_methods": {
"enabled": true,
"allow_redirects": "always"
}
}
}
PayPal Configuration
{
"paypal": {
"client_id": "your_client_id",
"client_secret": "your_client_secret",
"environment": "sandbox",
"currency": "GBP",
"intent": "CAPTURE",
"application_context": {
"brand_name": "ReadyGolf",
"landing_page": "LOGIN",
"user_action": "PAY_NOW"
}
}
}
📊 Analytics Configuration
Tracking Settings
Google Analytics
{
"analytics": {
"google_analytics": {
"measurement_id": "G-XXXXXXXXXX",
"api_secret": "your_api_secret",
"events": {
"booking_completed": true,
"member_registered": true,
"payment_completed": true,
"lesson_booked": true
}
},
"internal_analytics": {
"enabled": true,
"retention_days": 90,
"anonymise_after_days": 30
}
}
}
Reporting Configuration
{
"reporting": {
"scheduled_reports": {
"daily_summary": {
"enabled": true,
"recipients": ["admin@club.com"],
"time": "08:00"
},
"weekly_summary": {
"enabled": true,
"recipients": ["manager@club.com"],
"day": "monday",
"time": "09:00"
},
"monthly_summary": {
"enabled": true,
"recipients": ["director@club.com"],
"day": 1,
"time": "10:00"
}
},
"export_formats": ["pdf", "csv", "excel"],
"data_retention": "2_years"
}
}
🔧 Advanced Configuration
Performance Settings
Caching Configuration
{
"caching": {
"redis": {
"enabled": true,
"url": "redis://localhost:6379",
"password": "redis_password",
"db": 0,
"key_prefix": "readygolf:"
},
"memory": {
"enabled": true,
"max_size": "100mb",
"ttl": 300
},
"strategies": {
"user_sessions": {
"ttl": 86400,
"strategy": "redis"
},
"course_data": {
"ttl": 3600,
"strategy": "memory"
},
"booking_cache": {
"ttl": 300,
"strategy": "redis"
}
}
}
}
Database Configuration
{
"database": {
"pool": {
"max": 20,
"min": 5,
"acquire": 30000,
"idle": 10000
},
"logging": {
"enabled": false,
"level": "error"
},
"migrations": {
"auto_run": true,
"backup_before_migration": true
}
}
}
Monitoring Configuration
Health Checks
{
"monitoring": {
"health_checks": {
"database": {
"enabled": true,
"interval": 30000
},
"redis": {
"enabled": true,
"interval": 30000
},
"external_apis": {
"enabled": true,
"interval": 60000
}
},
"alerts": {
"email": {
"enabled": true,
"recipients": ["admin@readygolf.com"]
},
"slack": {
"enabled": true,
"webhook_url": "https://hooks.slack.com/..."
}
}
}
}
Need help with specific configuration? Check out our deployment guide for production setup instructions.