Simple IT Inventory Managment Software https://meitinv.waxnflaxnai.com
  • JavaScript 32.5%
  • CSS 27.5%
  • HTML 22.9%
  • Python 16.2%
  • Shell 0.5%
  • Other 0.4%
Find a file
2025-09-27 12:54:30 -04:00
django_it_inventory Maybe actually fixed 2025-09-21 20:57:42 -04:00
inventory Added Untested 2025-09-27 12:54:30 -04:00
IT-Inventory@87adbd1eb0 Start django branch 2025-09-20 18:38:42 -04:00
static IT IS REALLY GOOD! 2025-09-20 22:43:47 -04:00
staticfiles Fixed Admin dashboard? 2025-09-21 18:55:56 -04:00
templates/inventory Added Untested 2025-09-27 12:54:30 -04:00
.gitattributes Track db.sqlite3 with LFS 2025-09-21 12:18:42 -04:00
.gitignore accidentially synced db 2025-09-21 20:32:18 -04:00
deploy.bat Maybe actually fixed 2025-09-21 20:57:42 -04:00
deploy.sh Maybe actually fixed 2025-09-21 20:57:42 -04:00
manage.py IT IS REALLY GOOD! 2025-09-20 22:43:47 -04:00
README.md Update README.md 2025-09-21 10:34:57 -04:00
requirements.txt Maybe actually fixed 2025-09-21 20:57:42 -04:00
SECURITY_SETUP.md Added seperate secerets file for security 2025-09-21 10:28:05 -04:00
sync_db.sh accidentially synced db 2025-09-21 20:32:18 -04:00

Django IT Inventory Management System

A comprehensive IT asset management system built with Django and SQLite, converted from the original Flask/Supabase application.

⚠️ AI-Generated Disclaimer: This application was created with the assistance of AI technology. While the code has been partially reviewed and tested, please ensure it meets your specific security and operational requirements before production use.

🔒 Security Setup

IMPORTANT: This application requires proper security configuration for production use. Please read the SECURITY_SETUP.md guide before deploying.

Quick Security Checklist:

  • Create secrets.txt file on your server
  • Generate a new SECRET_KEY for production
  • Set DEBUG=False for production
  • Configure ALLOWED_HOSTS with your domain
  • Use a production database (PostgreSQL/MySQL)
  • Enable HTTPS/SSL
  • Set proper file permissions (chmod 600 secrets.txt)

Features

  • Asset Management: Complete CRUD operations for IT assets
  • Collections: Organize assets into custom collections
  • Checkout/Checkin: Track asset assignments and returns
  • Search & Filtering: Advanced search across all asset fields
  • Statistics Dashboard: Real-time inventory statistics
  • Responsive Design: Works on desktop and mobile devices
  • Dark Mode: Toggle between light and dark themes
  • Django Admin: Full administrative interface

Quick Start

Prerequisites

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

Installation

  1. Clone or download the project

    cd Django-IT-Inventory
    
  2. Install dependencies

    pip install -r requirements.txt
    
  3. Run migrations

    python manage.py migrate
    
  4. Populate with sample data (optional)

    python manage.py populate_db
    
  5. Start the development server

    python manage.py runserver
    
  6. Access the application

    • Open your browser and go to http://localhost:8000
    • Login with: admin / admin123

Configuration

Secrets File Template

Create a secrets.txt file in your project root with the following template. Replace the placeholder values with your actual configuration:

# Django IT Inventory - Secrets Configuration
# Copy this template to secrets.txt and fill in your values

# Django Secret Key (REQUIRED)
# Generate a new secret key: python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
SECRET_KEY=your-secret-key-here

# Debug Mode (REQUIRED)
# Set to False for production
DEBUG=True

# Allowed Hosts (REQUIRED for production)
# Add your domain(s) separated by commas
ALLOWED_HOSTS=localhost,127.0.0.1,yourdomain.com

# Database Configuration (OPTIONAL)
# Default uses SQLite. For production, use PostgreSQL or MySQL
# DATABASE_ENGINE=django.db.backends.postgresql
# DATABASE_NAME=your_db_name
# DATABASE_USER=your_db_user
# DATABASE_PASSWORD=your_db_password
# DATABASE_HOST=localhost
# DATABASE_PORT=5432

# Email Configuration (OPTIONAL)
# EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
# EMAIL_HOST=smtp.gmail.com
# EMAIL_PORT=587
# EMAIL_USE_TLS=True
# EMAIL_HOST_USER=your-email@gmail.com
# EMAIL_HOST_PASSWORD=your-app-password

# Static Files Configuration (OPTIONAL)
# STATIC_ROOT=/path/to/static/files
# MEDIA_ROOT=/path/to/media/files

