Hi everyone — I’m currently a 2nd year BS Computer Science student (Partido State University) and I built a Django POS system to push beyond tutorial projects and practice real workflows end-to-end. I’d really appreciate feedback from more experienced Django developers, especially around project structure, security, and testing.
Repo: https://github.com/johnaljennegalos/django-pos-scanner
(Live demo link is in the README.)
High-level features
-
Authentication + role-based access (Manager / Sales Agent / Credit Officer)
-
Barcode POS flow (scan → lookup → cart) with a JSON endpoint (
/scan_product/) -
Cash + installment checkout (downpayment/term/monthly due, balances/next due date)
-
Multi-branch inventory with automatic stock deduction + low/out-of-stock tracking
-
Warranty workflows (repair/replacement + serial tracking) + defective logging
-
Reporting (dashboard + CSV exports) + audit logs + archiving/restore
Questions I’d like feedback on
-
Project structure: How would you split a growing Django app (apps/services/modules) to avoid a large
views.pyand keep business logic organized? -
Data integrity: For stock deduction during checkout, what’s the recommended approach to prevent overselling under concurrent checkouts (e.g.,
transaction.atomic,select_for_update, constraints)? -
Security: Best practices for protecting JSON/AJAX endpoints beyond
login_required(permissions, CSRF, validation, rate limiting)? -
Testing: What test cases would you prioritize first for checkout/inventory/installment flows, and do you recommend Django TestCase vs pytest for this kind of project?
Thanks in advance—any pointers or references to Django best practices are welcome. If there’s anything obviously “un-Django” in how I structured things, I’d love to know so I can improve it.