System Requirements
Before installing Litekart, ensure your system meets the minimum requirements for optimal performance.
Minimum Requirements
Operating System
- Linux: Ubuntu 18.04+ or CentOS 7+
- macOS: 10.15+ (Catalina or later)
- Windows: Windows 10+ with WSL2
Runtime Environment
- Node.js: Version 18.0.0 or higher
- npm: Version 8.0.0 or higher (comes with Node.js)
- Yarn: Version 1.22.0 or higher (optional)
Database
- PostgreSQL: Version 13.0 or higher
- Redis: Version 6.0 or higher (for caching and sessions)
Hardware
- RAM: Minimum 2GB, Recommended 4GB+
- Storage: 5GB free space
- CPU: 1 core minimum, 2+ cores recommended
Recommended Production Setup
For production deployments, we recommend:
Server Specifications
- RAM: 8GB or higher
- CPU: 2+ cores
- Storage: SSD with 20GB+ free space
- Network: 100Mbps+ connection
Database Server
- PostgreSQL: Version 15+ on dedicated server
- Redis: Version 7+ with persistence enabled
- Connection pooling: PgBouncer or similar
Load Balancer
- Nginx or HAProxy for production deployments
- SSL/TLS termination at load balancer level
Development Environment Setup
Local Development
bash
# Check Node.js version
node --version
# Should output: v18.0.0 or higher
# Check npm version
npm --version
# Should output: 8.0.0 or higherDatabase Setup
bash
# Install PostgreSQL (Ubuntu/Debian)
sudo apt update
sudo apt install postgresql postgresql-contrib
# Install Redis (Ubuntu/Debian)
sudo apt install redis-server
# Start services
sudo systemctl start postgresql
sudo systemctl start redis-serverEnvironment Variables
Create a .env file in your project root:
env
# Database
DATABASE_URL=postgresql://username:password@localhost:5432/litekart
# Redis
REDIS_URL=redis://localhost:6379
# Application
NODE_ENV=development
PORT=3000
# Security
JWT_SECRET=your-super-secret-jwt-key
COOKIE_SECRET=your-cookie-secretDocker Requirements (Optional)
If using Docker for development:
- Docker: Version 20.10+
- Docker Compose: Version 2.0+
Docker Memory
- Allocate at least 4GB RAM to Docker
- Enable Docker Compose V2
Network Requirements
Inbound Ports
- 3000: Main application port
- 5432: PostgreSQL (if not using Docker)
- 6379: Redis (if not using Docker)
Outbound Connections
- Access to npm registry (registry.npmjs.org)
- Access to GitHub (for cloning repositories)
- Access to payment gateways and external APIs
Troubleshooting
Common Issues
Node.js Version Too Old
bash
# Install Node.js 18+ using Node Version Manager (nvm)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 18
nvm use 18PostgreSQL Connection Issues
bash
# Check if PostgreSQL is running
sudo systemctl status postgresql
# Create database user and database
sudo -u postgres psql
CREATE USER litekart_user WITH PASSWORD 'your_password';
CREATE DATABASE litekart OWNER litekart_user;
GRANT ALL PRIVILEGES ON DATABASE litekart TO litekart_user;Memory Issues
bash
# Check available memory
free -h
# Increase swap space if needed
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfileNext Steps
Once your environment is set up: