Skip to content

ENG-Qaarey/SmartPOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SmartPOS - Point of Sale System

A complete web-based Point of Sale (POS) application built with PHP and MySQL, designed for small-to-medium businesses to manage sales, products, inventory, and customers.

πŸš€ Features

πŸ” Authentication & User Management

  • Admin and Cashier Login: Role-based access control
  • Session-based Security: Secure session management
  • Password Hashing: Bcrypt encryption for user passwords
  • User Management: Admins can create, edit, and manage user accounts

πŸ›’ Sales Management

  • Invoice-style Interface: Professional sales interface
  • Auto Calculation: Automatic totals and change calculation
  • Product Selection: Easy product search and quantity selection
  • Discount Support: Apply discounts to sales
  • Payment Methods: Support for cash and card payments
  • Receipt Generation: Print-friendly sales receipts

πŸ“¦ Product & Inventory Management

  • Product CRUD: Add, edit, delete products
  • Category Management: Organize products by categories
  • Stock Management: Track inventory levels
  • Low Stock Alerts: Automatic notifications for low stock items
  • Stock Thresholds: Configurable low stock warnings

πŸ‘₯ Customer Management

  • Customer CRUD: Add, edit, delete customer information
  • Purchase History: View complete customer transaction history
  • Customer Analytics: Track customer spending patterns

πŸ“Š Reporting & Analytics

  • Sales Reports: Daily, weekly, monthly sales reports
  • Date Range Filtering: Customizable report periods
  • CSV Export: Export sales data to CSV format
  • Visual Charts: Interactive sales charts using Chart.js
  • Sales Analytics: Total sales, transactions, discounts, and averages

πŸ§‘β€πŸ’Ό User Roles

  • Admin: Full access to all features including reports and user management
  • Cashier: Limited access to sales, products, and customers

πŸ› οΈ Technology Stack

  • Backend: PHP 7.4+
  • Database: MySQL 5.7+
  • Frontend: HTML5, CSS3, JavaScript
  • UI Framework: Bootstrap 5.1.3
  • Icons: Font Awesome 6.0.0
  • Charts: Chart.js

πŸ“‹ Requirements

  • PHP 7.4 or higher
  • MySQL 5.7 or higher
  • Web server (Apache/Nginx)
  • Modern web browser

πŸš€ Installation

  1. Clone or Download the project to your web server directory
  2. Configure Database:
    • Create a MySQL database named smartpos
    • Update database credentials in config/database.php if needed
  3. Set Permissions:
    • Ensure web server has read/write permissions
  4. Access the Application:
    • Navigate to http://your-domain/smartpos/
    • Login with default admin credentials

πŸ”‘ Default Login

admin

  • Username: admin

  • Password: admin123

    create your Own Cashiers like on below | -------------------------------------------------- | Cashier1 | | - Username: Cashier | | - Password: 123456789 | | -------------------------------------------------- | Cashier2 | | - Username: abdi | | - Password: 1234567890 | | --------------------------------------------------

⚠️ Important: Change the default password after first login!

πŸ“ Project Structure

smartpos/
β”œβ”€β”€ config/
β”‚   └── database.php          # Database configuration
β”œβ”€β”€ includes/
β”‚   β”œβ”€β”€ functions.php         # Utility functions
β”‚   β”œβ”€β”€ header.php           # Header template
β”‚   └── footer.php           # Footer template
β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ dashboard.php        # Dashboard page
β”‚   β”œβ”€β”€ sales.php           # Sales management
β”‚   β”œβ”€β”€ products.php        # Product management
β”‚   β”œβ”€β”€ customers.php       # Customer management
β”‚   β”œβ”€β”€ reports.php         # Sales reports
β”‚   └── users.php           # User management
β”œβ”€β”€ index.php               # Main application entry
β”œβ”€β”€ login.php              # Login page
β”œβ”€β”€ logout.php             # Logout script
└── README.md              # This file

πŸ—„οΈ Database Schema

The application automatically creates the following tables:

  • users: User accounts and authentication
  • categories: Product categories
  • products: Product inventory
  • customers: Customer information
  • sales: Sales transactions
  • sale_items: Individual sale line items

🎯 Key Features Explained

Sales Process

  1. New Sale: Click "New Sale" from dashboard
  2. Add Products: Select products and quantities
  3. Apply Discounts: Optional discount application
  4. Complete Sale: Choose payment method and finalize
  5. Print Receipt: Generate and print sales receipt

Inventory Management

  • Add Products: Create new products with categories
  • Stock Tracking: Monitor inventory levels
  • Low Stock Alerts: Automatic warnings for low stock
  • Stock Updates: Automatic stock reduction on sales

Customer Management

  • Customer Profiles: Store customer information
  • Purchase History: Track all customer transactions
  • Customer Analytics: View spending patterns

Reporting

  • Sales Reports: Filter by date ranges
  • Export Data: Download reports as CSV
  • Visual Analytics: Interactive charts and graphs
  • Summary Statistics: Key performance indicators

πŸ”’ Security Features

  • Password Hashing: Bcrypt encryption
  • Session Management: Secure session handling
  • SQL Injection Prevention: Prepared statements
  • XSS Protection: Input sanitization
  • Role-based Access: Admin/Cashier permissions

🎨 User Interface

  • Responsive Design: Works on desktop and mobile
  • Modern UI: Clean, professional interface
  • Intuitive Navigation: Easy-to-use menu system
  • Real-time Updates: Dynamic calculations and updates

πŸ“ˆ Business Benefits

  • Streamlined Sales: Faster transaction processing
  • Inventory Control: Better stock management
  • Customer Insights: Track customer behavior
  • Financial Reporting: Comprehensive sales analytics
  • Multi-user Support: Multiple cashiers and admins

πŸ› οΈ Customization

The application is designed to be easily customizable:

  • Styling: Modify CSS in header.php
  • Features: Add new functionality to existing pages
  • Database: Extend database schema for additional features
  • Reports: Create custom report templates

πŸ› Troubleshooting

Common Issues

  1. Database Connection Error:

    • Check database credentials in config/database.php
    • Ensure MySQL service is running
  2. Permission Errors:

    • Ensure web server has read/write permissions
    • Check file ownership
  3. Login Issues:

    • Verify default credentials: admin/admin123
    • Check session configuration

Support

For issues or questions:

  1. Check the error logs
  2. Verify database connectivity
  3. Ensure all requirements are met

πŸ“ License

This project is open source and available under the MIT License.

🀝 Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.


SmartPOS - Empowering businesses with efficient point of sale management.

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published