# ============================================================================= # 🔐 Siro Project - Secure Environment Configuration # ============================================================================= # ⚠️ CRITICAL: NEVER commit this file to Git! # Add .env to .gitignore immediately # ============================================================================= # ============================================================================= # Database Configuration - MAIN DATABASE # ============================================================================= DB_HOST=localhost DB_PORT=3306 DB_NAME=siro_main DB_USER=siro_user DB_PASS= # ============================================================================= # Database Configuration - TRANSIT DATABASE (مواصلاتي — جامعات/مدارس/فنادق/شركات) # ============================================================================= # قاعدة بيانات معزولة تماماً عن main/ride/tracking — ممنوع أي JOIN بينها وبينهم، # الربط بينها وبين النظام الرئيسي عبر المعرّفات (passenger_id/driver_id) فقط. DB_TRANSIT_HOST=localhost DB_TRANSIT_PORT=3306 DB_TRANSIT_NAME=siroTransitDb DB_TRANSIT_USER=siroTransitUser DB_TRANSIT_PASS= # مفتاح تشفير الرقم الجامعي (32 byte) — منفصل عن ENC_KEY لمزيد من العزل TRANSIT_STUDENT_ID_KEY= # Origins مسموحة للوحة الويب (مشرف المؤسسة) TRANSIT_ADMIN_ORIGINS=https://transit.siromove.com,https://admin.siromove.com # رابط تفعيل السائق (deep link في تطبيق السائق) APP_DEEP_LINK_BASE=https://siromove.com/driver/transit-activate # ============================================================================= # Encryption Configuration - CRITICAL FOR SECURITY # ============================================================================= # 🔐 Generate 32-character hex key: openssl rand -hex 16 ENC_KEY= ENCRYPTION_KEY_PATH=/home/siro-api/env/.encryption_key # ============================================================================= # JWT Configuration # ============================================================================= JWT_SECRET= JWT_ALGORITHM=HS256 JWT_EXPIRY=3600 JWT_REFRESH_EXPIRY=86400 # ============================================================================= # Redis Configuration # ============================================================================= REDIS_HOST=localhost REDIS_PORT=6379 REDIS_AUTH= REDIS_DB=0 # ============================================================================= # Rate Limiter Configuration # ============================================================================= RATE_LIMIT_LOGIN_ATTEMPTS=5 RATE_LIMIT_LOGIN_WINDOW=300 RATE_LIMIT_API_REQUESTS=100 RATE_LIMIT_API_WINDOW=60 # ============================================================================= # Wallet Configuration - S2S API # ============================================================================= WALLET_API_URL=https://walletintaleq.intaleq.xyz/v2/main/ # 🔐 Generate HMAC secret: openssl rand -base64 32 WALLET_HMAC_SECRET= BACKEND_ID=siromove-backend-01 ALLOWED_BACKEND_IDS=siromove-backend-01,siromove-backend-02 # ============================================================================= # Socket/Location Server Configuration # ============================================================================= ALLOWED_SOCKET_URLS=https://location.siromove.com,https://socket.siromove.com SOCKET_API_TIMEOUT=10 SOCKET_INTERNAL_KEY= LOCATION_SERVER_URL=http://location.intaleq.xyz:2021 RIDE_SOCKET_URL=http://location.intaleq.xyz:3031 # ============================================================================= # CORS Configuration # ============================================================================= CORS_ALLOWED_ORIGINS=https://siromove.com,https://www.siromove.com CORS_ALLOWED_METHODS=GET,POST,PUT,DELETE,OPTIONS CORS_ALLOWED_HEADERS=Content-Type,Authorization # ============================================================================= # Logging Configuration # ============================================================================= LOG_LEVEL=info LOG_PATH=/var/log/siro-api/ SECURITY_LOG_PATH=/var/log/siro-api/security/ # ============================================================================= # Bot Configuration # ============================================================================= BOT_SECRET_KEY= FEMALE_GENDER_HASH= # ============================================================================= # Firebase Configuration # ============================================================================= FIREBASE_PROJECT_ID=siro-project FIREBASE_API_KEY= # ============================================================================= # Payment Gateway Configuration # ============================================================================= PAYMENT_GATEWAY_URL=https://api.paymentprovider.com PAYMENT_GATEWAY_KEY= PAYMENT_GATEWAY_SECRET= PAYMENT_WEBHOOK_SECRET= # Internal key used for server-to-server calls (Siro Backend → Wallet Server) PAYMENT_KEY= # ============================================================================= # Wallet Servers — Multi-Country (انطلق / Wallet Intaliq) # ============================================================================= # Jordan wallet server (walletintaleq.intaleq.xyz) WALLET_SERVER_JORDAN=https://walletintaleq.intaleq.xyz # Egypt wallet server WALLET_SERVER_EGYPT=https://wallet-egypt.siromove.com # Syria wallet server WALLET_SERVER_SYRIA=https://wallet-syria.siromove.com # Shared S2S secret key (must match wallet server's X-S2S-Api-Key config) S2S_SHARED_KEY= # ============================================================================= # Siro Commissions per Country # ============================================================================= # Set the commission percentage Siro takes from drivers in each country # (0.15 = 15%, 0.12 = 12%, 0.10 = 10%) SIRO_COMMISSION_JO=0.15 SIRO_COMMISSION_SY=0.12 SIRO_COMMISSION_EG=0.10 SIRO_COMMISSION_IQ=0.10 # ============================================================================= # SMS Configuration (for OTP) # ============================================================================= SMS_PROVIDER=twilio SMS_API_KEY= SMS_API_SECRET= # ============================================================================= # Email Configuration # ============================================================================= MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USER= MAIL_PASS= # ============================================================================= # Application Configuration # ============================================================================= APP_ENV=production APP_DEBUG=false APP_NAME=Siro APP_DOMAIN=api-syria.siromove.com APP_COUNTRY=Jordan APP_CURRENCY=JOD # ============================================================================= # Nabeh Integration (server-to-server API key) # Must match NABEH_API_KEY in Nabeh's .env # ============================================================================= NABEH_API_KEY= SECRET_KEY_HMAC= # ============================================================================= # Security Configuration - Fingerprint & Testers # ============================================================================= FP_PEPPER= ALLOWED_TESTER_EMAILS=driver_tester@siromove.com,passenger_tester@siromove.com # ============================================================================= # Gemini AI Configuration # ============================================================================= GEMINI_API_KEY= # ============================================================================= # Feature Flags # ============================================================================= FEATURE_MFA_ENABLED=true FEATURE_S2S_WALLET_ENABLED=true FEATURE_CERTIFICATE_PINNING=true # ============================================================================= # SECRETS - DO NOT EDIT OR COMMIT! # ============================================================================= # This file contains secrets. Keep it secure! # Permissions: chmod 600 .env # Owner: www-data (or your web server user)