Skip to content

fajarghifar/inventory-management-system

Repository files navigation

✨ Inventory Management System

A robust Inventory Management System built with Laravel 10 and MySQL, designed to streamline your inventory tracking, sales, and purchasing processes.

Dashboard

🗂️ Database Design

The system is structured using a clear and efficient database schema:

Database Diagram

🌟 Key Features

  • POS (Point of Sale)
  • Orders
    • Pending Orders
    • Complete Orders
    • Pending Payments
  • Purchases
    • All Purchases
    • Approval Process
    • Purchase Reports
  • Products Management
  • Customer Records
  • Supplier Management

🚀 Quick Start

Follow these steps to set up the project locally:

  1. Clone the repository:

    git clone https://github.com/fajarghifar/inventory-management-system
  2. Navigate to the project folder:

    cd inventory-management-system
  3. Install PHP dependencies:

    composer install
  4. Copy .env configuration:

    cp .env.example .env
  5. Generate application key:

    php artisan key:generate
  6. Configure the database in the .env file with your local credentials.

  7. Run database migrations and seed sample data:

    php artisan migrate:fresh --seed
  8. Link storage for media files:

    php artisan storage:link
  9. Install JavaScript and CSS dependencies:

    npm install && npm run dev
  10. Start the Laravel development server:

    php artisan serve
  11. Login using the default admin credentials:

    • Email: admin@admin.com
    • Password: password

🐋 Docker set up

With Docker, you can easily start both the app and MySQL database without needing to install anything locally.

In the docker-compose.yml file, you’ll find the configuration for MySQL.

Note: The app uses the environment variables from .env.example.docker. If you want to change any configurations in this environment file, create a new .env file, make your changes, and then rebuild the Docker image.

To pull and run the Docker images:

This command will pull the mysql:5.7 and inert/laravel-app images and start the containers:

Note: You don't need to have the repository on your local machine, you just need the docker-compose.yml file and run:

docker-compose up -d

Once the containers are up, the app will be available at http://localhost:8000/.

To build the Docker image after code changes:

If you’ve made changes to the code and want to update the Docker image, use the following command:

Note: This command will reset your database. Make sure to back it up.

docker build -t inert/laravel-app .

To tag the Docker image:

docker tag inert/laravel-app inert/laravel-app:"tagname"

To push the Docker image:

docker push inert/laravel-app:"tagname"

💾 Backup the Database to a Safe Location

"In case you delete the MySQL Docker container by mistake"

To export the database from the Docker container and save it to your desktop:

Note: Change the path to your own.

powershell

docker exec mysql-db mysqldump -u root -p'examplepassword' inventory_management_system > "C:\Users\User\Desktop\backup.sql"

To import the database from the desktop back into the Docker container:

powershell

Get-Content "C:\Users\User\Desktop\backup.sql" | docker exec -i mysql-db mysql -u root -p'examplepassword' inventory_management_system

To clean the database, remove example data, and create a new admin with a fresh database, run:

docker exec -it laravel-app bash
php artisan migrate:fresh
php artisan tinker
use App\Models\User;
User::create([
    'name' => 'Super Admin',                // edit this
    'username' => 'name',
    'email' => 'email@email.al',            // edit this
    'password' => bcrypt('password'),       // edit this
    'role' => 'admin',
]);

🔧 Configuration

Configuring Cart Settings:

  • To customize tax rates, number formatting, and more, open ./config/cart.php.
  • For more details, check out the hardevine/shoppingcart package.

💡 Contributing

Have ideas to improve the system? Feel free to:

  • Submit a Pull Request (PR)
  • Create an Issue for feature requests or bugs

📄 License

Licensed under the MIT License.


Find me on GitHub  ·  YouTube  ·  Instagram  ·  LinkedIn


About

✍Building an Inventory Management System with Laravel 10.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published