Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZenStore POS 🛍️

Professional Local-Server Retail Management System

A complete Point of Sale and inventory management system that runs on your local network. Access it from any device (desktop, mobile, tablet) connected to your Wi-Fi.


ZenStore POS Screenshot


🚀 Quick Start

1. Requirements

  • Python 3.9 or higher
  • pip (Python package manager)

2. Install & Setup

# Clone the repository or download the source code
git clone 

# Install dependencies
pip install -r requirements.txt

# Clone or extract the project folder
cd zenstore

# Run the setup script (installs all dependencies)
python setup.py

# Start the server
python run.py

3. Access the System

After starting, open your browser and go to:

Default login: admin / admin123


📸 Visual Showcase

Loging Page Home pagel
Loging page Home page
Inventory Page Settings pagel
Inventory page Settings page

✨ Features

📊 Dashboard

  • Welcome message with shop name and logo
  • Real-time sales, profit, and transaction stats
  • 30-day sales trend chart (Chart.js)
  • Revenue by category pie chart
  • Low stock alerts with progress indicators
  • Recent transactions list

🏪 Point of Sale (POS)

  • Visual product grid with images
  • Real-time search and category filtering
  • Shopping cart with quantity controls
  • Customer information capture
  • Discount & payment method support
  • Tax calculation
  • One-click checkout
  • Instant receipt generation (PDF + WhatsApp link)
  • Sales recording in database
  • Daily sales summary email (optional)

📦 Inventory Management

  • Add, edit, delete products (soft-delete)
  • Auto-image fetching (Google Search / Unsplash)
  • Category management
  • Stock quantity tracking
  • Low stock threshold alerts
  • Profit margin calculator
  • SKU/barcode support

🧾 Invoicing

  • Built-in PDF invoice generation (ReportLab)
  • Custom Word (.docx) template support (docxtpl)
  • Multiple template management
  • Direct invoice download from receipts
  • Customer details on invoices
  • Invoice numbering system
  • Invoice notes section

📱 WhatsApp Integration

  • Auto-generated WhatsApp link after each sale
  • Customizable message templates
  • Pre-filled customer phone number
  • One-click send via WhatsApp Web

☁️ Google Drive Backup

  • Manual one-click backup
  • Automatic daily backup at 2:00 AM
  • Organized in "ZenStore POS Backups" Drive folder
  • Retention policy: Keep last 30 backups, auto-delete older ones

📈 Reports & Analytics

  • All-time revenue and profit totals
  • Monthly revenue chart (12 months)
  • Top 10 best-selling products
  • CSV export (all time or date range)

⚙️ Settings Hub

  • Shop branding (name, logo, address, contact)
  • API key management (Google Search, Google Drive)
  • Feature toggles (on/off switches)
  • WhatsApp template customization
  • Database backup management
  • Admin password change
  • Data purge options
  • System logs viewer
  • User management (add/remove staff accounts)

🔧 Configuration

Google Image Search (Optional)

  1. Go to https://programmablesearchengine.google.com
  2. Create a Custom Search Engine
  3. Enable "Image search"
  4. Get your API key from Google Cloud Console
  5. Enter both in Settings → API & Integrations

Google Drive Backup (Optional)

  1. Go to https://console.cloud.google.com
  2. Create a project and enable the Drive API
  3. Create OAuth 2.0 credentials
  4. Get your Client ID, Client Secret, and Refresh Token
  5. Enter them in Settings → API & Integrations

Invoice Templates

Create a Word (.docx) file with these placeholders:

{{invoice_number}}    {{customer_name}}    {{customer_phone}}
{{date}}              {{time}}             {{total_amount}}
{{subtotal}}          {{tax_amount}}       {{discount_amount}}
{{payment_method}}    {{shop_name}}        {{shop_address}}
{{shop_phone}}        {{currency}}         {{notes}}

Upload in Invoices → Upload Template, then set as Active.


📁 Project Structure

zenstore/
├── run.py              # Server entry point
├── setup.py            # Installation script
├── requirements.txt    # Python dependencies
├── app/
│   ├── __init__.py     # App factory
│   ├── models.py       # Database models
│   ├── routes/         # Route blueprints
│   │   ├── auth.py
│   │   ├── dashboard.py
│   │   ├── inventory.py
│   │   ├── sales.py
│   │   ├── invoices.py
│   │   ├── settings.py
│   │   ├── reports.py
│   │   └── api.py
│   ├── services/       # Business logic
│   │   ├── image_service.py
│   │   ├── invoice_service.py
│   │   └── backup_service.py
│   ├── static/
│   │   ├── css/main.css
│   │   └── js/main.js
│   └── templates/      # HTML templates
└── instance/
    └── zenstore.db     # SQLite database

🌐 LAN Access

The server binds to 0.0.0.0:5000 automatically. Find your local IP with:

  • Windows: ipconfig (look for IPv4 Address)
  • Linux/Mac: ifconfig or ip addr

All devices on the same Wi-Fi can then access: http://YOUR_IP:5000


🔒 Security Notes

  • Change the default admin password immediately after first login
  • The system is designed for local network use only
  • Do not expose port 5000 to the internet
  • API keys are stored in the local SQLite database
  • Use strong, unique passwords for admin accounts
  • Regularly back up your data (Google Drive integration or manual)

📦 Dependencies

  • Flask 3.0 — Web framework
  • Flask-SQLAlchemy — Database ORM
  • Flask-Login — User authentication
  • SQLite — Local database
  • ReportLab — PDF generation
  • docxtpl — Word template rendering
  • APScheduler — Scheduled backups
  • google-api-python-client — Google Drive API
  • Pillow — Image processing
  • requests — HTTP client
  • python-dotenv — Environment variable management
  • Werkzeug — Security utilities
  • Chart.js — Frontend charts
  • Bootstrap 5 — Frontend styling
  • Font Awesome — Icons
  • jQuery — Frontend scripting
  • DataTables — Interactive tables
  • SweetAlert2 — Beautiful alerts

🛠️ Troubleshooting

Port already in use:

# Change port in run.py
app.run(host='0.0.0.0', port=5001)

Database reset: Delete instance/zenstore.db and restart. A fresh database will be created.

Image fetch not working: Configure Google Search API keys in Settings, or it will use Unsplash as fallback.


ZenStore POS — Built for local retail businesses Powered by Flask + SQLite + Chart.js

About

Professional Local-Server Retail Management System A complete Point of Sale and inventory management system that runs on your local network. Access it from any device (desktop, mobile, tablet) connected to your Wi-Fi.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages