A full-featured e-commerce web application built with Django, featuring a modern responsive design, comprehensive user management, and advanced shopping features.
- β¨ Features
- πΌοΈ Screenshots
- π οΈ Technologies Used
- π Project Structure
- π Installation & Setup
- π» Usage
- π§ Configuration
- π API Documentation
- π€ Contributing
- π License
- π Useful Resources
- Product Catalog: Browse products by category with advanced filtering
- Shopping Cart: Add/remove items with real-time quantity updates
- Secure Checkout: Complete purchase flow with payment processing
- Order Management: Track order status and view order history
- Wishlist: Save favorite products for later purchase
- Product Reviews & Ratings: User-generated reviews with star ratings
- Search Functionality: Find products quickly with search and filters
- User Registration & Authentication: Secure signup/login system
- Social Authentication: Google OAuth integration
- Profile Management: Update personal information and preferences
- Password Reset: Secure password recovery via email
- Admin Panel: Comprehensive admin interface for store management
- Responsive Design: Mobile-first approach with Bootstrap 5
- Modern Interface: Clean, intuitive user experience
- Dynamic Pricing: Support for discounts and promotional codes
- Multi-currency: USD and Philippine Peso support
- Image Gallery: Product images with zoom and gallery view
- CSRF Protection: Built-in security measures
- Session Management: Secure user sessions
- Admin Access Control: Restricted admin panel access
- Static File Optimization: Compressed and cached static assets
- Database Optimization: Efficient queries and indexing
Modern homepage with featured products and promotional banners
User-friendly login interface with social authentication
User-friendly Register interface with social authentication
Comprehensive user profile management
Comprehensive product listing with filtering options
Detailed product view with images, reviews, and purchase options
Shopping cart with quantity controls and price calculations
Streamlined checkout process with order summary
- Django 4.2.20 - High-level Python web framework
- Python 3.8+ - Programming language
- SQLite/PostgreSQL - Database (configurable)
- Django Allauth - Authentication system
- Pillow - Image processing
- Gunicorn - WSGI HTTP Server (production)
- HTML5 - Markup language
- CSS3 - Styling
- JavaScript - Client-side functionality
- Bootstrap 5 - Responsive CSS framework
- jQuery - JavaScript library
- Git - Version control
- pip - Package management
- virtualenv - Virtual environment
- Whitenoise - Static file serving
- python-decouple - Environment configuration
ShopNow/
βββ src/ # Main source code
β βββ main/ # Django project settings
β β βββ settings.py # Project configuration
β β βββ urls.py # Main URL routing
β β βββ middleware/ # Custom middleware
β β βββ wsgi.py # WSGI configuration
β βββ store/ # Main e-commerce app
β β βββ models.py # Database models
β β βββ views.py # View logic
β β βββ urls.py # App URL routing
β β βββ forms.py # Form definitions
β β βββ admin.py # Admin interface
β β βββ templates/ # HTML templates
β βββ accounts/ # User authentication
β β βββ adapter.py # Custom auth adapter
β βββ static/ # Static files (CSS, JS, images)
β βββ media/ # User-uploaded files
β βββ manage.py # Django management script
βββ docs/ # Documentation
β βββ screenshots/ # Application screenshots
βββ requirements.txt # Python dependencies
βββ LICENSE # Project license
βββ README.md # This file
- Python 3.8 or higher
- pip (Python package installer)
- Git
-
Clone the Repository
git clone https://github.com/yourusername/ShopNow.git cd ShopNow -
Create Virtual Environment
python -m venv venv # Activate virtual environment # On Windows: venv\Scripts\activate # On macOS/Linux: source venv/bin/activate
-
Install Dependencies
pip install -r requirements.txt
-
Environment Configuration
# Create .env file cp .env.example .env # Edit .env file with your settings SECRET_KEY=your-secret-key-here DEBUG=True DATABASE_URL=sqlite:///db.sqlite3 EMAIL_HOST=smtp.gmail.com EMAIL_PORT=587 EMAIL_HOST_USER=your-email@gmail.com EMAIL_HOST_PASSWORD=your-app-password
-
Database Setup
cd src python manage.py makemigrations python manage.py migrate -
Create Superuser
python manage.py createsuperuser
-
Collect Static Files
python manage.py collectstatic
-
Run Development Server
python manage.py runserver
-
Access the Application
- Main site: http://127.0.0.1:8000
- Admin panel: http://127.0.0.1:8000/admin
- Browse Products: Visit the homepage to see featured products
- Search & Filter: Use the search bar and category filters
- Add to Cart: Click "Add to Cart" on any product
- Checkout: Complete your purchase in the checkout process
- Track Orders: View order status in your profile
- Access Admin Panel: Login at
/admin - Manage Products: Add, edit, or remove products
- Handle Orders: Process and update order status
- User Management: Manage user accounts and permissions
- Analytics: View sales and user statistics
The application supports multiple database backends:
SQLite (Default)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}PostgreSQL
DATABASES = {
'default': dj_database_url.config(default=os.getenv('DATABASE_URL'))
}Configure email settings for password reset and notifications:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = 'your-email@gmail.com'
EMAIL_HOST_PASSWORD = 'your-app-password'STATIC_URL = '/static/'
STATICFILES_DIRS = [BASE_DIR / "static"]
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')class Product(models.Model):
name = models.CharField(max_length=200)
category = models.ForeignKey(Category, on_delete=models.CASCADE)
description = models.TextField()
price = models.DecimalField(max_digits=10, decimal_places=2)
image = models.URLField(max_length=500)
is_featured = models.BooleanField(default=False)
discount_percentage = models.PositiveIntegerField(default=0)class Order(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
items = models.ManyToManyField(OrderItem)
total_amount = models.DecimalField(max_digits=10, decimal_places=2)
status = models.CharField(max_length=20, choices=ORDER_STATUS_CHOICES)
created_at = models.DateTimeField(auto_now_add=True)product_list()- Display all productsproduct_detail()- Show individual productproduct_search()- Search functionality
add_to_cart()- Add item to cartremove_from_cart()- Remove item from cartupdate_cart()- Update quantities
user_profile()- User profile managementorder_history()- View past orderswishlist()- Manage wishlist
We welcome contributions! Please follow these steps:
-
Fork the Repository
git clone https://github.com/yourusername/ShopNow.git
-
Create a Feature Branch
git checkout -b feature/amazing-feature
-
Make Your Changes
- Follow PEP 8 style guidelines
- Add tests for new features
- Update documentation
-
Commit Your Changes
git commit -m 'Add amazing feature' -
Push to Branch
git push origin feature/amazing-feature
-
Open a Pull Request
- Write clear, descriptive commit messages
- Test your changes thoroughly
- Update documentation as needed
- Follow the existing code style
- Add appropriate error handling
!HuerteDev π Full Stack Developer |
dedicatoriaDev π Full Stack Developer |
We welcome contributions from the community! Please read our Contributing Guidelines to get started.
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions:
- Check the Documentation: Review this README and Django docs
- Search Issues: Look for similar issues in the repository
- Create an Issue: Report bugs or request features
- Contact: Reach out to the maintainers
Happy Shopping! πβ¨