Skip to content

SwiftPay is a cutting-edge Point-of-Sale (POS) system designed to streamline transactions for businesses of all sizes. With an intuitive interface, real-time reporting, and secure payment processing, SwiftPay ensures seamless sales management. Features include inventory tracking, customer management, QR code generation, and integration with various

License

Notifications You must be signed in to change notification settings

steve-ongera/Swift_Pay_POS

Repository files navigation

Swift Pay (POS) System

SwiftPay is a cutting-edge Point-of-Sale (POS) system designed to streamline transactions for businesses of all sizes. With an intuitive interface, real-time reporting, and secure payment processing, SwiftPay ensures seamless sales management. Features include inventory tracking, customer management, QR code generation, and integration with various payment platforms. SwiftPay is the ultimate solution for efficient, fast, and reliable point-of-sale operations.

License Python Django

πŸš€ Features

Sales Management

  • Quick Sale Processing: Intuitive interface for rapid transaction handling
  • Real-time Stock Updates: Automatic inventory adjustment after each sale
  • Multiple Payment Methods: Support for cash, card, and mobile payments
  • Receipt Generation: Automatic PDF receipt generation
  • Sale History: Complete transaction history with detailed views
  • Returns/Refunds: Process returns and refunds with inventory updates

Inventory Management

  • Product Management: Add, edit, and delete products
  • Stock Tracking: Real-time inventory levels
  • Low Stock Alerts: Automatic notifications for low stock items
  • Barcode Support: Generate and scan product barcodes
  • Categories: Organize products by categories
  • Bulk Import/Export: CSV import/export for product data

Customer Management

  • Customer Database: Store and manage customer information
  • Purchase History: Track customer purchase history
  • Loyalty Points: Customer loyalty program support
  • Customer Categories: Group customers by type
  • Credit Limits: Set and manage customer credit limits

Reporting

  • Sales Reports: Daily, weekly, monthly, and custom period reports
  • Inventory Reports: Stock levels, movement, and valuation
  • Financial Reports: Revenue, profit margins, and tax reports
  • Customer Reports: Customer purchase analysis
  • Export Options: Export reports to PDF, Excel, or CSV

Security

  • User Roles: Admin, Manager, Cashier with different permissions
  • Audit Trail: Track all system activities
  • Secure Authentication: Role-based access control
  • Data Backup: Automated backup systems

πŸ’» Tech Stack

  • Backend: Django 4.2+
  • Frontend: HTML5, CSS3, JavaScript
  • Database: PostgreSQL
  • CSS Framework: Bootstrap 5
  • JavaScript Libraries:
    • jQuery for AJAX operations
    • DataTables for dynamic tables
    • Chart.js for reports visualization
  • PDF Generation: xhtml2pdf
  • Barcode: python-barcode
  • Testing: pytest

πŸ“‹ Prerequisites

  • Python 3.8 or higher
  • PostgreSQL 12 or higher
  • pip (Python package manager)
  • Virtual environment (recommended)

πŸ”§ Installation

  1. Clone the repository
git clone https://github.com/steve-ongera/django-pos.git
cd django-pos
  1. Create and activate virtual environment
# Windows
python -m venv venv
venv\Scripts\activate

# Linux/Mac
python3 -m venv venv
source venv/bin/activate
  1. Install dependencies
pip install -r requirements.txt
  1. Configure environment variables
# Create .env file in project root
cp .env.example .env

# Update the following variables in .env
DEBUG=True
SECRET_KEY=your_secret_key
DATABASE_URL=postgresql://user:password@localhost:5432/pos_db
  1. Setup database
python manage.py migrate
python manage.py createsuperuser
python manage.py loaddata initial_data.json
  1. Run development server
python manage.py runserver

Visit http://localhost:8000 and log in with the superuser credentials.

πŸ“ Project Structure

django-pos/
β”œβ”€β”€ manage.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ .env
β”œβ”€β”€ pos/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ settings.py
β”‚   β”œβ”€β”€ urls.py
β”‚   └── wsgi.py
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ sales/
β”‚   β”œβ”€β”€ products/
β”‚   β”œβ”€β”€ customers/
β”‚   β”œβ”€β”€ users/
β”‚   └── reports/
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ css/
β”‚   β”œβ”€β”€ js/
β”‚   └── images/
└── templates/
    β”œβ”€β”€ base.html
    └── components/

🚦 Testing

Run the test suite:

# Run all tests
pytest

# Run specific test file
pytest apps/sales/tests.py

# Run with coverage report
pytest --cov=apps

πŸ“ Usage Guidelines

Setting Up Products

  1. Log in as admin
  2. Go to Products > Add Product
  3. Fill in required details:
    • Product name
    • SKU
    • Price
    • Category
    • Initial stock
  4. Save the product

Processing Sales

  1. Click "New Sale" on the dashboard
  2. Add products by:
    • Scanning barcode
    • Searching product name
    • Browsing categories
  3. Adjust quantities if needed
  4. Add customer details (optional)
  5. Select payment method
  6. Complete sale and print receipt

Generating Reports

  1. Go to Reports section
  2. Select report type
  3. Choose date range
  4. Generate report
  5. Export in desired format

πŸ” Security Considerations

  • Regular password updates recommended
  • Session timeout after 30 minutes
  • IP-based login restrictions available
  • Failed login attempt monitoring
  • Regular security audit logging

πŸ”„ Backup and Recovery

Automated Backups

  • Daily database backups at 12 AM
  • Stored in secure cloud storage
  • Retention period: 30 days

Manual Backup

python manage.py dbbackup

Restore from Backup

python manage.py dbrestore

πŸ›  Troubleshooting

Common Issues

  1. Database Connection Issues

    • Check PostgreSQL service status
    • Verify database credentials in .env
    • Ensure database exists
  2. PDF Generation Errors

    • Check wkhtmltopdf installation
    • Verify template syntax
    • Check file permissions
  3. Performance Issues

    • Enable database query logging
    • Check index usage
    • Monitor server resources

πŸ“ˆ Roadmap

Upcoming Features

  • Mobile app integration
  • Multi-store support
  • Advanced analytics dashboard
  • Supplier management
  • Automated purchase orders

🀝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE.md file for details.

πŸ‘₯ Support

For support and queries:

πŸ™ Acknowledgments

  • Django community
  • Bootstrap team
  • All contributors

Made with ❀️ by steve ongera | 0112284093

About

SwiftPay is a cutting-edge Point-of-Sale (POS) system designed to streamline transactions for businesses of all sizes. With an intuitive interface, real-time reporting, and secure payment processing, SwiftPay ensures seamless sales management. Features include inventory tracking, customer management, QR code generation, and integration with various

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published