Skip to content

mmizan85/ZenStore

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

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors