Skip to content

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/0

Security & 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=900

AWS Services

bash
AWS_REGION=ap-northeast-1
AWS_SES_SENDER=noreply@mpac-cloud.com
AWS_SNS_SENDER_ID=MPAC

Service 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/0

Payment Gateway Integration

bash
PGW_API_URL=https://api.pgw.mpac-cloud.com
PGW_CLIENT_ID=mpac-smarttab
PGW_CLIENT_SECRET=secret_key

Application Settings

bash
LOG_LEVEL=info

Service Configuration

  • PGW_API_URL: Payment gateway API endpoint
  • PGW_CLIENT_ID: Client ID for PGW authentication
  • PGW_CLIENT_SECRET: Client secret for PGW authentication
  • LOG_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/0

Payment Provider Integration

bash
PROVIDER_PAYPAY_API_URL=https://api.paypay.ne.jp

Rate Limiting

bash
RATE_LIMIT_PER_MERCHANT=1000
RATE_LIMIT_GLOBAL=10000

Application Settings

bash
LOG_LEVEL=info

Service 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 endpoint
  • LOG_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/database

Redis URLs

Standard Redis connection format:

redis://host:port/database_number

Security 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

EnvironmentConfiguration Source
Development.env files (local)
StagingAWS Parameter Store
ProductionAWS Secrets Manager

Configuration Validation

All services validate required configuration on startup:

  1. Check for required environment variables
  2. Validate format and values
  3. Test connectivity to external services
  4. Log configuration summary (without secrets)
  5. Fail fast if configuration is invalid

See Also

Related References:

Technical Documentation:

Deployment:


Navigation: ↑ Back to Index | ← Status Codes | Next: Support →

MPAC — MP-Solution Advanced Cloud Service