Skip to content

MrGri00/supermarket-app

Repository files navigation

Supermarket App

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.


Features

  • 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.

Requirements

  • PHP 8.0+
  • Composer
  • Node.js & NPM (for assets compilation if needed)
  • MySQL, PostgreSQL, or any supported database
  • Git

Installation and Setup Instructions

Follow these steps to set up the project on your local environment:

  1. Clone the Repository

    git clone https://github.com/MrGri00/supermarket-app.git
    cd <repository_directory>
  2. Install Composer Dependencies

    composer install
  3. Install NPM Dependencies (Optional)

    If you plan to modify frontend assets, install NPM packages:

    npm install
    npm run dev
  4. 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 like DB_DATABASE, DB_USERNAME, DB_PASSWORD, etc.

  5. Generate Application Key

    php artisan key:generate
  6. 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.

  7. Serve the Application

    Start the Laravel development server:

    php artisan serve

    Visit http://localhost:8000 to view the application.

  8. 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.


Usage

  • 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.


Stock Image Credits

The project uses stock images for product placeholders. The current image attributions are as follows:


License

This project is licensed under the MIT License. See the LICENSE file for details.


Contributing

Feel free to fork this repository and submit pull requests or issues if you find bugs or have feature requests.