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.
- 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.
Prerequisites
- PHP >= 8.1
- Composer
- Node.js & npm
- MySQL or any other supported database Steps
- Clone the Repository:
git clone https://github.com/your-repo/inventory-management-system.git
cd inventory-management-system
- Install Dependencies:
composer install
npm install
npm run dev
- Set Up Environment: Copy the .env.example file to .env and configure your database and other environment variables:
cp .env.example .env
- Run Migrations and Seeders:
php artisan migrate --seed
- Serve the Application:
php artisan serve
Access the Application: Open your browser and navigate to http://localhost:8000.
Admin Panel
- Access the admin panel at /admin.
- Default credentials:
- Email: admin@example.com
- Password: password Tenant Management
- Each user can belong to multiple tenants.
- Tenant-specific settings and data are managed dynamically.
Key Modules
-
Purchases:
- Manage purchases with products, quantities, and prices.
- Automatically generate invoices.
-
Settings:
- Configure tenant-specific settings via the admin panel.
- Settings are grouped and dynamically rendered.
-
Double-Entry Bookkeeping:
- Automatically record journal entries for purchases, payments, and other financial operations.
- Integrated with the chart of accounts.
-
Balance Sheet:
- Generate a real-time balance sheet based on journal entries.
- Categorizes accounts into assets, liabilities, and equity.
-
Chart of Accounts:
- Manage accounts dynamically for financial operations.
- Predefined accounts for assets, liabilities, equity, revenue, and expenses.
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.
- Authentication
- Login:
POST /api/login
- Logout:
POST /api/logout
- Login:
- Purchases
- List Purchases:
GET /api/purchases
- Create Purchase:
POST /api/purchases
- View Purchase:
GET /api/purchases/{id}
- List Purchases:
- Settings
- Get Settings:
GET /api/settings
- Update Settings:
PUT /api/settings
- Get Settings:
Run Tests
php artisan test
Code Formatting
composer format
Linting
npm run lint
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Submit a pull request with a detailed description of your changes.
This project is licensed under the MIT License.
- Framework: Laravel
- Admin Panel: FilamentPHP
- Icons: Heroicons
- YouTube: @codedailly
For issues or questions, please open an issue on the GitHub repository.