Go to file
2025-08-19 19:06:26 +07:00
.venv add more features, bug fix, update readme 2025-08-18 16:04:56 +07:00
backups fix many bugs and adding some features: user management, profile editing, localization to Indonesia 2025-08-18 10:14:17 +07:00
build/start_server fix many bugs 2025-08-19 12:28:49 +07:00
core fix many bugs 2025-08-19 12:28:49 +07:00
dist fix many bugs 2025-08-19 12:28:49 +07:00
inventory fix bugs 2025-08-19 19:06:26 +07:00
manufacture fix bugs 2025-08-19 19:06:26 +07:00
manufacture_app fix many bugs 2025-08-19 12:28:49 +07:00
purchase fix bugs 2025-08-19 19:06:26 +07:00
sales fix bugs 2025-08-19 19:06:26 +07:00
templates fix bugs 2025-08-19 19:06:26 +07:00
users fix bugs 2025-08-19 19:06:26 +07:00
.env fix many bugs and adding some features: user management, profile editing, localization to Indonesia 2025-08-18 10:14:17 +07:00
.gitignore add git ignore file 2025-08-18 16:37:23 +07:00
db.sqlite3 fix bugs 2025-08-19 19:06:26 +07:00
manage.py first commit 2025-08-17 21:42:40 +07:00
README.md fix many bugs 2025-08-19 12:28:49 +07:00
requirements.txt first commit 2025-08-17 21:42:40 +07:00
setup.py first commit 2025-08-17 21:42:40 +07:00
start_server.py fix many bugs 2025-08-19 12:28:49 +07:00
start_server.spec fix many bugs 2025-08-19 12:28:49 +07:00

Manufacturing App

A comprehensive Django-based manufacturing management application with modern UI, user permissions, and database management capabilities.

Features

🏭 Core Manufacturing

  • Simple Manufacturing Orders: Input end product results without complex BOM requirements
  • Production Tracking: Monitor daily, weekly, and monthly production metrics
  • Cost Management: Track labor and overhead costs for manufacturing orders
  • Edit/Delete Orders: Admin/superuser can edit or delete manufacturing orders

📦 Inventory Management

  • Product Management: Complete product catalog with categories, pricing, and stock levels
  • Stock Movements: Track all inventory movements (in/out, adjustments, sales, purchases)
  • Low Stock Alerts: Automatic notifications for products below minimum stock levels

🛒 Purchase Management

  • Supplier Management: Comprehensive supplier database with ratings and contact information
  • Purchase Orders: Create and track purchase orders with multiple items
  • Receipt Management: Track received goods and update inventory automatically

💰 Sales Management

  • Customer Management: Customer database with different types (retail, wholesale, corporate)
  • Sales Orders: Create sales orders with discounts and shipping costs
  • Delivery Tracking: Monitor order status and delivery progress

👥 User Management

  • Group-Based Access: Users assigned to groups with specific permissions
  • Permission System: Granular permissions for different modules
  • User Groups: Custom permission groups for team management (one group per user)
  • Dashboard Access: Controlled access to dashboard based on permissions

📊 Dashboard & Reporting

  • Real-time Dashboard: Live production, sales, and purchase statistics
  • Charts & Graphs: Visual representation of key metrics using Chart.js
  • Profit/Loss Analysis: Simple profit margin calculations
  • Inventory Turnover: Track stock movement patterns

🗄️ Database Management

  • Backup & Restore: Full database backup and restoration capabilities
  • Database Duplication: Create copies for testing and development
  • SQLite Support: Currently uses SQLite (easily switchable to PostgreSQL)

Technology Stack

  • Backend: Django 4.2.7
  • Database: SQLite (PostgreSQL ready)
  • Frontend: Bootstrap 5, Chart.js
  • Authentication: Django's built-in auth with custom user model
  • Forms: Django Crispy Forms with Bootstrap 5 styling

Installation & Setup

Prerequisites

  • Python 3.8 or higher
  • pip (Python package installer)

1. Clone the Repository

git clone <repository-url>
cd basic_manufacture_app

2. Create 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. Environment Configuration

Create a .env file in the project root:

SECRET_KEY=your-secret-key-here
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1

5. Database Setup

# Create database tables
python manage.py makemigrations
python manage.py migrate

# Create superuser
python manage.py createsuperuser

6. Run the Application

python manage.py runserver

The application will be available at http://127.0.0.1:8000/

User Types & Permissions

Users are now managed through groups with specific permissions. Each user can belong to only one group.

🦸 Superuser

  • Access to all modules and features
  • User and group management
  • Database management capabilities
  • System configuration

User Groups

The system includes the following default groups with predefined permissions:

  • Administrators: Full access to all modules
  • Managers: Manufacturing, inventory, purchase, and sales access with reporting
  • Operators: Manufacturing operations, inventory management, and sales operations
  • Viewers: Read-only access to reports and dashboard

Database Management

Backup Database

  1. Navigate to Database Management (Admin only)
  2. Click "Create Backup"
  3. Backup files are saved in the backups/ folder with timestamps

Restore Database

  1. Select a backup file (.sqlite3 or .db)
  2. Confirm the restoration
  3. A safety backup is automatically created before restoration

Switching to PostgreSQL

To switch from SQLite to PostgreSQL:

  1. Install PostgreSQL adapter:
pip install psycopg2-binary
  1. Update settings.py:
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'your_db_name',
        'USER': 'your_db_user',
        'PASSWORD': 'your_db_password',
        'HOST': 'localhost',
        'PORT': '5432',
    }
}
  1. Run migrations:
python manage.py migrate

Project Structure

basic_manufacture_app/
├── manufacture_app/          # Main Django project
│   ├── settings.py          # Project settings
│   ├── urls.py              # Main URL configuration
│   └── wsgi.py              # WSGI configuration
├── core/                     # Core app (dashboard, database management)
├── users/                    # User management app
├── inventory/                # Inventory management app
├── manufacture/              # Manufacturing app
├── purchase/                 # Purchase management app
├── sales/                    # Sales management app
├── templates/                # HTML templates
├── static/                   # Static files (CSS, JS, images)
├── requirements.txt          # Python dependencies
└── README.md                # This file

Usage Examples

Creating a Manufacturing Order

  1. Navigate to Manufacturing → New Order
  2. Select product and enter quantity
  3. Add labor and overhead costs
  4. Save the order (automatically updates inventory)

Editing a Manufacturing Order

  1. Navigate to Manufacturing → Order List
  2. Click on the order to view details
  3. Click "Edit" button (admin/superuser only)
  4. Modify order details and save

Managing Inventory

  1. Go to Inventory → Products
  2. Add new products with categories and pricing
  3. Set minimum and maximum stock levels
  4. Monitor stock movements and alerts

Processing Sales

  1. Create sales order with customer details
  2. Add products with quantities and prices
  3. Apply discounts if applicable
  4. Update order status as it progresses

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 in the repository
  • Contact the development team
  • Check the documentation

Roadmap

  • Advanced BOM (Bill of Materials) support
  • Work order scheduling
  • Quality control management
  • Advanced reporting and analytics
  • Mobile application
  • API endpoints for external integrations
  • Multi-warehouse support
  • Advanced forecasting tools

Note: This is a basic manufacturing application designed for simplicity and ease of use. For complex manufacturing operations, consider additional features like BOM management, work order scheduling, and quality control systems.