GoldenNaina is an e-commerce platform built using Django and PostgreSQL, featuring wishlist management, coupon functionality, secure payment options, and a customized admin panel. The platform is deployed using AWS services for scalability and performance.
Live at: www.goldennaina.com
- Features
- Tech Stack
- Deployment Architecture
- Installation and Setup
- Docker Setup
- Configuration
- Usage
- Screenshots
- Testing
- Contributing
- License
- User Authentication: Secure signup and login using email and password, with password reset functionality.
- Wishlist Management: Users can add and manage their favorite products for future purchases using AJAX for smooth interactions.
- Product Search: Full-text search and category-based filtering for easy product discovery.
- Order Tracking: Users can track their orders in real time, with detailed status updates.
- Coupon System: Apply promotional codes at checkout for discounts.
- Payment Options: Integrated PayPal and Cash on Delivery for flexible payment solutions.
- Profile Management: Manage addresses, view wishlist items, and order details from a dedicated profile section.
- Related Products & Reviews: Display related products and allow users to add and view reviews on product pages.
- Size Guide: A dedicated page to assist users in selecting the correct sizes.
- Admin Panel: Custom-built admin panel using Jazmin for managing products, orders, and users.
- HTML5: For page structure and layout.
- CSS3: For responsive design and styling.
- JavaScript: For adding interactive elements and enhancing user experience.
- AJAX: Used for dynamic wishlist management without reloading pages.
- Django: A robust Python framework for handling the server-side logic and database management.
- PostgreSQL: A relational database for storing product, user, and order data.
- Psycopg2: PostgreSQL adapter to enable efficient database queries.
- PayPal SDK: Integrated to process online payments.
- Cash on Delivery: Available as an offline payment option for customers.
- Jazmin: Custom admin interface to manage backend data efficiently.
- AWS EC2: For hosting the application server.
- Amazon S3: For storing static files such as images, CSS, and JavaScript.
- RDS PostgreSQL: Managed database service with automatic backups.
- Nginx: Used as a reverse proxy for managing incoming web traffic.
- Gunicorn: Application server used to handle requests.
- Cloudflare: DNS management, CDN, and protection against DDoS attacks.
- Docker: Containerized the application for easier deployment.
- Amazon ECR: Docker images are uploaded to Amazon Elastic Container Registry (ECR) for secure and scalable storage.
Diagram showing the deployment architecture with AWS services
- Clone the repository:
git clone https://github.com/shanu-shahbin/GoldenNaina.git cd GoldenNaina
Create a virtual environment and activate it:
bash Copy code python3 -m venv venv source venv/bin/activate Install dependencies:
bash Copy code pip install -r requirements.txt Set up environment variables for database, AWS services, and PayPal integration in a .env file:
bash Copy code DEBUG=True SECRET_KEY=your_secret_key DATABASE_URL=your_database_url PAYPAL_CLIENT_ID=your_paypal_client_id PAYPAL_SECRET_KEY=your_paypal_secret_key Apply migrations and run the server:
bash Copy code python manage.py migrate python manage.py runserver Docker Setup To containerize and deploy the application using Docker and Amazon ECR:
Create a Dockerfile in the root directory of your project:
dockerfile Copy code
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt /app/
RUN pip install --no-cache-dir -r requirements.txt
COPY . /app/
EXPOSE 8000
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "myproject.wsgi:application"] Build the Docker image: bash Copy code docker build -t goldennaina:latest . Login to ECR:
bash Copy code aws ecr get-login-password --region | docker login --username AWS --password-stdin <aws_account_id>.dkr.ecr..amazonaws.com Tag and Push the Docker image to ECR:
bash
Copy code
docker tag goldennaina:latest <aws_account_id>.dkr.ecr..amazonaws.com/goldennaina:latest
docker push <aws_account_id>.dkr.ecr..amazonaws.com/goldennaina:latest
Configuration
Before running the project, configure the following environment variables:
SECRET_KEY: Your Django secret key. DATABASE_URL: PostgreSQL connection URL. PAYPAL_CLIENT_ID: PayPal SDK client ID. PAYPAL_SECRET_KEY: PayPal SDK secret key. AWS_ACCESS_KEY_ID: AWS access key for managing S3. AWS_SECRET_ACCESS_KEY: AWS secret key for managing S3. S3_BUCKET_NAME: S3 bucket name for static files. Place these in a .env file at the root of the project.
Usage Once the setup is complete, the application can be accessed via http://localhost:8000 in a local environment.
Key functionalities:
Browse products, add to wishlist, and checkout with payment. Access user profile to manage orders and addresses. Admins can log in to the custom admin panel to manage users, products, and orders. Screenshots
- User Dashboard
- Admin Panel
- Product Page
Contributing Contributions are welcome! If you find any issues or have feature requests, please open an issue or submit a pull request. Before contributing, please ensure you:
Fork the repository. Create a new branch for your feature/fix. Commit your changes with descriptive commit messages. Open a pull request to the main branch.
License This project is licensed under the MIT License. See the LICENSE file for details.