Case Study
Project Case Study
Challenges, solutions, outcomes, technical highlights, architecture, and project scale.
⚡
Challenges
Before this project, Chavoosh Restaurant only accepted orders by phone and had no online ordering channel.
During peak hours, phone calls were missed and customers became frustrated.
Order management was done manually on paper, leading to human errors.
The absence of an online payment system forced customers to pay cash on delivery.
Customer information and order history were stored in a scattered manner and could not be retrieved easily.
The restaurant owner had no tool for sales analysis or product management.
💡
Solutions
Implemented a Django web application with a three-app architecture (account / site_profile / zarinpal) for separation of concerns.
Built a dual authentication system: traditional password login and SMS one-time-password (OTP) login.
Integrated the Ghasedak SMS API for registration codes, login codes, and new-order notifications to the admin.
Integrated Zarinpal v4 payment gateway with the full Request → StartPay → Verify cycle and RefID persistence.
Designed a dynamic AJAX-powered cart that updates quantity and price without page reloads.
Built a custom admin panel with role-based access for managing products, users, orders, and manual control of opening hours.
📚
Outcomes
Significant reduction in phone calls, moving the majority of orders to the online channel.
Increased order accuracy and elimination of manual paper-based entry errors.
Secure and fast online payment with traceability via RefID.
Centralized management of all products, users, and orders through a single admin panel.
Reduced per-order processing time from several minutes to a few seconds.
Ability to view customer purchase history and sales analytics for the restaurant owner.
🔧
Technical Highlights
Implemented OTP authentication without passwords for a simpler user experience.
Full Zarinpal v4 payment gateway integration with Request and Verify cycle and RefID persistence.
Automated SMS notification to admin via Ghasedak API upon payment confirmation.
Used the Jalali calendar through persiantools library to display order dates.
Built a dynamic AJAX-powered cart with no page reloads and real-time price synchronization.
Designed a fully RTL, responsive UI compatible with both mobile and desktop.
🏗️
Architecture
The project is built on Django's MTV (Model-Template-View) pattern.
The account app handles the custom user model, authentication, and SMS sending.
The site_profile app contains Product, Cart, and order models along with the admin and user panels.
The zarinpal app handles communication with the payment gateway and transaction verification.
The User model is customized via AbstractUser with additional fields like mobile, bank info, and profile image.
Templates are organized component-based (header, sidebar, and footer as includes).
📐
Project Scale
The project is currently live on the domain chavoosh.restaurant.
Serving real customers of Chavoosh Restaurant in the Fardis and Meshkin Dasht area.
Comprises three independent Django apps with more than ten data models.
Supports two authentication methods and two external APIs (Zarinpal and Ghasedak).
Designed for scalability with a modular and extensible architecture.
Manages the full order lifecycle from product selection to payment and final confirmation.