Inventory-Management-System Tailwind Templates

Inventory Management System

Inventory Management System developed with Django | Django REST API for backend and Vite | React | Tailwind Css for frontend

Python IDLE Django DRF JWT Postgres Vite React Tailwind Axios NodeJS

šŸš€ Inventory Management System

šŸ“¦ A Full-Stack Inventory Management Solution with šŸ” User Authentication and Authorization. ✨ Built with Django | Django REST Framework for the backend and Vite | React | Tailwind CSS for the frontend. Fully ⚔ Optimized Code with šŸ“± Fully Responsive.

Tech Stack

🌟 Key Features

šŸ” Authentication & Security

  • šŸ‘¤ User Registration - Create new accounts with validation
  • šŸ”‘ JWT Authentication - Secure login/logout system
  • šŸ›”ļø Role-Based Access - Protected routes & endpoints
  • šŸ”’ CSRF Protection - Enhanced security against Cross-Site Request Forgery attacks

šŸ“¦ Product Management

  • šŸ†• CRUD Operations - Add/Edit/View/Delete products
  • šŸ·ļø Smart Categorization - Organize with nested categories
  • šŸ“Š Real-Time Inventory - Track stock levels & alerts

šŸ’¼ Business Operations

  • šŸ‘„ Customer Management - Track purchases & history
  • šŸ­ Supplier Integration - Manage procurement workflow
  • šŸ’° Sales & Purchases - Complete transaction tracking

šŸ› ļø Advanced Functionality

  • šŸ” Powerful Search - Filter products by multiple criteria
  • šŸ“ˆ Reporting Dashboard - Visualize sales & inventory data
  • šŸ“± Mobile-Friendly - Works flawlessly on all devices

šŸŽÆ Performance & SEO

  • šŸ“± Mobile-First Design - Optimized for all devices
  • šŸš€ SEO Optimized - Enhanced meta tags and semantic HTML
  • šŸ“Š Performance Metrics - Optimized loading times and Core Web Vitals
  • šŸ” Search Engine Friendly - Improved crawlability and indexing

šŸ”„ Tech Stack

šŸ—ļø Backend

  • šŸ Python: Programming language.
  • šŸŽÆ Django: Web framework.
  • šŸ”„ Django REST Framework (DRF): For building RESTful APIs.
  • šŸ” JWT Authentication: Secure user authentication.

šŸŽØ Frontend

  • ⚔ Vite: Fast build tool for React.
  • āš›ļø React: JavaScript library for building user interfaces.
  • šŸŽØ Tailwind CSS: Utility-first CSS framework for styling.
  • šŸ”„ Axios: For making HTTP requests to the backend.

šŸš€ Quick Start

šŸ“‹ Prerequisites

  • Python 3.10+
  • Node.js 16+
  • PostgreSQL 12+

Backend Setup

  1. Clone the repository:
git clone https://github.com/kevinThulnith/Inventory-Management-System.git
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: .\venv\Scripts\activate
  1. Install dependencies:
  • install postgressSQL and c++ buid tool first.
pip install -r requirements.txt
  1. Run migrations:
python manage.py migrate
  1. Start the Django development server:
python manage.py runserver

āž”ļø Backend runs at http://localhost:8000

Frontend Setup

  1. Navigate to the frontend directory:
cd ../frontend
  1. Install dependencies:
npm i
  1. Start the Vite development server:
npm run dev

āž”ļø Frontend runs at http://localhost:3000

🌐 To Host on Local Network

  1. Get device Ip address
ipconfig getifaddr en0 // in windows ipconfig
  1. Start bachend
py .\manage.py runserver <Device Ip address>:8000
  1. Start frontend

    • change .env file fist
npx vite --host {Device Ip Address}

