7.3 KiB
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
- Navigate to Database Management (Admin only)
- Click "Create Backup"
- Backup files are saved in the
backups/folder with timestamps
Restore Database
- Select a backup file (.sqlite3 or .db)
- Confirm the restoration
- A safety backup is automatically created before restoration
Switching to PostgreSQL
To switch from SQLite to PostgreSQL:
- Install PostgreSQL adapter:
pip install psycopg2-binary
- 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',
}
}
- 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
- Navigate to Manufacturing → New Order
- Select product and enter quantity
- Add labor and overhead costs
- Save the order (automatically updates inventory)
Editing a Manufacturing Order
- Navigate to Manufacturing → Order List
- Click on the order to view details
- Click "Edit" button (admin/superuser only)
- Modify order details and save
Managing Inventory
- Go to Inventory → Products
- Add new products with categories and pricing
- Set minimum and maximum stock levels
- Monitor stock movements and alerts
Processing Sales
- Create sales order with customer details
- Add products with quantities and prices
- Apply discounts if applicable
- Update order status as it progresses
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- 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.