Skip to content

A modern, feature-rich Point of Sale system designed for retail and hospitality businesses with real-time synchronization, customer display, and intuitive interface.

License

Notifications You must be signed in to change notification settings

paulaxisabel/synkpos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SynkPOS

A modern, feature-rich Point of Sale system designed for retail and hospitality businesses with real-time synchronization, customer display, and intuitive interface.

PHP Version MySQL License

🎯 What Does This System Do?

SynkPOS helps businesses manage sales transactions efficiently:

  • Point of Sale - Fast product selection and checkout process
  • Customer Display - Real-time order display with advertisement slideshow
  • Payment Processing - Accept multiple payment methods (cash, cards, e-wallets)
  • Discount Management - Apply line-item or total discounts with senior/PWD support
  • Shift Management - Track cashier shifts with opening/closing reports
  • Inventory Tracking - Real-time stock updates with every sale
  • Sales Analytics - View daily, weekly, and monthly sales reports
  • Receipt Printing - BIR-compliant receipts with detailed transaction info

πŸš€ Quick Start

What You Need

  • Web server (XAMPP, WAMP, or MAMP)
  • PHP 5.6 or newer (works with 7.x and 8.x)
  • MySQL 5.7 or MariaDB 10.3+

Installation Steps

1. Download and Extract

git clone https://github.com/paulaxisabel/synkpos.git
cd synkpos

Or extract to your web server folder:

  • XAMPP: C:/xampp/htdocs/synkpos/
  • WAMP: C:/wamp64/www/synkpos/
  • Linux: /var/www/html/synkpos/

2. Create Database

  • Open phpMyAdmin at http://localhost/phpmyadmin
  • Create database named pos_database
  • Import pos_database.sql

3. Configure Edit config.php:

$db_host = 'localhost';
$db_user = 'root';
$db_pass = '';
$db_name = 'pos_database';

4. Create Upload Directories Create the following folders for customer display images:

synkpos/
└── uploads/
    └── ads/

5. Access

  • Main POS: http://localhost/synkpos/
  • Customer Display (Cashier): http://localhost/synkpos/cashier/customer_display.php
  • Customer Display (Backoffice): http://localhost/synkpos/backoffice/customer_display.php
  • Login with default credentials below

πŸ” Default Login Credentials

User Type Username Password
Super Admin superadmin password
Admin admin1 password
Manager manager1 password
Cashier cashier1 password

⚠️ Important: Change these passwords immediately after first login!

πŸ‘₯ User Roles

Super Admin

Highest level access: all admin privileges plus system-critical configurations, database management, and role permissions control.

Admin

Full system control: manage users, configure settings, view all reports, manage products/categories/discounts/payments, configure customer display.

Manager

Business operations: view sales reports, manage products, configure discounts, oversee daily operations, manage customer display content.

Cashier

Sales operations: process transactions, open/close shifts, generate X/Z readings, handle customer payments, view customer display.

πŸ“‹ Key Features

1. Cashier Interface

Fast product selection, order management, discount application, multi-payment support, and real-time calculations with customer display integration.

2. Customer Display System

Dual-screen experience with advertisement slideshow and real-time order display. Upload images to uploads/ads/, open on second screen, and enjoy automatic sync with smooth transitions.

3. Payment System

Support for cash, cards (Visa, Mastercard, Amex), e-wallets (GCash, PayMaya), and third-party payments (FoodPanda, GrabFood) with visual feedback and automatic change calculation.

4. Shift Management

Open/close shifts with cash declaration, X-reading (mid-shift), and Z-reading (end-of-day) reports for complete cashier accountability.

5. Discount Management

Line-item and total discounts including senior/PWD support with VAT exemption, ID capture, and custom percentage or fixed amount discounts.

6. Back Office

Dashboard with sales metrics, product and category management, payment configuration, user management, customer display settings, and activity logs.

7. Receipt System

BIR-compliant receipts with complete transaction details, discounts, VAT breakdown, payment methods, and store information.

πŸ”§ Troubleshooting

Database connection failed

  • Check MySQL is running in XAMPP/WAMP control panel
  • Verify credentials in config.php
  • Ensure pos_database was created and imported

Customer display not updating

  • Verify get_current_order.php is accessible
  • Check browser console for JavaScript errors
  • Ensure shift is open in cashier interface
  • Clear browser cache and reload customer display

