Skip to content

NehuenLian/lotus-pos-desktop

Repository files navigation

codecov

Python SQLAlchemy PySide6
Compatibility: Windows

Lotus POS: Point of Sale System

Lotus POS is a desktop application built for small to medium-sized businesses. It allows you to manage sales, inventory, pricing, and database configuration in a simple way.


Features:

  • Check stock.
  • Register sales.
  • Modify prices.
  • Offline-first (Works without an internet connection).

To learn more about how the app is built, you can consult the Architecture Decision Records (ADRs) in /docs/adr/.

Frontend screenshot

Lotus POS Frontend
The screenshot shows the app in Spanish, as requested by the client.


Installation

  1. Clone the repository:
git clone https://github.com/NehuenLian/lotus-pos-desktop
  1. Go to repository:
cd Lotus-POS-Desktop
  1. Create and activate a virtual environment:
  • On Linux:
    python -m venv venv
    source venv/bin/activate
  • On Windows:
    python -m venv venv
    venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Environment variables configuration:
    Set the database URL in a config.json file in url:

{ "database": { "url": "sqlite:///src/data_access/sample_database.db" } }

Test setup

For a quick test, the remote repository includes a sample database located at src/data_access/sample_database.db and a .CSV file with product data at src/sample_data/inventory.csv. To use this database, the config.json file already comes with this URL configured:

DB_URL="sqlite:///src/data_access/sample_database.db"

The barcodes of the products registered in the sample database can be found in src/sample_data/inventory.csv. These can be used to check stock, register sales, or modify prices.

Packing

To run the packaging command, pyinstaller must be installed:

  pip install pyinstaller
  • Basic command to package the app:
  pyinstaller --noconfirm --onedir --console --name "LotusPOS" `
  --icon "src/views/assets/app_icon.ico" `
  --add-data "src/views/assets;src/views/assets" `
  --collect-all "PySide6" `
  --hidden-import "sqlalchemy.sql.default_comparator" `
  --paths "src" `
  "main.py"
  • Then set the database URL for the application to connect to in settings.

How to use

  1. Run the app:
python main.py

Or open the .exe after packaging

  1. Navigate through sections using the sidebar:
  • Stock Consultation
  • Price Management
  • Sales Registration
  • Configuration
  1. Use product barcodes to search and interact with products: check stock, register sales, or modify prices.

Run tests and see coverage

  • All tests:

    pytest -v --cov
  • Unit tests:

    pytest tests/unit -v --cov
  • Integration tests:

    pytest tests/integration -v --cov

Architecture

.
├── .github/
├── docs/
├── images/
├── integration/
├── src/
│   ├── business_logic/
│   ├── controllers/
│   ├── data_access/
│   ├── logs/
│   ├── sample_data/
│   ├── utils/
│   ├── views/
│   └── exceptions.py
├── tests/
└── requirements.txt

License

This project is licensed under the MIT license. You are free to use, copy, modify, and distribute the software, always including the copyright notice and without any warranties.


Author: Nehuen Lián https://github.com/NehuenLian

About

Point of Sale desktop app for small-medium business.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages