This is a fully functional e-commerce platform built with Django and styled using Tailwind CSS. The app includes modular components for managing products, categories, orders, carts, and an admin interface, providing a scalable solution for building an online store. It is designed to be extendable, with future plans for payment integration and shipment management.
The app is currently deployed on pythonanywhere for seamless cloud hosting.
-
Modular Apps:
- Products: Manage product details, images, prices, and more.
- Categories: Categorize products for better navigation and organization.
- Orders: Manage customer orders and track their status.
- Carts: Handle shopping cart functionality for customers.
- Admin: Full-featured admin interface for managing the store.
-
Tech Stack:
- Backend: Django (Python)
- Frontend: Tailwind CSS
- Database: SQLite (for development)
- Deployment: Pythonanywhere
-
Future Enhancements:
- Payment Integration: Plans for integrating a payment gateway.
- Shipment Management: Future addition of shipment tracking and options.
The database structure is designed based on the following ERD diagram, created using Lucidchart.
You can view the complete ERD diagram here:
The database includes tables for products, categories, orders, carts, and other essential data related to an e-commerce system.
Follow these steps to set up the project locally:
-
Clone the repository:
git clone https://github.com/a95z/django-e-commerce.git e-commerce
-
Navigate to the project folder:
cd e-commerce -
Install Poetry:
- Follow the official Poetry installation guide: https://python-poetry.org/docs/#installation.
-
Set up the project using Poetry:
- Install project dependencies and create a virtual environment (automatically managed by Poetry):
poetry install
- Install project dependencies and create a virtual environment (automatically managed by Poetry):
-
Activate the Poetry virtual environment (optional):
- To activate the virtual environment, run:
poetry shell
- Alternatively, you can run commands directly in the virtual environment using
poetry run(e.g.,poetry run python manage.py runserver).
- To activate the virtual environment, run:
-
Install Node.js dependencies for frontend:
- Ensure Node.js is installed (if not, install it from here).
- Install Node.js dependencies:
npm install
-
Build Tailwind CSS and start watching for changes:
- The project uses Tailwind CSS for styling. To build and watch your Tailwind CSS file, run the following command:
npm run tw:build
- This command will:
- Compile the
static/css/tw.dev.cssfile. - Output the minified version into
static/css/tw.css. - Watch for changes in your Tailwind CSS file and automatically rebuild it.
- Compile the
- The project uses Tailwind CSS for styling. To build and watch your Tailwind CSS file, run the following command:
-
Apply migrations:
poetry run python manage.py migrate
-
Create a superuser for the Django admin interface (optional):
poetry run python manage.py createsuperuser
-
Run the development server:
poetry run python manage.py runserver
-
Open your browser and go to http://127.0.0.1:8000 to see the app in action.
- Poetry automatically manages the virtual environment for you, so there’s no need to manually create or activate one using
venv. - All Python-related commands (e.g.,
python manage.py ...) should be prefixed withpoetry runif you’re not inside the Poetry shell. - If you ever need to add new dependencies, use
poetry add <package-name>instead of manually editingrequirements.txt.
Contributions are welcome! Feel free to fork this repository and submit pull requests for new features, bug fixes, or improvements. Please follow the existing code style and include tests where applicable.
This project is open-source and available under the MIT License.
This project was created and is maintained by Abdurezak Farah. Feel free to reach out for any questions or collaboration!
Note: This README is for the current version of the Inventory management system / e-commerce app. Future updates will include details about payment integration, shipment management, and other new features as they are developed.