StocksX
# π¦ StockX β Stocks Management System **StockX** is a powerful and intuitive inventory management solution built with **Laravel** and **FilamentPHP**, designed to streamline your stock, orders, suppliers, and user rolesβall in one place. Whether you're managing a warehouse, a small business, or a large-scale operation, StockX provides all the tools you need to keep your inventory under control. ## π Key Features ### π¦ Inventory Management - **Product Categories** β Create, update, soft-delete, and manage product categories. - **Suppliers** β Maintain supplier records with full CRUD capabilities. - **Products** β Track products with key details like quantity, supplier, pricing, and category. ### π Order Management - **Order Handling** β Create and manage orders with automatic stock validation and dynamic inventory updates. - **Stock Validation** β Ensure product availability during order processing. - **Low Stock Alerts** β Email notifications when stock dips below a set threshold. ### π₯ User & Role Management - **User Admin** β Create, edit, and manage users with role assignments. - **Role-Based Access Control (RBAC)** β Fine-tuned permission handling with **Filament Shield**. ### π Notifications - **Low Stock Emails** β Automatic alerts to notify admins when stock is low. ### π Dashboard & Analytics - **Interactive Charts** β Visualize sales and inventory trends. - **Quick Stats** β Glance at total users, products, orders, and alerts. ### π§ Global Search - **Smart Search** β Look up products, orders, and suppliers with rich result details. - **Quick Navigation** β Jump straight to the itemβs page from search results. ### π Filters & Tabs - **Order Filters** β Filter by custom timeframes like today, this week, or this year. - **Supplier Tabs** β Organize suppliers by product categories. ### π Authentication & Security - **Secure Login** β Full auth system with email verification. - **Permissions System** β Restrict access by user roles for enhanced security. ## πΌοΈ Screenshots Hereβs a quick peek at what StockX looks like in action: - **Dashboard** .png) .png) - **Products** .png) .png) - **Orders** .png)  - **Create Order** .png) - **Roles** .png) - **Edit Role** .png) - **Email Notification (Low Stock)**  ## βοΈ Deployment Guide ### π Prerequisites You only need **Docker** and **Docker Compose** installed on your system. All other dependencies (PHP, Composer, Node.js, MySQL, etc.) are handled inside containers. - **Docker** β₯ 20.10 - **Docker Compose** β₯ 1.29 > If you prefer manual installation, see the [Manual Setup](#manual-setup) section below. ### π³ Docker Deployment (Recommended) #### 1. Clone the Repository ```bash git clone https://github.com/abogo-nono/StocksX.git cd StocksX ``` #### 2. Copy and Configure Environment Variables ```bash cp .env.example .env # Edit .env as needed (DB, mail, etc.) ``` #### 3. Build and Start the Containers ```bash docker-compose up --build -d ``` - This will build the app container, set up MySQL, and run all necessary services. - All dependencies are installed automatically inside the containers. #### 4. Run Migrations, Seeders, and Setup Commands ```bash docker-compose exec app php artisan migrate --seed docker-compose exec app php artisan storage:link docker-compose exec app php artisan make:filament-user docker-compose exec app php artisan shield:install --fresh docker-compose exec app php artisan shield:generate --all docker-compose exec app php artisan shield:super-admin --user=1 ``` #### 5. Access the Application - Visit [http://localhost:9000](http://localhost:9000) (or the port you mapped) --- ### π οΈ Manual Setup (For Development/Advanced Users) If you want to run the app without Docker, follow these steps: #### Prerequisites - **PHP** β₯ 8.2 - **Composer** β₯ 2.3 - **Node.js** β₯ 18.8 - **NPM** β₯ 8.18 - **MySQL** β₯ 8.0 - **Mailpit** β For testing email notifications #### Installation Steps 1. Install dependencies: ```bash composer install npm install ``` 2. Build frontend assets: ```bash npm run build ``` 3. Set up `.env` and database as described above. 4. Run migrations, seeders, and setup commands as above. 5. Start the Laravel server: ```bash php artisan serve ``` 6. (Optional) Start Vite dev server for hot reload: ```bash npm run dev ``` <!-- ## π Repository Traffic --> <!-- - **Stars:**  - **Forks:**  --> ## π€ Feedback & Contributions Weβd love to hear your thoughts! - π Found a bug? [Open an issue](https://github.com/abogo-nono/StocksX/issues) - π Got a feature idea? Share it or [submit a pull request](https://github.com/abogo-nono/StocksX/pulls) ## π License This project is open-source and available under the **[MIT License](LICENSE)**.