Book Shop Management System (ERP)

Description
BookStoreApp is a full-featured Book Shop Management System (ERP) for bookshops, distributors, and educational-supply businesses. It covers the complete sales lifecycle - Order, Delivery Challan, Invoice, Payment - alongside real-time inventory, procurement, expenses, users and roles, notifications, activity logs, and printable PDF/XLSX reports.
The product ships as a Laravel 13 (PHP 8.3+) REST API backend and a Next.js 16 / React 19 / TypeScript frontend, connected over JWT-authenticated JSON endpoints. It works out of the box with SQLite (zero database setup) and is production-ready on MySQL or MariaDB.
Key highlights:
- Complete sales pipeline: Orders with auto-serial numbers and stock reservation, partial Delivery Challans, Invoices with due dates, and multi-invoice Payments with outstanding-balance tracking.
- Real-time inventory: an append-only transaction ledger as the single source of truth, covering current stock, per-book ledger, opening stock, adjustments, damage write-offs, reservations, and low-stock notifications.
- Purchasing and finance: purchase orders that auto stock-in on confirm, expenses with category and attachment upload, and a full audit trail.
- Rich master data: customers, suppliers, publishers, authors, categories, and books (with cover upload), all with search, filter, sort, pagination, and soft delete with restore.
- Role-based access: Admin, Manager, and Regular roles with per-module policies enforced server-side, plus JWT authentication with OTP password reset.
- Reports: printable PDF documents for Orders, Delivery Challans, Invoices, Payments, Purchases, and Stock, XLSX exports, and a Postman collection for every endpoint.
- 255 PHPUnit feature tests (787 assertions) included.
Demo login accounts: admin@example.com (Admin), manager@example.com (Manager), regular@example.com (Regular).
Features
Master data
- Customers, suppliers, publishers, authors, categories, and books (with cover upload)
- Search, filter, sort, and pagination everywhere
- Soft deletes with restore
Sales pipeline
- Orders: multi-item, serialized, source tracking, comments, status history, cancellation and RTO, stock reservation
- Delivery challans: partial delivery, item conversion tracking (confirmed to delivered)
- Invoices: auto-linked to deliveries, due dates, partial payments
- Payments: multi-invoice settlement, balance tracking, due-invoice autofill
Inventory
- Real-time current stock per book
- Per-book stock ledger with transaction history
- Stock reservations, auto re-allocated on cancel
- Opening stock, adjustments, damage entries (manager only)
- Low-stock in-app notifications
Purchasing and finance
- Purchase orders with supplier/publisher, auto stock-in on confirm, pending-order reallocation
- Expenses and expense categories with attachment upload
- Activity logs and audit trail across modules
Access and security
- JWT authentication, OTP password reset, profile and avatar management
- Role-based access (Admin, Manager, Regular) with per-module policy gates
Reporting
- Printable PDF reports: Orders, Delivery Challans, Invoices, Payments, Purchases, Stock
- XLSX exports for orders, purchases, stock, invoices, and payments
- Postman collection for every endpoint
Requirements
- PHP 8.3+ (8.4 tested) with extensions: bcmath, ctype, curl, dom, fileinfo, gd, mbstring, openssl, pdo_mysql/pdo_sqlite, tokenizer, xml, zip
- Composer 2
- Node.js 20+ and npm
- A database: SQLite works with zero setup; MySQL 5.7+/8.0 or MariaDB 10.4+ recommended for production
Instructions
Backend (API)
- cd backend
- composer install
- cp .env.example .env
- php artisan key:generate
- php artisan jwt:secret --force
- php artisan migrate --seed
- php artisan serve (API runs at http://localhost:8000/api)
.env.example defaults to SQLite and an empty database file ships with the package, so the app runs without any database server. To use MySQL instead, create a database, uncomment the MySQL lines in backend/.env, set your credentials, then run the migrate command again.
Frontend (UI)
- cd frontend
- cp .env.example .env.local and set NEXT_PUBLIC_API_URL
- npm install
- npm run dev (UI runs at http://localhost:3000)
Demo logins
- admin@example.com - Admin
- manager@example.com - Manager
- regular@example.com - Regular
| Author | ramchowdhury |
|---|---|
| Category | Scripts & Code / PHP Scripts / Management |
| Price | $24 |
| Extended License | $72 |
| Likes | 1 |
| First Release | Sep 24, 2026 |
| Last Update | Sep 24, 2026 |
| Database | MySQL 8.0, SQLite 3.x |
| Software framework | Next.js, Laravel |
| Javascript framework | React, Next.js |
| Programming language | PHP, JavaScript, TypeScript |
Categories
Tags
External listing. code.market does not sell this product and does not process payment for it. Pricing, payment, delivery, licensing, refunds, and support are handled by the third-party merchant on its own website. We may earn an affiliate commission from a referral. Details.