$ show shyamsitaula/samarium
Samarium is a modular, all-in-one business management system (ERP/CMS) built with Laravel 11 and Livewire 3. It provides a comprehensive admin dashboard for small to medium businesses, covering sales invoicing, purchase orders, expense tracking, inventory management, accounting (double-entry ledger, trial balance, income statement), customer/vendor relationship management, and a full content management system (webpages, posts, galleries, navigation menus, themes). It also includes e-commerce capabilities (product catalog, shopping cart, online orders), appointment booking, team management, calendar with Nepali date support, and additional modules like vacancies, testimonials, newsletters, and document/URL link management. The system is configurable via a module toggle in config/app.php and supports both a dashboard interface and a public-facing website. The architecture follows a standard Laravel MVC pattern with Livewire components handling all interactive UI. Each business domain has its own set of Livewire components (e.g., SaleInvoiceEditor, ProductDisplay) that use a shared ModesTrait for state management. A service layer provides pagination and CRUD logic, though many service methods are incomplete. The frontend uses Bootstrap 4, Font Awesome, and Chart.js for reporting. The system is Dockerized for easy deployment and includes seeders for demo data. While the codebase is functional and covers a wide feature set, it exhibits several quality issues: mixed namespaces (some models under App\, others under App\Models\), hardcoded values (VAT 13%, Nepali month arrays), incomplete features (many TODO comments, empty service methods), and code duplication (multiple similar Livewire components for editing fields). The Nepali calendar support is a distinctive feature but requires manual maintenance of hardcoded date ranges. Overall, Samarium is a solid, feature-rich ERP for its target audience but would benefit from refactoring and stricter coding standards.
The LLM identified 3 files worth highlighting for reuse:
A reusable trait for managing UI modes in Livewire components. Provides methods like enterMode(), exitMode(), and clearModes() to toggle between create, list, display, edit, and delete states. This pattern reduces boilerplate and enforces consistent state handling across dozens of components. It is self-contained and could be extracted into a package for any Livewire project needing multi-mode interfaces.
A trait that converts English dates to Nepali dates using hardcoded month arrays for years 2079-2083. It provides methods like getNepaliDateFromEnglishDate() and getMonthNameInNepaliFont(). While the data is manually maintained, the conversion logic is isolated and could be adapted for other calendar systems. It demonstrates a practical approach to supporting non-Gregorian calendars in a Laravel application.
A reusable Blade component for rendering consistent list views with slots for list info, heading row, body, and pagination. It is used across many dashboard modules (e.g., product list, customer list, expense list) and provides a uniform look and feel. The component is self-contained and could be extracted into a UI package for any Laravel application needing standardized list displays.