This project is a practical implementation focused on Ipswich Retail, aiming to transition from a monolithic system architecture to a more scalable and efficient Django MVT (Model-View-Template) framework. The goal is to address the limitations of the current system and enhance flexibility, maintainability, and performance by adopting a more modular approach.
The application includes key e-commerce functionalities such as user authentication, product browsing, cart management, and order processing, with a focus on seamless user experience and modularity.
scheema_retail/
│
├── scheema_retail/ # Django project folder (core functionality)
│ ├── __init__.py
│ ├── settings.py # Django settings file
│ ├── urls.py # URL routing for the project
│ ├── wsgi.py # WSGI configuration for deployment
│ ├── asgi.py # ASGI configuration for asynchronous servers
│ ├── manage.py # Django manage.py script to run commands
│ ├── templates/ # Django templates for HTML rendering
│ │ ├── base.html # Base template for inheritance
│ │ ├── home.html # Home page template
│ │ └── product_detail.html # Product detail page template
│ ├── static/ # Static assets (CSS, JS, images)
│ │ ├── css/
│ │ │ └── styles.css # Compiled CSS files (Tailwind or custom)
│ │ ├── js/
│ │ │ └── app.js # Custom JS (if needed)
│ │ └── images/ # Static images
│ └── scheema_retail_store/ # App for product and cart management
│ ├── __init__.py
│ ├── models.py # Django models for products, categories, etc.
│ ├── views.py # Views for handling product display, cart, etc.
│ ├── urls.py # URLs related to the products and cart
│ ├── forms.py # Forms for handling user input (e.g., search, cart)
│ ├── admin.py # Django admin configuration for product management
│ └── migrations/ # Database migration files
│
├── scheema_retail_frontend/ # Frontend related files (Tailwind, JS, etc.)
│ ├── templates/ # Frontend templates
│ ├── stores/ # Frontend templates for core functionality
│ │ │ ├── base.html # Base template for inheritance (now in frontend)
│ │ │ ├── home.html # Home page template
│ │ │ └── product_detail.html # Product detail page template
│ ├── tailwind.config.js # Tailwind configuration file
│ └── package.json # NPM dependencies for frontend
│
├── docker-compose.yml # Docker Compose file for containerized deployment
├── Dockerfile # Dockerfile for creating the app container
├── requirements.txt # Python dependencies for the project
├── pytest.ini # Configuration for pytest testing framework
├── .gitignore # Git ignore file to exclude unnecessary files
├── .dockerignore # Docker ignore file for unnecessary files during build
└── README.md # Project README
scheema_retail/
: This is the main Django project folder that contains:
settings.py
: Configuration settings for the Django project.urls.py
: URL routing for the entire project.templates/
: HTML templates rendered by Django views.static/
: Static assets like CSS (Tailwind), JavaScript, and images.scheema_retail_store/
: The main app for handling product management, cart functionality, and order processing.scheema_retail_frontend/
: Contains frontend-related configurations and files.
tailwind.config.js
: Tailwind CSS configuration file to manage styling.package.json
: For managing JavaScript dependencies if required (like custom scripts).docker-compose.yml
and Dockerfile
: Configuration files to containerize the application and manage deployments.
requirements.txt
: Python package dependencies required for the project.
pytest.ini
: Configuration file for setting up and running tests with pytest.
README.md
: Documentation file that describes the project, setup, and usage instructions.
Clone the Repository:
git clone https://github.com/aliabbascheema/scheema_retail.git
cd scheema_retail
Backend Setup:
pip install -r requirements.txt
python3 manage.py makemigrations
python3 manage.py makemigrations scheema_retail_store
python3 manage.py migrate
python3 manage.py runserver
Frontend Setup:
python3 manage.py tailwind install
python3 manage.py tailwind start
Deploy to Render:
/admin
for managing products and orders.This project demonstrates how transitioning to a Django MVT framework and adopting DevOps practices can address challenges posed by legacy systems. By using Render’s deployment and monitoring tools, alongside a modular architecture, Ipswich Retail achieves enhanced flexibility, maintainability, and performance. While SQLite meets current requirements, scaling may necessitate transitioning to PostgreSQL or MySQL in the future.
This project is licensed under the MIT License. See the LICENSE
file for more details.