Skip to content

nteej/laravel-filament-inventory

Repository files navigation

Inventory Management System

This is a multi-tenant Inventory Management System built with Laravel and FilamentPHP. The system includes features such as purchase management, tenant-specific settings, double-entry bookkeeping, and a dynamic chart of accounts.

Features

  • Multi-Tenancy: Each tenant has its own settings, purchases, and journal entries.
  • Purchase Management: Manage purchases with product details, receipts, and invoices.
  • Double-Entry Bookkeeping: Automatically record financial transactions with proper debit and credit entries.
  • Chart of Accounts: Dynamically manage accounts for assets, liabilities, equity, revenue, and expenses. Balance Sheet: Generate a real-time balance sheet based on journal entries and chart of accounts.
  • Tenant-Specific Settings: Customize settings for each tenant with a user-friendly interface.
  • Filament PHP Integration: Leverages FilamentPHP for an elegant admin panel and resource management.

Installation

Prerequisites

  • PHP >= 8.1
  • Composer
  • Node.js & npm
  • MySQL or any other supported database Steps
  1. Clone the Repository:
git clone https://github.com/your-repo/inventory-management-system.git
cd inventory-management-system
  1. Install Dependencies:
composer install
npm install
npm run dev
  1. Set Up Environment: Copy the .env.example file to .env and configure your database and other environment variables:
cp .env.example .env
  1. Run Migrations and Seeders:
php artisan migrate --seed
  1. Serve the Application:
php artisan serve

Access the Application: Open your browser and navigate to http://localhost:8000.

Usage

Admin Panel

  • Access the admin panel at /admin.
  • Default credentials:
  • Each user can belong to multiple tenants.
  • Tenant-specific settings and data are managed dynamically.

Key Modules

  1. Purchases:

    • Manage purchases with products, quantities, and prices.
    • Automatically generate invoices.
  2. Settings:

    • Configure tenant-specific settings via the admin panel.
    • Settings are grouped and dynamically rendered.
  3. Double-Entry Bookkeeping:

    • Automatically record journal entries for purchases, payments, and other financial operations.
    • Integrated with the chart of accounts.
  4. Balance Sheet:

    • Generate a real-time balance sheet based on journal entries.
    • Categorizes accounts into assets, liabilities, and equity.
  5. Chart of Accounts:

    • Manage accounts dynamically for financial operations.
    • Predefined accounts for assets, liabilities, equity, revenue, and expenses.

Code Overview

Key Models

  • User: tenants():

    • Defines a BelongsToMany relationship with tenants.
  • Tenant:

    • Represents a tenant in the system.
  • Purchase:

    • Manages purchases and their associated products.
  • JournalEntry:

    • Handles double-entry bookkeeping.
  • ChartOfAccount:

    • Manages the chart of accounts for financial operations.
  • Setting:

    • Stores global settings.
  • TenantSetting:

    • Stores tenant-specific settings. Key Pages
  • Setting:

    • Dynamically renders tenant-specific settings grouped by categories.
  • BalanceSheet:

    • Generates a real-time balance sheet using journal entries and chart of accounts.

API Endpoints

  • Authentication
    • Login: POST /api/login
    • Logout: POST /api/logout
  • Purchases
    • List Purchases: GET /api/purchases
    • Create Purchase: POST /api/purchases
    • View Purchase: GET /api/purchases/{id}
  • Settings
    • Get Settings: GET /api/settings
    • Update Settings: PUT /api/settings

Development

Run Tests

php artisan test

Code Formatting

composer format

Linting

npm run lint

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Submit a pull request with a detailed description of your changes.

License

This project is licensed under the MIT License.

Credits

  • Framework: Laravel
  • Admin Panel: FilamentPHP
  • Icons: Heroicons
  • YouTube: @codedailly

Support

For issues or questions, please open an issue on the GitHub repository.

About

Laravel 12 based Filament 3.0 Inventory management system based on Multi Tenancay concept.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages