Skip to content

NewPyDev/ecom-inv-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Ecommerce Inventory Manager

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.

Features

πŸ” Authentication & User Management

  • 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

πŸ“¦ Inventory Management

  • 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 Management

  • 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

πŸ‘₯ Client Management

  • 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

πŸ“Š Reports & Analytics

  • 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

Technology Stack

  • 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

Installation & Setup

Prerequisites

  • Python 3.10+
  • pip (Python package manager)
  • Virtual environment (recommended)

Local Development Setup

  1. Clone the repository

    git clone <your-repo-url>
    cd ECOM
  2. Create and activate virtual environment

    python -m venv venv
    # On Windows
    venv\Scripts\activate
    # On macOS/Linux
    source venv/bin/activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Run migrations

    python manage.py migrate
  5. Create superuser

    python manage.py createsuperuser
  6. Run development server

    python manage.py runserver
  7. Access the application

Docker Development Setup

  1. Build and run with Docker Compose

    docker-compose up --build
  2. Run migrations in container

    docker-compose exec web python manage.py migrate
  3. Create superuser in container

    docker-compose exec web python manage.py createsuperuser

Production Deployment

Environment Configuration

  1. Copy environment template

    cp .env.example .env
  2. 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

Oracle Cloud Deployment

The application is configured for Oracle Cloud Free Tier deployment:

  1. Docker Deployment

    docker build -t ecom-inventory .
    docker run -p 8000:8000 ecom-inventory
  2. With PostgreSQL

    • Set up PostgreSQL database on Oracle Cloud
    • Configure environment variables
    • Run migrations: python manage.py migrate

Project Structure

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

API Endpoints

Main URLs

  • / - 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

Key Features Implementation

Inventory Management

  • Products are linked to users for multi-tenancy
  • Automatic stock calculation (pieces_left = pieces_bought - pieces_sold)
  • Stock validation during order creation

Order Processing

  • Orders support multiple products with quantities
  • Automatic client creation from order data
  • Stock updates when orders are placed
  • Status tracking through order lifecycle

Reporting System

  • Real-time calculation of business metrics
  • Interactive charts for data visualization
  • Top products analysis
  • Profit/loss tracking

Security Features

  • User data isolation
  • CSRF protection
  • SQL injection prevention
  • XSS protection
  • Secure password handling

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support and questions:

  • Create an issue on GitHub
  • Check the documentation
  • Review the code comments

Future Enhancements

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published