Skip to content

eCommerce Store project with Django. Link to the deployed app available in README.md.

Notifications You must be signed in to change notification settings

Veluthil/eCommerce-Store

Repository files navigation

Dokusho Vernissage eCommerce App

Python Django Bootstrap Postgres AWS AWS PayPal PyTest Vercel HTML5 CSS3 JavaScript jQuery PowerShell

Dokusho Vernissage eCommerce is a Django-based web application that allows users to browse and purchase products online. The application is deployed on Vercel at https://dokusho-vernissage.vercel.app/. To further enhance the project, I am actively working on containerization using Docker, which will improve the application's scalability and portability, so stay tuned!

The project is composed of several Django applications, including:

  • Account for user authentication and account management (passwords and addresses),
  • Basket for basket functionality (adding items, updating quantities, calculating total prices),
  • Catalogue for creating products, product types, product specifications, and categories,
  • Checkout for payment integration with PayPal and delivery options,
  • Orders for managing user orders and payment confirmation.

For the frontend, Bootstrap 5, jQuery, and AJAX were used. The application's database is hosted on Railway and created using PostgresSQL. Static and media files are stored in an AWS S3 Bucket. Tests were written using PyTest, FactoryBoy, and Faker.

Features

  • User authentication and account management, including email confirmation for account activation (you will recieve an activation email from dokushovernissage@gmail.com)
  • Password reset functionality with or without logging in via email
  • Product browsing via Categories
  • Wish list for saving favorite products
  • Basket and checkout functionality
  • PayPal payment integration for secure and easy payment processing
  • Multiple shipping addresses for users
  • Toggle between dark and light mode for customizable user experience

Dokusho Vernissage eCommerce App Preview

dv-ss-1 dv-ss-2 dv-ss-3 dv-ss-4 dv-ss-5 dv-ss-6 dv-ss-7 dv-ss-8 dv-ss-9

Admin Page dv-ss-10 dv-ss-11 dv-ss-12 dv-ss-13

Installation

  1. Clone the repository to your local machine or download and extract it into a folder:
git clone https://github.com/Veluthil/eCommerce-Store.git
  1. Open the project in your preferred code editor and create a virtual environment. Activate the virtual environment using the following commands:
py -m venv venv
venv\Scripts\activate
  1. Install the required packages using:
pip install -r requirements.txt
  1. Set up the environment variables by updating the settings.py file with the appropriate values for the following variables:
  • load_dotenv("INSERT HERE YOUR OWN PATH TO .ENV FILE")
  • SECRET_KEY
  • DATABASES: If you want to use PostgresSQL database, update the USER, PASSWORD, HOST, and PORT variables accordingly. Alternatively, you can use SQLite database by commenting out the PostgresSQL settings and uncommenting the SQLite settings.
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • EMAIL_HOST_USER
  • EMAIL_HOST_PASSWORD
  • PAYPAL_CLIENT_ID
  • PAYPAL_SECRET
  1. To use the application in development mode, comment out the following lines or change to False in the settings.py file:
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True

And change DEBUG = False to:

DEBUG = True
  1. For local server usage, uncomment the following lines in the settings.py file:
STATIC_URL = '/static/'
STATICFILES_DIRS = [
    os.path.join(BASE_DIR, "static")
]
MEDIA_URL = "/media/"
MEDIA_ROOT = os.path.join(BASE_DIR, "media/")

And comment out the AWS S3 Bucket settings.

  1. To set up email functionality, update the settings.py file as follows:
  • For local server usage and sending email to your console, uncomment the following lines in settings.py:
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_PORT = 25

And comment out the email settings for the SMTP section.

  • Add following method to Customer class in ecommerce/apps/account/models.py:
 def email_user(self, subject, message):
        send_mail(
            subject,
            message,
            "l@1.com",
            [self.email],
            fail_silently=False,
        )
  • In acccount_register view at ecommerce/apps/account/views.py comment out following code:
            with get_connection(
                   host=settings.EMAIL_HOST,
                   port=settings.EMAIL_PORT,
                   username=settings.EMAIL_HOST_USER,
                   password=settings.EMAIL_HOST_PASSWORD,
                   use_tls=settings.EMAIL_USE_TLS
           ) as connection:
               subject = subject
               email_from = settings.EMAIL_HOST_USER
               recipient = [user.email]
               message = message
               EmailMessage(subject, message, email_from, recipient, connection=connection).send()

And uncomment this:

user.email_user(subject=subject, message=message)
print(message)
  1. To use PayPal, you need to create your own developer account.

Usage

  1. Open your web browser and navigate to http://localhost:8000/.
  2. Create an account and/or log in. If you create an account, you will receive an activation link by email that you need to click to confirm and activate your account.
  3. Browse the available products and add items to your cart or wish list.
  4. Click the "Checkout Securely" button to enter your payment and shipping information.
  5. Review your order, choose a shipping method, select PayPal as your payment method, and submit your order for processing.
  6. Edit your account and address details as necessary (you can add multiple addresses and choose which one is the primary address).

About

eCommerce Store project with Django. Link to the deployed app available in README.md.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages