MD Nahiduzzaman Dipu Python · Django · Machine Learning

Internship project Full-Stack · 2026

POS System — O'dell Tech

O'dell Tech Shopping — Point of Sale System

A Django point-of-sale system from an internship at O'dell Tech, built to a written business specification

Type
Internship project
Status
Built
Year
2026
My role
Python/Django Developer Intern at O'dell Tech Ltd. (16 Aug – 19 Sep 2026)
Automated tests
281
passing on SQLite and MySQL
Business requirements
36
BR-001 to BR-036
Business rules
12
enforced in one services layer
Roles
4
capability-based access

01Overview

A complete retail point-of-sale system in Python and Django that I worked on as a Python/Django developer intern at O'dell Tech Ltd., built to O'dell Tech Shopping's Business Requirement Specification: the counter workflow (search, cart, discount, tax, payment, invoice, stock update) plus products, inventory, suppliers, purchases, customers, employees, returns and reporting — all behind role-based access control.

  • Till workflow: product search, barcode scan, cart, discounts, tax and invoice
  • Sales run in atomic transactions with row locks, so two tills can't sell the last unit
  • Four roles mapped to named capabilities, checked on every view
  • 281 automated tests passing on both SQLite and MySQL

02The problem

A shop till has to be right about money and stock every time, under concurrent use, and it has to stop a cashier from doing a manager's job. The specification set out 36 business requirements and twelve business rules to meet.

03Architecture

Server-rendered Django with one deliberate rule: all money and stock logic lives in a single services layer, never in views. Views declare the capability they need; the services enforce the business rules; the tests pin both down.

  1. 01TillSearch, barcode scan, cart
  2. 02PricingProduct discount → subtotal → customer discount → tax
  3. 03CheckoutAtomic transaction, row locks
  4. 04Stock ledgerEvery change is a movement row
  5. 05Invoice & reportsPrintable receipt, CSV, SVG charts

One Django app rather than eight — chosen to avoid circular imports — with modularity coming from a views package (auth, dashboard, terminal, catalog, inventory, sales, people, reports) and a services layer for stock, sales, returns and purchases. Sixteen model entities follow the specification.

Permissions are named capabilities checked by a decorator on every view; the sidebar is generated from the same capability map, so what a role can see and what it can do never drift apart.

Server-rendered templates with hand-written CSS and vanilla JavaScript — no CDN, no build step, no front-end framework — so the till works offline on a shop network. Charts are inline SVG rendered on the server. MySQL in production, SQLite for development, selected by one environment variable.

04Technologies

  • Python
  • Django
  • MySQL
  • SQLite
  • JavaScript
  • HTML
  • CSS
  • WhiteNoise
  • openpyxl

05Implementation

  • Sales run inside transaction.atomic() with select_for_update() row locks, so two tills cannot sell the same last unit.
  • Stock changes only through one function that also writes a stock-movement row — an auditable ledger rather than a number that silently changes.
  • Pricing is a documented, ordered calculation; loyalty discount eligibility is re-derived on the server at checkout, and extra discount parameters posted by a client are ignored (and tested).
  • Four roles — Administrator, Manager, Cashier, Inventory Staff — mapped to capabilities; unauthorised access returns a styled 403.
  • Bulk product import from CSV or Excel with a preview step: every row is marked New, Update, Warning or Error before anything is written, then valid rows commit in one transaction.
  • Sales are voided, never deleted, and line items snapshot the product name and price at the time of sale.
  • Security: login lockout after repeated failures, PBKDF2 password hashing, secure session cookies, and staff screens that show customer numbers only — never name, email or address.
  • Deployment is scripted for cPanel shared hosting (Passenger WSGI, WhiteNoise for static files).

06Challenges

  • Concurrency: unique employee IDs and correct stock under parallel requests — verified with a test that runs eight threads at once.
  • Running the same test suite against both SQLite and MySQL, including a MySQL time-zone pitfall that made date filters return nothing.
  • A pinned legacy stack (Python 3.9.2, Django 4.0.3) dictated by the target host.
  • Keeping customer personal data off staff screens while still recognising returning customers.

07Results

The specification's requirements (BR-001 to BR-036) are mapped module by module in the README, and the twelve business rules are enforced in the services layer and covered by tests. The suite is 281 tests, passing on both SQLite and MySQL.

08Limitations

  • Exports are CSV only; invoices print through a print stylesheet rather than generated PDFs.
  • Product photos are a URL field, not uploaded files.
  • No public sign-up by design — accounts are created by an administrator or manager.
  • Pinned to Python 3.9 / Django 4.0 to match the hosting environment.

09Screenshots

Taken from the project's own repository (view on GitHub).

↑↓ to move · Enter to run · Esc to close