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.
- ✨ Key Features
- 🛠️ Tech Stack
- 📁 Project Structure
- ⚙️ Installation
- 🔧 Configuration
▶️ Running the App- 👤 Default Admin
- 📸 Screenshots
- 🔒 Permissions & Middleware
- 📄 License
- 🔐 Authentication & Roles — Laravel Breeze (Sanctum-ready), invite-only registration (single-use codes),
admin/uservia 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.
| 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 |
| barryvdh/laravel-dompdf | |
| Lint/QA | Laravel Pint, PHPStan |
```text app/ ├── Models/ ├── Http/ │ ├── Controllers/ │ ├── Requests/ │ └── Middleware/ ├── Policies/ database/ ├── migrations/ ├── seeders/ public/ resources/ ├── views/ │ ├── clients/ │ ├── suppliers/ │ ├── products/ │ ├── orders/ │ └── invoices/ routes/ ├── web.php └── api.php ```
- 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
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 serveOpen http://127.0.0.1:8000 in your browser and log in with the default admin credentials.
Docker Run
./vendor/bin/sail up -dor simplydocker compose up -dto spin up a full stack (PHP‑FPM, Nginx, MySQL, Mailhog) in containers.
| 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 |
php artisan serve # default http://127.0.0.1:8000Visit /login and use the default admin credentials below.
| Password | |
|---|---|
admin@example.com |
Admin123! |
(created by DatabaseSeeder; change immediately in production).
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 routescan:admin-only– gate for admin features- Blade directives:
@auth,@can,@role
This project is open‑source software licensed under the MIT license.
of course update links, images & variables to match your deployment.

















