A secure, server-side rendered food delivery system built using Djangoโs MVT architecture with multi-gateway payment integration.
- ๐ Introduction
- โ๏ธ System Architecture
- ๐ Key Features
- ๐ณ Payment Integration
- ๐ ๏ธ Technology Stack
- ๐ฅ๏ธ Installation & Setup
- ๐ก๏ธ Security Measures
- ๐ Project Structure
- ๐ค Contributing
- ๐ License
- ๐ธ Screenshots (Optional)
Bhok-Lagyo is a robust food delivery application built using Django (MVT architecture).
It focuses on security, financial accuracy, and scalable design while maintaining a clean and responsive UI.
- ๐ Browse a dynamic food catalog
- ๐งบ Add items to a session-based persistent cart
- ๐ณ Pay securely using:
- eSewa
- Khalti
- PayPal
The system follows Djangoโs Model-View-Template (MVT) pattern.
- Powered by Djangoโs built-in
authsystem - Secure login & session-based user tracking
- Managed inside the
Productsapp models.pydefines schema- Full CRUD from Django Admin
- Real-time menu updates
- Uses Django Sessions
- Prevents database clutter from abandoned carts
- Cart persists even after page refresh
- Server-side validation prevents price tampering
- Cart revalidated against database prices
- Permanent storage in:
OrderOrderLineItem
| Gateway | Integration Method |
|---|---|
| eSewa | Server-side signature + HTML form redirect |
| Khalti | Secure Server-to-Server API handshake |
| PayPal | JavaScript SDK |
All payment flows ensure:
- Server-side verification
- Accurate Decimal-based calculations
- Secure key handling via environment variables
- โ Persistent Cart via Sessions
- โ Multi-Gateway Payments (eSewa, Khalti, PayPal)
- โ Django Admin Dashboard
- โ Tailwind CSS Responsive UI
- โ Server-Side Checkout Validation
- โ
Financial Accuracy using Python
Decimal - โ Clean MVT Architecture
| Layer | Technology |
|---|---|
| Backend | Python 3.10+, Django 4.2+ |
| Database | SQLite (Development), PostgreSQL (Production) |
| Payments | eSewa API v2, Khalti ePayment v2, PayPal SDK |
| Frontend | Django Templates, Tailwind CSS |
| Server Logic | 99.5% Python, 0.5% JavaScript |
git clone https://github.com/CodedByManish/blok-lagyo.git
cd blok-lagyopython -m venv venvActivate:
Mac/Linux
source venv/bin/activateWindows
venv\Scripts\activatepip install -r requirements.txtCreate a .env file:
KHALTI_SECRET_KEY=your_test_key
ESEWA_SECRET_KEY=8gBm/:&EnhH.1/q
PAYPAL_TEST=Truepython manage.py makemigrations
python manage.py migratepython manage.py runserverVisit:
http://127.0.0.1:8000/
- ๐ CSRF Protection enabled on all POST requests
- ๐งฎ Server-side price recalculation during checkout
- ๐ API keys stored in environment variables
- ๐ Prevention of client-side price manipulation
- ๐ฐ Decimal-based currency calculations
blok-lagyo/
โ
โโโ products/ # Product catalog app
โโโ orders/ # Order & checkout logic
โโโ payments/ # Payment gateway integrations
โโโ templates/ # Django Templates
โโโ static/ # CSS, JS, Images
โโโ docs/ # Screenshots & demo assets
โโโ manage.py
โโโ requirements.txtCreate a docs/ folder and add:


You may also include:
- Admin dashboard screenshot
- Cart page
- Payment success page
- Demo GIF of checkout flow
- Fork the project
- Create your feature branch
git checkout -b feature/AmazingFeature- Commit your changes
1c98f8f (Add PayPal integration and update README.md)
git commit -m "Add AmazingFeature"- Push to branch
git push origin feature/AmazingFeature"- Open a Pull Request
Distributed under the MIT License.
See LICENSE for more information.