POSAwesome is a Frappe application - a Point of Sale (POS) system built on the Frappe Framework. This is a full-stack web application with Python backend and Vue.js frontend components.
Enhanced Camera Scanner: Features advanced OpenCV-based image processing for superior barcode and QR code scanning with real-time image enhancement.
# Build frontend assets for production
bench build --app posawesome
# Force rebuild (cleans cache first)
bench build --app posawesome --force
# Build all apps in the bench
bench build# Start development server
bench start
# Start with specific port
bench start --port 8000posawesome/
├── frontend/ # Vue.js frontend
│ ├── src/
│ │ ├── posapp/
│ │ │ ├── components/ # Vue components
│ │ │ └── pages/ # Vue pages
│ │ └── main.js # Frontend entry point
│ └── package.json # Frontend dependencies
├── posawesome/ # Python backend
│ ├── public/ # Static assets
│ ├── posawesome/ # Main module
│ │ ├── doctype/ # DocType definitions
│ │ ├── api/ # API endpoints
│ │ └── hooks.py # App hooks
├── CLAUDE.md # This file
└── pyproject.toml # Python dependencies
# Create new site
bench new-site mysite.local
# Install app on site
bench --site mysite.local install-app posawesome
# Migrate database
bench --site mysite.local migrate
# Access site console
bench --site mysite.local console
# Backup site
bench --site mysite.local backup# Run migrations
bench migrate
# Reload specific doctype
bench --site mysite.local console
>>> frappe.reload_doc('posawesome', 'doctype', 'pos_invoice')
# Clear cache
bench --site mysite.local clear-cache# Run tests
bench --site mysite.local run-tests --app posawesome
# Run specific module tests
bench --site mysite.local run-tests --module posawesome.tests.test_pos
# Check Python syntax issues
cd ~/frappe-bench/sites
../env/bin/python ../apps/frappe/frappe/utils/bench_helper.py- Built with Vue 3 and Vuetify
- Components located in
frontend/src/posapp/components/ - Use composition API where possible
- Follow Frappe UI patterns and conventions
- Uses Vite as build tool
- Automatic compilation on
bench build --app posawesome - Watch mode available with
--devflag
- Uses Vuetify components and Material Design
- Custom SCSS in component
<style>blocks - RTL support implemented for Arabic/Hebrew
# Get document
doc = frappe.get_doc("POS Invoice", invoice_name)
# Create new document
new_doc = frappe.new_doc("POS Invoice")
new_doc.update(data)
new_doc.insert()
# Database queries
invoices = frappe.get_list("POS Invoice",
filters={"status": "Draft"},
fields=["name", "total"]
)
# Utilities
from frappe.utils import cint, flt, getdate, today# In posawesome/api/pos.py
@frappe.whitelist()
def get_pos_data():
return frappe.get_list("POS Invoice", limit=10)Located in posawesome/hooks.py:
# Document events
doc_events = {
"POS Invoice": {
"on_submit": "posawesome.api.pos.on_pos_invoice_submit"
}
}# Add your fork as remote
cd apps/posawesome
git remote add origin https://github.com/[username]/posawesome
# Create feature branch
git checkout -b feature/my-new-feature
# Stage and commit changes
git add .
git commit -m "Add new POS feature"
# Push to your fork
git push origin feature/my-new-feature# Add upstream remote (original repo)
git remote add upstream https://github.com/yrestom/POS-Awesome
# Pull latest changes
git pull upstream develop
# Rebase your branch
git rebase upstream/develop- Build Failures: Clear cache with
bench clear-cache - Frontend Issues: Check browser console and network tab
- Python Errors: Check
bench startoutput and error logs - Database Issues: Run
bench migrateand check DocType definitions
# Access Python console
bench --site mysite.local console
# Enable developer mode
bench --site mysite.local set-config developer_mode 1
# Show configuration
bench show-config
# List installed apps
bench list-apps --format json- Vue 3 - Frontend framework
- Vuetify - UI component library
- Vite - Build tool and dev server
- Frappe Framework - Full-stack web framework
- Python 3.8+ - Programming language
- MariaDB/MySQL - Database
- Redis - Caching and queuing
# Production build
bench build --app posawesome
# Setup production
bench setup production
# Restart services
bench restart
# Update app
bench update --app posawesome# Common utilities
from frappe.utils import cint, flt, cstr, getdate, add_days, today, now_datetime
# Database operations
frappe.db.get_value("DocType", "name", "field")
frappe.db.set_value("DocType", "name", "field", "value")
frappe.db.commit()
# User interactions
frappe.msgprint("Message")
frappe.throw("Error message")
# Translations
_("Text to translate")- This project uses the new esbuild-based build system (Frappe v14+)
- Frontend assets are compiled to
posawesome/public/dist/ - Development mode enables auto-reloading and debugging features
- Production builds are optimized and minified