ShopX is a full-featured e-commerce web application built with Django. It provides a complete shopping experience with user authentication, product catalog, shopping cart, and order management.
-
User Management
- User registration and authentication
- User login/logout with session management
- Password change functionality
- User profile management
-
Product Management
- Browse product catalog
- View detailed product information
- Mobile-friendly product browsing
- Product image gallery
-
Shopping Cart
- Add/remove products from cart
- View cart contents
- Empty cart functionality
- Real-time cart updates
-
Checkout & Orders
- Secure checkout process
- Address management and validation
- Buy now functionality
- Order history and tracking
- Order management dashboard
-
Payment Integration
- Support for multiple payment methods
-
Responsive Design
- Mobile-optimized interface
- Responsive CSS styling
- Cross-browser compatibility
- Backend: Django 3.1.5
- Database: SQLite3
- Frontend: HTML5, CSS3, JavaScript
- UI Components: Bootstrap, Owl Carousel
- Image Processing: Pillow
ShopX/
├── app/ # Main Django application
│ ├── models.py # Database models
│ ├── views.py # View logic
│ ├── urls.py # URL routing
│ ├── forms.py # Django forms
│ ├── admin.py # Admin configuration
│ ├── migrations/ # Database migrations
│ ├── templates/app/ # HTML templates
│ └── static/app/ # CSS, JS, images
├── shopx/ # Project configuration
│ ├── settings.py # Django settings
│ ├── urls.py # Project URL configuration
│ ├── asgi.py # ASGI config
│ └── wsgi.py # WSGI config
├── media/ # User-uploaded media
│ └── productimage/ # Product images
├── manage.py # Django management script
├── requirements.txt # Python dependencies
├── build.sh # Build and deployment script
└── db.sqlite3 # SQLite database
- Python 3.6 or higher
- pip (Python package manager)
- Virtual environment (recommended)
-
Clone the repository
git clone <repository-url> cd ShopX
-
Create and activate virtual environment
python -m venv venv # On Windows venv\Scripts\activate # On Linux/Mac source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Run migrations
python manage.py migrate
-
Create a superuser (admin)
python manage.py createsuperuser
-
Collect static files (for production)
python manage.py collectstatic --no-input
python manage.py runserverThe application will be available at http://localhost:8000/
Navigate to http://localhost:8000/admin/ and log in with your superuser credentials.
Use the provided build.sh script for automated setup:
bash build.shThis script will:
- Install all dependencies from
requirements.txt - Collect static files
- Run database migrations
The project uses SQLite3 for the database. The database file db.sqlite3 is created after the first migration.
To create new migrations:
python manage.py makemigrationsTo apply migrations:
python manage.py migrate- home.html - Homepage with product listings
- login.html - User login page
- customerregistration.html - New user registration
- productdetail.html - Detailed product view
- addtocart.html - Add to cart functionality
- cart.html - Shopping cart display
- checkout.html - Checkout process
- orders.html - Order history
- address.html - Address management
- profile.html - User profile
- changepassword.html - Password change
- mobile.html - Mobile-optimized view
- base.html - Base template with common layout
bootstrap- CSS frameworkowl.carousel.min.css- Carousel stylingstyle.css- Custom application styles
owl.carousel.min.js- Carousel functionalitybootstrap- JavaScript componentsmyscript.js- Custom application scripts
- Banner images
- Product images
- Payment method icons
The application provides the following main endpoints:
/- Homepage/login/- User login/register/- User registration/product/<id>/- Product details/cart/- Shopping cart/checkout/- Checkout process/orders/- Order history/profile/- User profile/address/- Address management
- Linked to Django User model
- Stores customer information (name, locality, etc.)
- Supports multiple addresses for Indian states
- Product details and pricing
- Image support
- Category classification
- Order tracking
- Order status management
- Order details and history
- Create a new branch for your feature
- Make your changes
- Test thoroughly
- Submit a pull request
- Follow PEP 8 guidelines for Python
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions small and focused
ModuleNotFoundError
- Ensure virtual environment is activated
- Run
pip install -r requirements.txt
Database Error
- Run
python manage.py migrate - Delete
db.sqlite3and re-run migrations if needed
Static Files Not Loading
- Run
python manage.py collectstatic --no-input - Check STATIC_ROOT setting in settings.py
Port Already in Use
- Use a different port:
python manage.py runserver 8001
For production deployment:
- Set
DEBUG = Falseinsettings.py - Configure ALLOWED_HOSTS
- Use environment variables for SECRET_KEY
- Set up a production database (PostgreSQL recommended)
- Configure a web server (Nginx, Apache)
- Use a production WSGI server (Gunicorn, uWSGI)
Refer to Django deployment documentation for detailed instructions.
This project is provided as-is for educational and commercial purposes.
For issues and questions:
- Check the Django documentation: https://docs.djangoproject.com/
- Review the project structure and code comments
- Check the troubleshooting section above
- Payment gateway integration (Stripe, PayPal, RazorPay)
- Email notifications
- SMS notifications
- Advanced search and filtering
- Product reviews and ratings
- Wishlist functionality
- Admin dashboard analytics
- Inventory management
- Multi-language support
Version: 1.0.0
Last Updated: May 2026