A multi-user ecommerce inventory management web application built with Django, featuring user authentication, inventory tracking, order management, client management, and comprehensive reporting with analytics.
- User Registration & Login: Secure user authentication system
- Multi-user Support: Isolated user data with proper access controls
- Admin Panel: Comprehensive user management for administrators
- Custom User Model: Extended user profiles with company information
- Product Management: Add, edit, and track products with the following fields:
- Name (required)
- Picture (optional)
- Color (optional)
- Pieces bought
- Pieces left (auto-calculated)
- Buying price per piece
- Selling price per piece
- Automatic Stock Updates: Stock automatically decreases when orders are placed
- Stock Tracking: Real-time inventory level monitoring
- Order Creation: Create orders with client information and product selection
- Order Status Tracking: Track orders through different stages:
- Processing
- Paid
- Shipped
- Cancelled
- Current Orders: View and manage processing orders
- Order History: Complete history of all completed/cancelled orders
- Automatic Client Creation: New clients are automatically added during order creation
- Auto-populated from Orders: Clients are automatically created from order information
- Client Profiles: Store client contact information and address
- Order History: View complete order history for each client
- Client Analytics: Track client spending and order patterns
- Financial Analytics:
- Total buying cost calculation
- Total revenue tracking
- Shipping costs
- Profit and loss analysis
- Visual Charts: Interactive charts using Chart.js
- Revenue vs Costs bar chart
- Top products doughnut chart
- Product Performance: Track top-selling products
- Business Intelligence: Comprehensive dashboard with key metrics
- Backend: Django 4.2.7 (Python)
- Frontend: Bootstrap 4 with custom styling
- Database:
- SQLite (development)
- PostgreSQL (production)
- Charts: Chart.js for data visualization
- Deployment: Docker, Nginx, Gunicorn
- Cloud: Oracle Cloud Free Tier ready
- Python 3.10+
- pip (Python package manager)
- Virtual environment (recommended)
-
Clone the repository
git clone <your-repo-url> cd ECOM
-
Create and activate virtual environment
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Run migrations
python manage.py migrate
-
Create superuser
python manage.py createsuperuser
-
Run development server
python manage.py runserver
-
Access the application
- Main app: http://127.0.0.1:8000/
- Admin panel: http://127.0.0.1:8000/admin/
-
Build and run with Docker Compose
docker-compose up --build
-
Run migrations in container
docker-compose exec web python manage.py migrate
-
Create superuser in container
docker-compose exec web python manage.py createsuperuser
-
Copy environment template
cp .env.example .env
-
Configure environment variables
# Edit .env file with your production settings SECRET_KEY=your-secret-key DEBUG=False USE_POSTGRES=True DB_NAME=your_db_name DB_USER=your_db_user DB_PASSWORD=your_db_password DB_HOST=your_db_host
The application is configured for Oracle Cloud Free Tier deployment:
-
Docker Deployment
docker build -t ecom-inventory . docker run -p 8000:8000 ecom-inventory
-
With PostgreSQL
- Set up PostgreSQL database on Oracle Cloud
- Configure environment variables
- Run migrations:
python manage.py migrate
ECOM/
βββ accounts/ # User authentication and management
βββ clients/ # Client management
βββ inventory/ # Product and inventory management
βββ orders/ # Order processing and management
βββ reports/ # Analytics and reporting
βββ templates/ # HTML templates
βββ static/ # CSS, JS, images
βββ ecom_inventory/ # Main project settings
βββ requirements.txt # Python dependencies
βββ Dockerfile # Docker configuration
βββ docker-compose.yml # Docker Compose setup
βββ README.md # This file
/
- Redirects to login/accounts/
- Authentication (login, signup, dashboard)/inventory/
- Product management/orders/
- Order management/clients/
- Client management/reports/
- Analytics and reports/admin/
- Django admin panel
- Products are linked to users for multi-tenancy
- Automatic stock calculation (pieces_left = pieces_bought - pieces_sold)
- Stock validation during order creation
- Orders support multiple products with quantities
- Automatic client creation from order data
- Stock updates when orders are placed
- Status tracking through order lifecycle
- Real-time calculation of business metrics
- Interactive charts for data visualization
- Top products analysis
- Profit/loss tracking
- User data isolation
- CSRF protection
- SQL injection prevention
- XSS protection
- Secure password handling
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue on GitHub
- Check the documentation
- Review the code comments
- Mobile responsive design improvements
- REST API for mobile app integration
- Advanced reporting with date filtering
- Email notifications for orders
- Inventory alerts for low stock
- Barcode scanning support
- Multi-currency support