# Security Settings (RECOMMENDED for production)
# SECURE_SSL_REDIRECT=True
# SECURE_HSTS_SECONDS=31536000
# SECURE_HSTS_INCLUDE_SUBDOMAINS=True
# SECURE_HSTS_PRELOAD=True
# SECURE_CONTENT_TYPE_NOSNIFF=True
# SECURE_BROWSER_XSS_FILTER=True
# X_FRAME_OPTIONS=DENY

Important Security Notes:

  • Never commit secrets.txt to version control
  • Generate a unique SECRET_KEY for each environment
  • Set DEBUG=False for production
  • Configure ALLOWED_HOSTS with your actual domain(s)
  • Use strong passwords and secure database credentials

Default Login Credentials

  • Username: admin
  • Password: admin123

Project Structure

Django-IT-Inventory/
├── django_it_inventory/          # Django project settings
├── inventory/                    # Main inventory app
│   ├── models.py                 # Database models
│   ├── views.py                  # View functions
│   ├── urls.py                   # URL routing
│   ├── admin.py                  # Admin interface
│   └── management/               # Custom management commands
├── templates/                    # HTML templates
│   └── inventory/
├── static/                       # Static files (CSS, JS, images)
├── db.sqlite3                    # SQLite database
└── requirements.txt              # Python dependencies

Key Features

Asset Management

  • Add, edit, delete, and duplicate assets
  • Automatic asset code generation (2 letters + 2 numbers)
  • Support for all major IT asset categories
  • Track serial numbers, models, manufacturers
  • Warranty expiration tracking
  • Asset condition monitoring

Collections

  • Create custom collections to organize assets
  • Assign assets to collections
  • View collection statistics

Checkout/Checkin System

  • Check out assets to users
  • Check in returned assets
  • Track assignment history

Search & Filtering

  • Real-time search across all fields
  • Filter by category, status, collection
  • Sort by various criteria
  • Grid and list view options

Statistics Dashboard

  • Total assets count
  • Available vs. taken assets
  • Maintenance items
  • Warranty expiring soon alerts

API Endpoints

The application provides REST API endpoints for AJAX operations:

  • GET /inventory/api/collections/ - List collections
  • POST /inventory/api/collections/ - Create collection
  • DELETE /inventory/api/collections/{id}/ - Delete collection
  • GET /inventory/api/asset/{code}/ - Get asset details
  • POST /inventory/api/asset/ - Create asset
  • PUT /inventory/api/asset/{code}/ - Update asset
  • DELETE /inventory/api/asset/{code}/ - Delete asset
  • POST /inventory/api/checkout/{code}/ - Check out asset
  • POST /inventory/api/checkin/{code}/ - Check in asset

Database Models

Inventory Model

  • asset_code (Primary Key): Unique identifier
  • name: Asset name
  • category: Asset category (Desktop, Laptop, etc.)
  • serial_number: Serial number
  • model: Model name
  • manufacturer: Manufacturer
  • status: Current status (Available, Taken, etc.)
  • location: Physical location
  • assigned_to: Assigned user
  • purchase_date: Date of purchase
  • warranty_expires: Warranty expiration date
  • condition: Asset condition
  • notes: Additional notes
  • collection: Associated collection

Collection Model

  • name: Collection name
  • created_at: Creation timestamp
  • updated_at: Last update timestamp

Customization

Adding New Asset Categories

Edit the CATEGORY_CHOICES in inventory/models.py:

CATEGORY_CHOICES = [
    ('Desktop', 'Desktop'),
    ('Laptop', 'Laptop'),
    # Add your categories here
    ('New Category', 'New Category'),
]

Modifying Asset Statuses

Edit the STATUS_CHOICES in inventory/models.py:

STATUS_CHOICES = [
    ('Available', 'Available'),
    ('Taken', 'Taken'),
    # Add your statuses here
    ('New Status', 'New Status'),
]

Production Deployment

⚠️ SECURITY FIRST: Before deploying to production, you MUST follow the security setup guide.

Essential Security Steps:

  1. Read SECURITY_SETUP.md - Complete security guide
  2. Create secrets.txt on your server with production values
  3. Generate new SECRET_KEY - Never use the default!
  4. Set DEBUG=False in your secrets file
  5. Configure ALLOWED_HOSTS with your domain
  6. Set up production database (PostgreSQL recommended)
  7. Enable HTTPS/SSL certificates
  8. Set proper file permissions (chmod 600 secrets.txt)

Additional Production Considerations:

  • Configure static file serving (nginx/Apache)
  • Set up database backups
  • Monitor application logs
  • Keep Django and dependencies updated
  • Use a reverse proxy for better security

Support

For help or questions, contact: it@twinoaks.org

License

© 2025 Twin Oaks Community

This software is provided as-is for educational and community use. Twin Oaks Community retains all rights to this software.