Advertisement images not showing

  • Verify uploads/ads/ folder exists and has proper permissions
  • Check images are in supported formats (JPG, PNG, GIF)
  • Ensure file names don't contain special characters
  • Verify web server can read the uploads directory

Payment types not loading

  • Check browser console for JavaScript errors
  • Verify payment_types table has data
  • Clear browser cache and reload

Can't open shift

  • Verify user has 'cashier' role
  • Check no active shift exists for that user
  • Ensure shifts table is accessible

Transaction fails

  • Ensure shift is open before processing
  • Check product stock availability
  • Verify all required fields are filled

Receipt won't print

  • Check browser pop-up blocker settings
  • Enable pop-ups for localhost
  • Try different browser if issue persists

πŸ“ Folder Structure

synkpos/
β”œβ”€β”€ backoffice/                # Management interface
β”‚   β”œβ”€β”€ activity_logs.php      # System activity tracking
β”‚   β”œβ”€β”€ categories.php         # Category management
β”‚   β”œβ”€β”€ customer_display.php   # Customer display settings & preview
β”‚   β”œβ”€β”€ dashboard.php          # Main dashboard
β”‚   β”œβ”€β”€ discounts.php          # Discount configuration
β”‚   β”œβ”€β”€ index.php              # Main backoffice layout
β”‚   β”œβ”€β”€ inventory_report.php   # Stock reports
β”‚   β”œβ”€β”€ payment_types.php      # Payment method config
β”‚   β”œβ”€β”€ products.php           # Product management
β”‚   β”œβ”€β”€ reset_data.php         # Data reset utility
β”‚   β”œβ”€β”€ roles.php              # Role management
β”‚   β”œβ”€β”€ sales_report.php       # Sales analytics
β”‚   β”œβ”€β”€ settings.php           # System settings
β”‚   └── users.php              # User management
β”œβ”€β”€ cashier/                   # Cashier interface
β”‚   β”œβ”€β”€ check_images.php       # Check for new ad images
β”‚   β”œβ”€β”€ check_shift.php        # Verify active shift
β”‚   β”œβ”€β”€ customer_display.php   # Customer-facing display
β”‚   β”œβ”€β”€ get_current_order.php  # Real-time order data API
β”‚   β”œβ”€β”€ get_payment_types.php  # Payment methods API
β”‚   β”œβ”€β”€ get_products.php       # Products API
β”‚   β”œβ”€β”€ index.php              # Main POS screen
β”‚   β”œβ”€β”€ open_shift.php         # Shift opening
β”‚   β”œβ”€β”€ print_receipt.php      # Receipt generation
β”‚   β”œβ”€β”€ process_transaction.php # Transaction processing
β”‚   β”œβ”€β”€ search_products.php    # Product search API
β”‚   β”œβ”€β”€ update_customer_display.php # Update display data
β”‚   β”œβ”€β”€ x_reading.php          # X-reading report
β”‚   └── z_reading.php          # Z-reading report
β”œβ”€β”€ includes/                  # Helper functions
β”‚   β”œβ”€β”€ rbac.php               # Access control
β”‚   └── shift_helper.php       # Shift functions
β”œβ”€β”€ uploads/                   # User uploads
β”‚   └── ads/                   # Advertisement images
β”œβ”€β”€ config.php                 # Database configuration
β”œβ”€β”€ login.php                  # Authentication
└── pos_database.sql           # Database schema

πŸ” Security Features

  • Password Hashing - Bcrypt encryption for all passwords
  • SQL Injection Prevention - Prepared statements throughout
  • Session Management - Secure session handling with timeout
  • Role-Based Access - Strict permission controls
  • Transaction Integrity - Database transactions for data consistency
  • Input Validation - Server and client-side validation
  • File Upload Security - Restricted file types and directory access

πŸ“ For Developers

Tech Stack

  • Backend: Pure PHP 5.6+ (compatible with 7.x and 8.x), MySQL
  • Frontend: HTML5, CSS3, JavaScript (Vanilla)
  • UI Framework: Custom responsive design
  • Icons: Unicode symbols and custom CSS
  • Real-time Updates: AJAX polling for customer display

Database Schema

