polinema-smt6-psi-uas Svelte Themes

Polinema Smt6 Psi Uas

Aplikasi POS dan management inventory menggunakan MySQL, Laravel, Inertia, Svelte

E-Canteen

Introduction

The E-Canteen project is a web application developed using Laravel and Inertia.js with Svelte. It aims to provide a convenient and efficient way for users to order food from a canteen online.

Features

  • User Registration and Authentication: Users can create an account and log in to access the application.
  • Menu Display: The application displays the available food items and their prices.
  • Cart Management: Staff can add items to their cart, view the cart, and proceed to checkout.
  • Order History: Staff can view their past orders.
  • Admin Panel: Administrators have access to an admin panel to manage user accounts.

Technologies Used

  • Laravel: A PHP framework used for backend development.
  • Inertia.js: A library that allows you to build single-page applications using server-side routing and controllers.
  • Svelte: A JavaScript framework for building user interfaces.

Installation

  1. Clone the repository: git clone https://github.com/your-repo.git
  2. Install dependencies: composer install && npm install
  3. Configure the environment variables: Copy the .env.example file to .env and update the necessary variables.
  4. Generate the application key: php artisan key:generate
  5. Run database migrations: php artisan migrate
  6. Start the development server: php artisan serve

Usage

  1. Access the application in your web browser at http://localhost:8000.
  2. Register a new user account or log in with an existing account.
  3. Browse the menu, add items to your cart, and proceed to checkout.
  4. Place an order and receive a confirmation.
  5. View your order history.

Contributing

If you would like to contribute to the project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/your-feature-name
  3. Make your changes and commit them: git commit -m 'Add some feature'
  4. Push to the branch: git push origin feature/your-feature-name
  5. Submit a pull request.

License

This project is licensed under the MIT License.

Contributors

Previews

Login

Register

Dashboard

Product Table

Dev Note

Maintenance

  • Websockets Implementation
    • Products
    • User Notification
      • Product needs restock

User Interface

Security

Frontend

  • Convert sweetalert helper to global modules (resources/js/app.js)

Backend

Data Management

  • Supplier
    • Reject Validation check if phone number starts from 0
    • Automatically append 62 when entering supplier phone number

Business Process

Logic

  • Listen when product stock changes
    • Calculate stock with the restock threshold
    • Example: restock && stock <= min_stock
  • Notify user
    • Send a page which contain message to supplier
    • or better, use whatsapp api to automate processes

Main Process

  • Add to cart
    • handled if cart stock is available
    • handled if cart stock is empty
  • Finish/Checkout transaction
    • handled if posted order is valid, e.g. stock availability, etc.
    • checked if ordered products needs restock, if yes, send notification to supplier
  • Delete transaction only today
    • If transaction gets deleted, it will softDeleted, then product stock will be updated/restocked with its pivot data/ordered products
    • After product stock refreshed, it will check if it dont need restock, if yes remove the notification(if available)

Testing

  • Segments

    • Data Availability (Null check, etc)
    • CRUD
    • Error Handling (Fail data validation, etc)
  • Authentication

    • Register
      • Verify Email
    • Login
      • Manual Login
      • Google Login
      • Forgot Password
  • Products

    • Create
      • Stock Check
    • Update
      • Stock Check
    • Delete
      • Constraint checks
        • Force Delete
        • Soft Delete
  • Supplier

    • Delete
      • Constraint checks
        • Force Delete
        • Soft Delete
  • User

    • Data modification permission

      • SuperAdmin can modify any user data
      • Manager can modify staff data
    • Delete

      • Constraint checks
        • Force Delete
        • Soft Delete
  • Transactions

    • Create (POS)
      • Stock check
      • TransactionCreatedEvent triggered
    • Delete
      • Stock check
      • TransactionCreatedEvent triggered

Deployment

  • Fix image pathing bug

Top categories

Loading Svelte Themes