Shockit Electronics is an e-commerce platform designed to offer a seamless shopping experience for electronic products. This project is built using Django as the backend framework, Tailwind CSS for styling, and HTMX to provide dynamic and responsive interactions without the need for complex JavaScript frameworks.
- Product Listings: Browse through a wide range of electronic products.
- Cart System: Add products to your cart, view your cart, and modify quantities.
- User Authentication: Secure login, registration, and profile management for customers.
- Responsive Design: The site is fully responsive, optimized for both desktop and mobile users.
- Dynamic Content: Real-time updates of cart items and product details with HTMX.
- Search & Filtering: Easily search for products and filter by categories or price range.
- Backend: Django
- Frontend: Tailwind CSS, HTMX
- Database: SQLite (for development; can be configured to use other databases)
- Authentication: Django's built-in authentication system
To set up the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/thatquietkid/electronics-store-django.git cd shockit
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
-
On Windows:
venv\Scripts\activate
-
On Mac/Linux:
source venv/bin/activate
-
-
Install the dependencies:
pip install -r requirements.txt
-
Run migrations:
python manage.py migrate
-
Create a superuser (optional but recommended for admin access):
python manage.py createsuperuser
-
Start the development server:
python manage.py runserver
-
Open the app in your browser: Visit
http://127.0.0.1:8000/
to access the project.
- Browse Products: Navigate through different categories and view product details.
- Add to Cart: Click on the cart icon to add products to your shopping cart.
- Checkout: Go to your cart and proceed with checkout.
- Admin Panel: Visit
/admin
and use the superuser credentials to manage products, orders, and users.
HTMX is used to create dynamic updates for cart operations, like adding/removing products from the cart, without reloading the entire page. This improves the user experience and performance.
Tailwind CSS provides utility-first classes that enable you to create custom designs directly in your HTML, resulting in faster development and easy-to-maintain styles.
- Fork the repository.
- Create your feature branch:
git checkout -b feature-name
. - Commit your changes:
git commit -m 'Add new feature'
. - Push to the branch:
git push origin feature-name
. - Open a pull request.
This project is open-source and available under the MIT License.
- Django for the powerful and flexible backend framework.
- Tailwind CSS for efficient and responsive design.
- HTMX for enhancing the interactivity without full-page reloads.