Key tables:

  • users - Authentication and roles
  • shifts - Cashier shift tracking
  • transactions - Sales records
  • transaction_items - Line items
  • transaction_discounts - Applied discounts
  • payments - Payment details
  • products - Product catalog
  • categories - Category hierarchy
  • discount_types - Discount configurations
  • payment_types - Payment method settings
  • store_settings - Store configuration and display settings

Customer Display Architecture

Real-time Sync Flow:

  1. Cashier adds item β†’ Updates session cart
  2. update_customer_display.php called via AJAX
  3. Customer display polls get_current_order.php every second
  4. Display updates with smooth animations
  5. Full-screen mode when cart is empty

Advertisement System:

  • Images stored in uploads/ads/
  • Auto-scanned on page load
  • 5-second rotation interval
  • check_images.php monitors for new uploads
  • Page auto-refreshes when images change

Adding Features

1. Add a New Payment Method

INSERT INTO payment_types (code, name, parent_id, sort_order, status) 
VALUES ('NEWMETHOD', 'New Method', NULL, 5, 'active');

2. Create a New Discount Type

INSERT INTO discount_types (name, type, value, requires_vat_exempt, status) 
VALUES ('Holiday Sale', 'percentage', 15, 0, 'active');

3. Add Product Category

INSERT INTO categories (name, parent_id, status) 
VALUES ('Beverages', NULL, 'active');

4. Upload Advertisement Images

  • Place JPG, PNG, or GIF files in uploads/ads/
  • Customer display auto-detects within 30 seconds
  • No restart required

API Endpoints

  • get_products.php - Fetch products by category
  • search_products.php - Search products by name
  • get_payment_types.php - Load payment methods
  • process_transaction.php - Process sales transaction
  • check_shift.php - Verify active shift
  • get_current_order.php - Real-time cart data for customer display
  • update_customer_display.php - Trigger display update
  • check_images.php - Monitor advertisement images

Future Enhancements

  • πŸ“§ Email receipts to customers
  • πŸ“± Mobile cashier app
  • πŸ”„ Cloud sync and backup
  • πŸ“Š Advanced analytics and forecasting
  • πŸͺ Multi-branch support
  • πŸ“¦ Inventory reorder alerts
  • 🎁 Customer loyalty program
  • πŸ”— Third-party integrations (accounting software)
  • 🎬 Video advertisement support for customer display
  • πŸ“Ί Multi-display management
  • 🎨 Custom display themes and layouts

🀝 Contributing

We welcome contributions! Here's how you can help:

How to Contribute

  1. Fork the Repository

    git clone https://github.com/paulaxisabel/synkpos.git
    cd synkpos
  2. Create a Feature Branch

    git checkout -b feature/AmazingFeature
  3. Make Your Changes

    • Follow existing code style
    • Test thoroughly with all user roles
    • Add comments for complex logic
    • Test customer display functionality
  4. Commit Your Changes

    git add .
    git commit -m "Add: Brief description of changes"
  5. Push to Your Fork

    git push origin feature/AmazingFeature
  6. Create a Pull Request

    • Go to original repository
    • Click "New Pull Request"
    • Describe changes clearly

Contribution Guidelines

  • Write clean, readable code
  • Follow PHP PSR standards
  • Test on different screen sizes
  • Update documentation for new features
  • One feature per pull request
  • Include screenshots for UI changes
  • Test customer display on actual dual-screen setup

Report Bugs

Found a bug? Create an issue with:

  • Clear description of the problem
  • Steps to reproduce
  • Expected vs actual behavior
  • Screenshots or error messages
  • PHP/MySQL versions
  • Browser and screen configuration (for display issues)

Suggest Features

Have an idea? Open an issue with "enhancement" label and describe your feature request.

πŸ’¬ Support

πŸ“„ License

MIT License - Free to use, modify, and distribute for personal and commercial projects.

See LICENSE file for details.

πŸŽ‰ Credits

Created by: Paula Isabel Signo (@paulaxisabel)

Built with: Pure PHP, MySQL, and lots of πŸͺ

Special Features: Real-time customer display with advertisement slideshow


SynkPOS - Stay in Synk with Your Business πŸš€

Made with ❀️ by paula

About

A modern, feature-rich Point of Sale system designed for retail and hospitality businesses with real-time synchronization, customer display, and intuitive interface.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages