Skip to main content

Appendix

Environment Variable Reference

VariableTypeRequiredDescription
ENVstringYesEnvironment (DEVELOPMENT/PRODUCTION)
API_PORTnumberYesServer port (default: 3610)
BASE_DOMAINstringYesAPI base URL
DB_HOSTstringYesPostgreSQL host
DB_PORTnumberYesPostgreSQL port
DB_USERstringYesPostgreSQL username
DB_PASSWORDstringYesPostgreSQL password
DBstringYesPostgreSQL database name
MONGO_DBstringYesMongoDB connection string
REDIS_HOSTstringYesRedis host
REDIS_PORTnumberYesRedis port
REDIS_PASSWORDstringNoRedis password
JWT_SECRETstringYesJWT signing secret
XENDIT_SECRET_KEYstringYesXendit API secret key
XENDIT_CALLBACK_TOKENstringYesXendit webhook token
GOSEND_CLIENT_IDstringYesGoSend API client ID
GOSEND_KEYstringYesGoSend API key
GOSEND_ADDRESSstringYesGoSend API base URL
MINIO_ENDPOINTstringYesMinio server endpoint
MINIO_PORTnumberYesMinio server port
MINIO_ACCESS_KEYstringYesMinio access key
MINIO_SECRET_KEYstringYesMinio secret key
EMAIL_HOSTstringYesSMTP host
EMAIL_PORTnumberYesSMTP port
EMAIL_USERstringYesSMTP username
EMAIL_PASSWORDstringYesSMTP password

Database Schema Overview

Key PostgreSQL Tables

  • store: Store information and settings
  • user_info: User profiles and authentication
  • product: Product catalog
  • product_variant: Product variations (size, color, etc.)
  • store_order: Order records
  • store_order_details: Line items in orders
  • cart: Shopping cart items
  • address_list: Delivery addresses
  • balance_mutation: Financial transactions
  • affiliate_account: Affiliate user accounts
  • affiliate_commissions: Commission records
  • affiliate_invitations: Referral relationships
  • review: Product reviews
  • voucher: Discount codes
  • virtual_account: Payment virtual accounts
  • xendit_invoice: Payment invoices
  • bank_info: Bank account information
  • payout_record: Payout history

Key MongoDB Collections

  • store_chat: Chat messages
  • store_chat_room: Chat room metadata
  • affiliate_category: Affiliate product categories
  • affiliate_clicks: Click tracking for affiliate links
  • affiliate_links: Generated affiliate links
  • order_info_cached: Cached order data
  • shipping_info_cached: Cached shipping calculations
  • price_info_cached: Cached price calculations

API Response Status Codes

CodeMeaningUsage
200OKSuccessful request
201CreatedResource created successfully
400Bad RequestInvalid request parameters
401UnauthorizedAuthentication required
403ForbiddenInsufficient permissions
404Not FoundResource not found
422Unprocessable EntityValidation errors
500Internal Server ErrorServer error
503Service UnavailableService temporarily unavailable