Configuration: āš™ļø

  • Database: Configure your database settings in backend/inventory/settings.py. You can use SQLite (default, good for development) or PostgreSQL, MySQL, etc. for production.
  • Environment Variables: Consider using environment variables (e.g., using python-dotenv) for sensitive information like secret keys and database credentials. Don't commit these to your repository! 🤫
  • API Base URL: Update the API base URL in your frontend React components to point to your Django backend (usually http://localhost:8000).

šŸ“‚ Project Structure

šŸ“¦ inventory-management-system
ā”œā”€ā”€ šŸ“‚ backend             # Django REST API
│   ā”œā”€ā”€ šŸ“‚ core            # Main app (settings, models, views)
│   ā”œā”€ā”€ šŸ“‚ products        # Product & Category logic
│   ā”œā”€ā”€ šŸ“‚ customers       # Customer management
│   ā”œā”€ā”€ šŸ“‚ suppliers       # Supplier management
│   ā”œā”€ā”€ šŸ“‚ sales           # Sales tracking
│   └── šŸ“‚ purchases       # Purchase tracking
│
ā”œā”€ā”€ šŸ“‚ frontend            # React Frontend
│   ā”œā”€ā”€ šŸ“‚ src
│   │   ā”œā”€ā”€ šŸ“‚ components  # Reusable UI components
│   │   ā”œā”€ā”€ šŸ“‚ pages       # Page components
│   │   ā”œā”€ā”€ šŸ“‚ hooks       # Custom React hooks
│   │   └── šŸ“‚ api        # API service functions
│   └── vite.config.js     # Vite configuration
│
└── šŸ“œ README.md           # You're here!

šŸ” Authentication Flow

  • Register api/user/register/ : Users can create an account by providing their details.
  • Login api/token/ : Users log in with their credentials and receive an authentication token.
  • Protected Routes: Only authenticated users can access product management features.
  • Logout api/token/blacklist/ : Users can log out, and their token is invalidated.

šŸ”— API Endpoints:

The backend provides a RESTful API using Django REST Framework. You can access the API documentation at http://localhost:8000/api/ (or the correct port for your development server) after running the Django server. Example endpoints:

  • /api/categories/ (GET, POST, PUT, DELETE)
  • /api/customers/ (GET, POST, PUT, DELETE)
  • /api/suppliers/ (GET, POST, PUT, DELETE)
  • /api/products/ (GET, POST, PUT, DELETE)
  • /api/sales/ (GET, POST, PUT, DELETE)
  • /api/purchases/ (GET, POST, PUT, DELETE)
  • /api/token/ (POST) - Obtain JWT token
  • /api/token/refresh/ (POST) - Refresh JWT token

Security Headers

X-CSRFToken: <csrf-token>
Authorization: Bearer <jwt-token>

šŸš€ Configuration Steps

CSRF Setup

  1. Include CSRF token in HTML template:
<meta name="csrf-token" content="{{ csrf_token }}" />
  1. Add to API requests:
axios.defaults.headers.common["X-CSRFToken"] = getCookie("csrftoken");

SEO Configuration

  1. Update meta tags in index.html:
<meta name="description" content="Your description" />
<meta name="keywords" content="inventory, management, system" />
  1. Configure social media tags:
<meta property="og:title" content="Your Title" />
<meta property="og:description" content="Your Description" />

šŸ›”ļø Security Features

CSRF Protection

  • Django's built-in CSRF middleware for form protection
  • Custom CSRF token handling for API requests
  • Secure cookie handling and validation
  • Protection against cross-site request forgery attacks

SEO Implementation

  • Custom meta tags for better search engine visibility
  • OpenGraph and Twitter Card meta tags for social sharing
  • Semantic HTML structure for better accessibility
  • Optimized page titles and descriptions
  • Mobile-friendly responsive design

šŸ’” Why Choose This Project?

  • šŸš€ Modern Stack - Cutting-edge technologies
  • šŸ“ˆ Scalable Architecture - Ready for growth
  • šŸŽØ Beautiful UI - Tailwind-powered design
  • šŸ”„ Real-Time Updates - Instant data reflection
  • šŸ“± Mobile-Ready - Perfect for all devices

šŸ¤ Contributing

We ā¤ļø contributions! Here's how:

  1. šŸ“ Fork the repository
  2. 🌿 Create a branch (git checkout -b feature/amazing-feature)
  3. šŸ’¾ Commit changes (git commit -m 'Add amazing feature')
  4. šŸ“¤ Push to branch (git push origin feature/amazing-feature)
  5. šŸ”€ Open a Pull Request

Show Your Support: ā¤ļø

If you find Inventory Management System helpful, please consider:

  • Starring the repository on GitHub! ⭐
  • Sharing it with your network.
  • Contributing to the project.

Happy Coding! šŸŽ‰šŸ‘Øā€šŸ’»šŸ‘©ā€šŸ’»

Top categories

Loading Svelte Themes