Skip to content

Adrianowsski/ERP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Laravel 10 PHP 8.2 MySQL Docker Compose License: MIT

🚀 ERP App

A Laravel-powered ERP suite for managing Clients, Suppliers, Products, Orders, and Invoices — with role-based access, PDF invoicing, custom validation, and a modern Bootstrap 5 UI.


📌 Table of Contents


✨ Key Features

  • 🔐 Authentication & Roles — Laravel Breeze (Sanctum-ready), invite-only registration (single-use codes), admin / user via Gates/Policies.
  • 🤝 Clients & Suppliers — full CRUD, soft deletes, quick filters, unique NIP/email validation.
  • 📦 Products — supplier linkage, price history, CSV/Excel import/export.
  • 🛒 Orders — many-to-many order_product (qty, buy/sell price), subtotal & tax calculation.
  • 📄 PDF Invoices — one-click PDFs via barryvdh/laravel-dompdf, optional email attachment.
  • ✔️ Custom Validation — central FormRequest + reguły: NIP checksum, positive price/qty, max length, no future dates.
  • 🔍 Search & Filters — global search, sortable & paginated tables.
  • 📊 Admin Dashboard — KPI widgets, registration-code management, activity log.
  • 🧰 Developer Friendly — czysty MVC, serwisy, repozytoria, gotowy setup pod Docker.

🛠️ Tech Stack

Layer Technology
Framework Laravel 10 (PHP ≥ 8.2)
Database MySQL / MariaDB — Eloquent ORM
Auth Laravel Breeze, Gates & Policies
Frontend Blade, Bootstrap 5, Vite/ESBuild, Livewire-ready
PDF barryvdh/laravel-dompdf
Lint/QA Laravel Pint, PHPStan

📁 Project Structure

```text app/ ├── Models/ ├── Http/ │ ├── Controllers/ │ ├── Requests/ │ └── Middleware/ ├── Policies/ database/ ├── migrations/ ├── seeders/ public/ resources/ ├── views/ │ ├── clients/ │ ├── suppliers/ │ ├── products/ │ ├── orders/ │ └── invoices/ routes/ ├── web.php └── api.php ```

⚙️ Installation

🔑 Prerequisites

  • PHP 8.2+ with extensions: BCMath, Ctype, Fileinfo, JSON, Mbstring, OpenSSL, PDO, Tokenizer, XML
  • Composer v2
  • Node.js 18+ & npm
  • MySQL or MariaDB
  • Docker & Docker Compose for containerised local setup

🏃‍♂️ Quick start

git clone https://github.com/Adrioanowskii/erp-app.git
cd erp-app

# PHP dependencies
composer install --prefer-dist --no-dev

# Environment variables
cp .env.example .env
php artisan key:generate

# Database & seeders
php artisan migrate --seed

# Front‑end assets
npm install
npm run build

# Fire up the dev server
php artisan serve

Open http://127.0.0.1:8000 in your browser and log in with the default admin credentials.

Docker Run ./vendor/bin/sail up -d or simply docker compose up -d to spin up a full stack (PHP‑FPM, Nginx, MySQL, Mailhog) in containers.

🔧 Configuration

Variable Purpose
APP_NAME Branding shown in PDFs & navbar
MAIL_* SMTP credentials for invoice emails
DB_* Database connection strings
PDF_LOGO_PATH Path to logo used in invoices

▶️ Running the App

php artisan serve    # default http://127.0.0.1:8000

Visit /login and use the default admin credentials below.


👤 Default Admin

Email Password
admin@example.com Admin123!

(created by DatabaseSeeder; change immediately in production).


📸 Screenshots

# Screenshot Description
1 Welcome page with login/register
2 Registration form with invite code
3 Client-side validation
4 Login form
5 Server-side auth error
6 KPI cards for staff
7 Admin dashboard with code management
8 Client list CRUD
9 Single client details view
10 Supplier CRUD with filters
11 Product catalog
12 Add product form with validation
13 Order list with statuses
14 Create order with multiple products
15 Validation: order date cannot be in future
16 Invoice detail view with PDF button
17 Branded invoice PDF
18 Admin invite code management

🔒 Permissions & Middleware

Route::middleware(['auth'])->group(function () {
    Route::get('/dashboard', [DashboardController::class, 'index']);
    Route::resource('clients', ClientController::class);
    Route::resource('suppliers', SupplierController::class);
    Route::resource('products', ProductController::class);
    Route::resource('orders', OrderController::class);
    Route::resource('invoices', InvoiceController::class);

    Route::middleware('can:admin-only')->group(function () {
        Route::resource('registration-codes', RegistrationCodeController::class);
    });
});
  • auth – protects all routes
  • can:admin-only – gate for admin features
  • Blade directives: @auth, @can, @role

📄 License

This project is open‑source software licensed under the MIT license.


of course update links, images & variables to match your deployment.

About

**A Laravel-powered ERP suite** for managing Clients, Suppliers, Products, Orders and Invoices, complete with role-based access, PDF invoicing and a modern Bootstrap interface.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages