Jiffoo Docs
Getting Started

Configuration

Configure Jiffoo Mall environment

Configuration

Environment Variables

Backend (.env)

# Database
DATABASE_URL="postgresql://user:password@localhost:5432/jiffoo_mall"

# JWT
JWT_SECRET="your-super-secret-jwt-key"
JWT_EXPIRES_IN="7d"

# Redis
REDIS_URL="redis://localhost:6379"

# Email (optional)
SMTP_HOST="smtp.ethereal.email"
SMTP_PORT=587
SMTP_USER="[email protected]"
SMTP_PASS="your-password"

# Server
PORT=3001
NODE_ENV="development"

# Stripe (optional)
STRIPE_SECRET_KEY="sk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."

# Resend (optional)
RESEND_API_KEY="re_..."

Frontend (.env.local)

NEXT_PUBLIC_API_URL="http://localhost:3001"

Service Ports

ServicePortDescription
Shop3000Customer storefront
API3001Backend API
Super Admin3002Platform admin
Admin3003Tenant admin
Agent3004Agent portal
Docs3006Documentation

Database Setup

Development (SQLite)

DATABASE_URL="file:./dev.db"

Production (PostgreSQL)

DATABASE_URL="postgresql://user:password@host:5432/database"

Redis Configuration

Redis is optional but recommended for:

  • Session caching
  • Cart data
  • Rate limiting
REDIS_URL="redis://localhost:6379"
# or with password
REDIS_URL="redis://:password@localhost:6379"

Plugin Configuration

Plugins are configured through the Admin dashboard or via environment variables:

Stripe Payment Plugin

STRIPE_SECRET_KEY="sk_..."
STRIPE_WEBHOOK_SECRET="whsec_..."

Resend Email Plugin

RESEND_API_KEY="re_..."

Google OAuth Plugin

GOOGLE_CLIENT_ID="..."
GOOGLE_CLIENT_SECRET="..."

On this page