Configuration Reference
Part of: MPAC SmartPOS Cloud Platform - Product RequirementsVersion: 2.0 Last Updated: 2026-01-28
Overview
This document provides a comprehensive reference for environment variables and configuration settings used across all MPAC platform services. Configuration is managed through environment variables for flexibility across development, staging, and production environments.
svc-portal Configuration
Database & Cache
bash
DATABASE_URL=postgresql+asyncpg://user:pass@host:5432/mpac
REDIS_URL=redis://host:6379/0Security & Authentication
bash
JWT_SECRET_KEY=base64_encoded_key
MASTER_ENCRYPTION_KEY=base64_encoded_key
MFA_ENABLED=true
MFA_CODE_TTL=300
DEVICE_TOKEN_TTL=90
USER_TOKEN_TTL=900AWS Services
bash
AWS_REGION=ap-northeast-1
AWS_SES_SENDER=noreply@mpac-cloud.com
AWS_SNS_SENDER_ID=MPACService Configuration
MFA_CODE_TTL: MFA code expiration in seconds (default: 300)DEVICE_TOKEN_TTL: Device JWT expiration in seconds (default: 90)USER_TOKEN_TTL: User JWT expiration in seconds (default: 900)
svc-smarttab Configuration
Database & Cache
bash
DATABASE_URL=postgres://user:pass@host:5432/mpac
REDIS_URL=redis://host:6379/0Payment Gateway Integration
bash
PGW_API_URL=https://api.pgw.mpac-cloud.com
PGW_CLIENT_ID=mpac-smarttab
PGW_CLIENT_SECRET=secret_keyApplication Settings
bash
LOG_LEVEL=infoService Configuration
PGW_API_URL: Payment gateway API endpointPGW_CLIENT_ID: Client ID for PGW authenticationPGW_CLIENT_SECRET: Client secret for PGW authenticationLOG_LEVEL: Logging level (debug, info, warn, error)
mpac-pgw Configuration
Database & Cache
bash
DATABASE_URL=postgres://user:pass@host:5432/pgw
REDIS_URL=redis://host:6379/0Payment Provider Integration
bash
PROVIDER_PAYPAY_API_URL=https://api.paypay.ne.jpRate Limiting
bash
RATE_LIMIT_PER_MERCHANT=1000
RATE_LIMIT_GLOBAL=10000Application Settings
bash
LOG_LEVEL=infoService Configuration
RATE_LIMIT_PER_MERCHANT: Requests per minute per merchant (default: 1000)RATE_LIMIT_GLOBAL: Global requests per minute (default: 10000)PROVIDER_PAYPAY_API_URL: PayPay API endpointLOG_LEVEL: Logging level (debug, info, warn, error)
Common Configuration Patterns
Database URLs
All services use standard database connection strings:
PostgreSQL (asyncpg): postgresql+asyncpg://user:pass@host:port/database
PostgreSQL (sync): postgres://user:pass@host:port/databaseRedis URLs
Standard Redis connection format:
redis://host:port/database_numberSecurity Keys
All cryptographic keys should be:
- Base64-encoded
- At least 256 bits (32 bytes)
- Stored in AWS Secrets Manager (production)
- Never committed to version control
Environment-Specific Configuration
| Environment | Configuration Source |
|---|---|
| Development | .env files (local) |
| Staging | AWS Parameter Store |
| Production | AWS Secrets Manager |
Configuration Validation
All services validate required configuration on startup:
- Check for required environment variables
- Validate format and values
- Test connectivity to external services
- Log configuration summary (without secrets)
- Fail fast if configuration is invalid
See Also
Related References:
- Glossary - Configuration terminology
- Status Code Reference - Configuration error codes
- Support & Contact - Configuration support
Technical Documentation:
- Security Architecture - Key management
- Database Architecture - Database setup
- AWS Infrastructure - Cloud configuration
Deployment:
- Local Development Setup - Development configuration
- AWS Deployment Guide - Production configuration
- Environment Management - Configuration strategies
Navigation: ↑ Back to Index | ← Status Codes | Next: Support →