This Laravel-based application serves as a comprehensive system for managing a supermarket’s online presence. It includes features such as product listings, category management, fee configuration, calendar events, user authentication/profiles, and export functionality. The project is built with Laravel, Bootstrap, and various third-party libraries.
- Landing Page: A welcoming page with featured products and a call-to-action to shop.
- Product Management: List, create, update, export (XLS/PDF), and delete products (with image carousel support).
- Category & Fee Management: Create, edit, filter, and delete categories and fees (protected by role permissions).
- Calendar Events: Manage calendar events (with fee application) and event scheduling.
- User Profiles: User authentication, profile editing, and secure access control using custom permission middleware.
- Export Capabilities: Export product data in XLS and PDF formats.
- PHP 8.0+
- Composer
- Node.js & NPM (for assets compilation if needed)
- MySQL, PostgreSQL, or any supported database
- Git
Follow these steps to set up the project on your local environment:
-
Clone the Repository
git clone https://github.com/MrGri00/supermarket-app.git cd <repository_directory>
-
Install Composer Dependencies
composer install
-
Install NPM Dependencies (Optional)
If you plan to modify frontend assets, install NPM packages:
npm install npm run dev
-
Create and Configure the Environment File
Copy the example environment file and configure your database and other settings:
cp .env.example .env
Open the
.env
file and update parameters likeDB_DATABASE
,DB_USERNAME
,DB_PASSWORD
, etc. -
Generate Application Key
php artisan key:generate
-
Run Database Migrations and Seeders
Ensure your database connection is set up correctly, then run:
php artisan migrate --seed
The seeders will create initial roles, categories, sample users, fees, and products along with product images.
-
Serve the Application
Start the Laravel development server:
php artisan serve
Visit http://localhost:8000 to view the application.
-
Authentication Setup
The application includes user authentication and access controls. You can register a new account or use seeded users (e.g., Customer, Employee, Admin) based on your testing requirements.
- Public Routes: Visitors can browse the landing page and view product listings.
- Restricted Routes: Users with the appropriate roles (e.g., employees) can manage categories, fees, and products.
- Calendar & Export Features: Authenticated users can manage calendar events and export product information.
Refer to the routes (located in the routes/web.php
file) for detailed endpoint structure and access permissions.
The project uses stock images for product placeholders. The current image attributions are as follows:
- stock_product_0.png = Producto iconos creados por toempong - Flaticon
- stock_product_1.png = Productos de limpieza iconos creados por Freepik - Flaticon
- stock_product_2.png = Productos de higiene iconos creados por smashingstocks - Flaticon
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to fork this repository and submit pull requests or issues if you find bugs or have feature requests.