Desktop Point of Sale application built with Electron and Node.js
- Can be used by multiple PCs on a network with one central database
- Secure authentication with role-based access control (RBAC)
- First-run setup wizard (no default credentials)
- Receipt printing with automatic retry logic
- Search for products by barcode
- Staff accounts with customizable permissions (Owner, Manager, Cashier)
- Products and categories management
- Basic stock management
- Open tabs (orders)
- Customer database
- Transaction history
- Filter transactions by till, cashier, or status
- Filter transactions by date range
- Support for SQLite, MySQL, and PostgreSQL databases
- Node.js LTS (v20 or higher)
- Windows 10/11 (primary support)
- Linux and macOS (experimental)
- Minimum 4GB RAM
- 500MB free disk space
# Clone the repository
git clone https://github.com/yourusername/Store-POS.git
cd Store-POS
# Install dependencies
npm installCopy the example environment file and configure it:
cp .env.example .envEdit .env file with your settings:
# Application Settings
APP_PORT=3000
NODE_ENV=development
# Database Configuration (choose one)
DB_TYPE=sqlite # Options: sqlite, mysql, postgres
SQLITE_FILE=./data/store.db # For SQLite only
# For MySQL or PostgreSQL:
# DB_TYPE=mysql
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_NAME=storepos
# DB_USER=store
# DB_PASSWORD=your_secure_password
# Security
JWT_SECRET=your_very_secure_random_string_at_least_32_characters
# Printer Configuration
PRINTER_NAME=Your_Printer_Name
PRINT_QUEUE_CONCURRENCY=1
PRINT_MAX_RETRY=3
PRINT_RETRY_DELAY_MS=1500# Run migrations to create database tables
npm run db:migrate
# Seed initial roles and permissions
npm run db:seed# Development mode
npm run electron
# The application will open automatically
# Follow the first-run setup wizard to create your owner accountWhen you launch the application for the first time:
- The setup wizard will automatically appear
- Enter your full name, email, and a secure password
- Password requirements:
- Minimum 10 characters
- Must contain uppercase and lowercase letters
- Must contain at least one number
- Click "Create Account" to initialize the system
- You'll be redirected to the login screen
- Log in with your new credentials
To use Store POS across multiple computers on a network:
Option A: MySQL (Recommended for networks)
# Install MySQL on your server computer
# Create a database:
CREATE DATABASE storepos;
CREATE USER 'storepos'@'%' IDENTIFIED BY 'secure_password';
GRANT ALL PRIVILEGES ON storepos.* TO 'storepos'@'%';
FLUSH PRIVILEGES;Option B: PostgreSQL
# Install PostgreSQL on your server computer
# Create a database:
CREATE DATABASE storepos;
CREATE USER storepos WITH PASSWORD 'secure_password';
GRANT ALL PRIVILEGES ON DATABASE storepos TO storepos;On each POS terminal, edit .env:
DB_TYPE=mysql
DB_HOST=192.168.1.100 # IP address of your database server
DB_PORT=3306
DB_NAME=storepos
DB_USER=storepos
DB_PASSWORD=secure_passwordOn the first terminal only:
npm run db:migrate
npm run db:seedOn all other terminals, just start the application:
npm run electron# Apply all pending migrations
npm run db:migrate
# Rollback the last migration
npm run db:rollback# Seed roles and permissions
npm run db:seedBackup:
# Stop the application first
# Then copy the database file
cp data/store.db data/backups/store_backup_$(date +%Y%m%d).dbRestore:
# Stop the application
# Copy backup file
cp data/backups/store_backup_20251018.db data/store.db
# Restart the applicationBackup:
mysqldump -u storepos -p storepos > backup_$(date +%Y%m%d).sqlRestore:
mysql -u storepos -p storepos < backup_20251018.sqlBackup:
pg_dump -U storepos storepos > backup_$(date +%Y%m%d).sqlRestore:
psql -U storepos storepos < backup_20251018.sqlnpm run dist:winThe installer will be created in the dist/ directory.
To create a release automatically:
- Create a version tag:
git tag v0.1.0
git push origin v0.1.0- GitHub Actions will automatically build and upload the MSI to Releases
# Run linter
npm run lint
# Auto-fix linting issues
npm run lint:fix
# Format code
npm run format
# Check formatting
npm run format:check# Run tests
npm test1. Printer Not Working
- Verify
PRINTER_NAMEin.envmatches your system printer name exactly - Check printer is online and has paper
- Test print using the printer settings page in the app
2. Port Already in Use
- Change
APP_PORTin.envto a different port (e.g., 3001) - Restart the application
3. Database Connection Failed
- Verify database credentials in
.env - Ensure database server is running
- Check firewall settings allow connections on database port
- For network setup, ensure server IP is accessible from terminal
4. Cannot Access on Network
- Ensure database server has network access enabled
- Configure MySQL/PostgreSQL to accept remote connections
- Check firewall rules on database server
- Use static IP addresses, not DHCP
5. Permission Denied Errors
- Ensure the application has write permissions to the
data/directory - Run database migrations as a user with appropriate permissions
- Change
JWT_SECRETto a secure random string in production - Use strong passwords for database users
- Never commit
.envfiles to version control - Keep all dependencies updated
- Restrict database access to authorized IPs only
- Regular backups of database
- Enable SSL/TLS for database connections in production
- Full system access
- Manage users and assign roles
- View and modify all settings
- Access all features
- View and manage products, categories, customers
- Create and view transactions
- Cannot manage users or system settings
- View products
- Create transactions (sales)
- View customers
- Limited access to reports
This project is licensed under the MIT License.
For issues and feature requests, please create an issue on GitHub.




