Essential configuration settings for CognexiaAI ERP
Create a .env file in your project root with the following variables:
# Application Settings NODE_ENV=production APP_PORT=3000 APP_URL=https://your-domain.com # Database Configuration DB_HOST=localhost DB_PORT=5432 DB_NAME=cognexia_erp DB_USER=postgres DB_PASSWORD=your_secure_password # API Keys API_SECRET_KEY=your_secret_key_here JWT_SECRET=your_jwt_secret_here ENCRYPTION_KEY=your_encryption_key_here # Email Configuration SMTP_HOST=smtp.gmail.com SMTP_PORT=587 SMTP_USER=your@email.com SMTP_PASSWORD=your_email_password # Cloud Storage (AWS S3) AWS_REGION=us-east-1 AWS_ACCESS_KEY_ID=your_aws_key AWS_SECRET_ACCESS_KEY=your_aws_secret S3_BUCKET=cognexia-files # Redis (for caching) REDIS_HOST=localhost REDIS_PORT=6379 REDIS_PASSWORD=your_redis_password
# Create database createdb cognexia_erp # Run migrations npm run db:migrate # Seed initial data npm run db:seed
Note: Ensure PostgreSQL service is running before executing migrations.
Enable HTTPS for production environments:
# Generate SSL certificate openssl req -x509 -nodes -days 365 \ -newkey rsa:2048 \ -keyout ssl/private.key \ -out ssl/certificate.crt # Update configuration SSL_ENABLED=true SSL_KEY_PATH=./ssl/private.key SSL_CERT_PATH=./ssl/certificate.crt
Enable/disable specific modules in config/modules.json:
{
"crm": {
"enabled": true,
"features": ["contacts", "deals", "activities"]
},
"hr": {
"enabled": true,
"features": ["employees", "payroll", "attendance"]
},
"finance": {
"enabled": true,
"features": ["invoicing", "expenses", "reports"]
}
}DB_POOL_SIZE=20CACHE_TTL=3600MAX_FILE_SIZE=50MBREQUEST_TIMEOUT=30000