Giter Club home page Giter Club logo

lakasir's Introduction

logo

Lakasir Web App

Lakasir is a Point of Sale (POS) application built using Laravel for the API, the Filament admin panel for the web application, and Flutter for the mobile application.

Requirements

  • php 8.1
  • mysql 5.7 or higher
  • php-ext.* base on laravel extenstion requirement

Features

  • Role Management: Define roles and permissions for users.
  • Transaction Management: Handle sales transactions seamlessly.
  • Product Management: Manage your inventory and products effectively.
  • Simple Reporting: Generate reports for insights into sales and performance.
  • Simple Accounting: Basic accounting features for financial tracking.
  • Unit Price: The product will have a different price base on the basic unit
  • Friend Price: You can sell the product with a lower price or the highest price

Technologies Used

Installation

  1. Clone the repository: git clone https://github.com/lakasir/lakasir.git
  2. Navigate to the project directory: cd lakasir
  3. Install dependencies:
  4. Laravel:
    • composer install
    • cp .env.example .env
    • edit the env based on your local configuration
    • php artisan migrate --see
  5. Create the user using php artisan app:create-user

Usage

  • api: localdomain.test/api/test
  • webapp: localdomain.test/member/login

Contributing

We welcome contributions from the community! If you'd like to contribute to Lakasir, please follow these steps:

  1. keep on eye on project board
  2. Fork the repository.
  3. Create a new branch (git checkout -b feature/new-feature).
  4. Make your changes and commit them (git commit -am 'Add new feature').
  5. Push to the branch (git push origin feature/new-feature).
  6. Create a new Pull Request.

When contributing to this project, please keep an eye on our project features board on GitHub to stay updated with ongoing and planned features.

License

This project is licensed under the GPL-3.0 license - see the LICENSE file for details.

Contact

For any inquiries or support, please contact [email protected] or you can open discussion in discussion features

lakasir's People

Contributors

alfianokt avatar alifrizkip avatar aqmalio avatar dependabot[bot] avatar farhan0syakir avatar lakuapik avatar nasrulfuad avatar sheenasortme avatar sheenazien8 avatar toriqahmads avatar unusefulcoder avatar yogs22 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lakasir's Issues

Add installation guide on landing page (Webapp)

Right now we need guide for end user how to install this app on their server, we need show these flows:

Pribadi package:

  1. setup the api on their VPS server or Shared Hosting
  2. how to install the APK on their android
  3. how to setup their domain in apps
  4. add the call to action button for instalation service

Server Kami package:

  1. How to install the APK on their android
  2. how to register the shop domain
  3. how to setup their domain in apps

[new item] can post negative number

saya tertarik dengan projek ini, pas saya cek masih ada beberapa bug. salah satunya ini:

  • bisa input negatif number, dan validasinya centang

Peek 2020-10-02 16-46

sekalian tanya, ini masih dilanjut gak ya projeknya?

Delete Image if update image or delete record belongsto image

Hapus gambar sekarang cuma menghapus recordnya di db tetapi tidak menghapus file yang berada di assets, dan juga terdapat bug jika membuat item tanpa gambar, terus mau update item dengan memasukkan gambar akan muncul error.

image disini berada di model atau table media, sudah disediakan trait dan helpernya.

Unable to login

I used composer create-project lakasir/lakasir your-project-name to install the project and i have followed the installer to do the installation but after the installer is completed, i can't login .
After entering my credentials, the button just be hanging and loading.It will not come

Setup a development environment

Hi, I'm new to laravel framework, I want to set up this project for development.

What are the steps to set up it properly? I know README.md file has some setup guide but, It's quite confusing to me.

Please, tell me, all steps to set up it with development env.

Add Gallery Manager In Filament

Because the upload flow in lakasir is quite different from the others, we need to research what library we can use to afford our flow, and this is the flow we use:

  1. upload the image to endpoint /api/temp/upload
  2. get the URL params from that response endpoint "{{domain}}/tmp/REanZ1xWKBPNeJDpvLZmDDzZGex5oao7k2hyGowk.jpg"
  3. and send to the endpoint that handles the image upload

Example:

PUT /api/auth/me HTTP/1.1
Host: {{domain}}
Accept: application/json
Content-Type: application/json
Authorization: Bearer {{token}}
Content-Length: 189

{
    "name": "profile_name",
    "phone": "08963870683",
    "photo_url": "{{domain}}/tmp/ZvLRjBtnWWshH0LlQjdkyYSboQ0CExURRfuWUnvS.jpg",
    "address": null,
    "locale": null
}

From the example API above, you know that the body params have "photo_url," so you can paste it there.

If we can't find the plugin that matches our flow or can't update the flow to match ours, we have to make it ourselves

create login feature (backend)

Overview

User bisa melakukan login

Proposed Work

buat url path lakasir.local/api/auth/login dengan method post.

rules

  • request:
$rules = [
    "username" => "required", "auth throw",
    "password" => "required",
];
  • flow:

json format

  • request:
{ 
  "username": "[email protected]",
  "password": "password"
}
  • response:
{ 
  "success": true,
  "message": "succes login",
  "data": {
    "token": "breeze plaintext token"
  }
}

Success Criteria

200 OK, 401 Unathorized, 500 internal server error

create crud master product

Overview

Setiap toko harus mempunyai produk untuk bisa dijual.

Proposed Work

buat url path lakasir.local/api/master/product, dan berhasil melakukan operasi CRUD

rules

Buat enum class yang berisi product dan service

  • table:
Schema::create('products', function (Blueprint $table) {
    $table->id();
    $table->foreignId('category_id')->constrained();
    $table->string('name');
    $table->double('stock');
    $table->double('initial_price');
    $table->double('selling_price');
    $table->string('unit')->default("PCS");
    $table->string('type')->default("product");
    $table->timestamps();
});
  • request:
$rules = [
    "name" => ["required", "min:3"],
    "category" => ["required"],
    "stock" => ["number", "required", "min:0"],
    "initial_price" => ["number", "required", "lte:selling_price"], 
    "selling_price" => ["number", "required", "gte:initial_price"],
    "type" => [new Enum(ProductType::class), "required"]
];

json format

  • request:
{ 
  "name": "produk toko 1",
  "category": 1,
  "stock": 20,
  "initial_price": 1200,
  "selling_price": 1500,
  "unit": "KG",
  "type": "product"
}
  • response:
  1. create / update / delete
{ 
  "success": true,
  "message": "Congratulations! success to create / update / delete product",
  "data": []
}
  1. detail
{ 
  "success": true,
  "message": "",
  "data": {
    "name": "produk toko 1",
    "category": "unit",
    "stock": 20,
    "initial_price": 1200,
    "initial_price_formatted": "Rp. 1200",
    "selling_price_formatted": "Rp. 1500",
    "selling_price": 1500,
    "unit": "KG",
    "type": "product"
  }
}
  1. list / index
{ 
  "success": true,
  "message": "",
  "data": [
    {
      "name": "produk toko 1",
      "category": "unit",
      "stock": 20,
      "initial_price": 1200,
      "initial_price_formatted": "Rp. 1200",
      "selling_price_formatted": "Rp. 1500",
      "selling_price": 1500,
      "unit": "KG",
      "type": "product"
    }
  ]
}

Success Criteria

200 OK, 401 Unathorized, 500 internal server error

several problems for running the project using docker

Hi everyone, and thanks for your efforts in this project.

I was trying to run it locally using docker, unfortunately I met some problems:

  • the installation instructions says to copy .env.example into .env, this caused the following problems:
  • using user root for DB_USERNAME caused errors in mysql image, as apparently it is was trying to recreate it and it already exists. that was solved by providing my own username and password
  • the app image failed to connect to the database, after some debugging, if found that the environment varianvle DB_HOST needs to be set to mysql instead of 127.0.0.1.
  • the application started and I was greeted with the installation form:
  • the installation form didn't accept hostnames, only IP's for the database host, so I couldn't just use mysql directly, and had to use the IP, which I think is not guaranteed to be fixed.
  • providing credentials without database properties caused an error, but somehow the user still was saved.
  • finally providing the database properties, a new user and the company data also led to the attached error.
    Screenshot_2021-02-27 🧨 Undefined index user

Ensure the web app following brand from lakasir

  • Title update to about from tenant
  • The primary color matches the lakasir brand's color
  • Profile picture update it to from the user's profile, but when it's null, please use the default avatar

Other browsers support

The description says that it only runs well on firefox. Are other browsers supported?

Fix Select2 in Vue Components

Bug ini terlihat ketika kamu memilih value 2 kali

  • disaat memilih value yang kedua yang urutannya dibawah dari value yang pertama, maka value yang kedua tidak terpilih, fitur ini terdapat di create grouping customer

Unit Price Feature (backend)

We need API to handle this feature

Issues

Sometimes merchants need to sell products that are not only 1 unit, but sometimes they are using each unit with different prices, e.g.:
The basic unit of the product is PCS, and the price is IDR 1000; then they want to sell this product at a different price if the customer buys it per 10 PCS (box), so the merchant needs to set the price like this:

Product A needs to have unit BOX that contains 10 PCS with prices IDR 8000

How can we solve this issue?

IMO, we need to add a unit_prices table that relates to the product with columns:

  • unit (String)
  • contains (Int)
  • price (Double)

Then, when the product is sold by using the unit price, we need to add the flag to know whether this is using the feature or not; then, in table transactions, we need to use this price as well, and we can discuss it to have the better solution for this feature

create register feature (backend)

Overview

User bisa melakukan register, dengan feedback harus melakukan verification, ketika user berhasil melakukan registerasi, system mengirimkan email link verifikasi, user yang melakukan registrasi default akan menjadi admin

Proposed Work

buat url path lakasir.local/api/auth/register dengan method post.

rules

  • table
Schema::create('users', function (Blueprint $table) {
    $table->id();
    $table->string('username');
    $table->string('first_name');
    $table->string('last_name');
    $table->string('address');
    $table->string('email')->unique();
    $table->timestamp('email_verified_at')->nullable();
    $table->string('password');
    $table->rememberToken();
    $table->timestamps();
});

Schema::create('shop_profiles', function (Blueprint $table) {
    $table->id();
    $table->string('name');
    $table->text('address');
    $table->string('type')->default('retail');
    $table->string('size')->default('small');
    $table->timestamps();
});
  • request:
$rules = [
    "username" => "required",
    "email" => ["required", "email", "unique:users"],
    "first_name" => ["required", "min:3"],
    "last_name" => ["required", "min:3"],
    "address" => ["required", "min:3"],
    "shop_type" => ["in_array:retail,services", "required"],
    "shop_name" => ["required", "min:3"],
    "shop_address" => ["required", "min:3"],
    "shop_size" => ["in_array:small,medium,large", "required"],
    "password" => ["required", "confirm"]
];

json format

  • request:
{ 
  "username": "admin",
  "email": "[email protected]",
  "first_name": "john",
  "last_name": "doe",
  "address": "jl jakarta mayong jepara",
  "shop_type": "retail",
  "shop_name": "Toko sembako murah",
  "shop_address": "Jalan mawar hitam",
  "shop_size": "small",
  "password": "password",
  "password_confirmation": "password"
}
  • response:
{ 
  "success": true,
  "message": "Congratulations! success to registration, check your email and verification your account now",
  "data": []
}

Success Criteria

200 OK, 401 Unathorized, 500 internal server error

create role management (fillament)

Right now, we have already implemented the permission to all off endpoint, but we don't have the role management yet; we need to add this feature to create the role, and once it is ready, we need to update the login response to include the user's permission

URL list in description

Could a list of urls be included in the description?
I'm thinking here about which url address can be used to create a new tenant user, and the use of the API url.
Thanks.

create selling transaction feature (backend)

Overview

setiap toko memiliki fitur transaksi penjualan, dimana flow transaksi itu yakni,
memasukkan data2 transaksi seperti member (jika perlu), uang yang dibayar, uang kembalian, produk2 yang dipilih, type penjualan (hutang)

Proposed Work

buat url path lakasir.local/api/master/selling, dan berhasil melakukan transaksi

rules

  1. buat class custom validation new ShouldSameWithSellingDetail("column") column harus sama dengan total dari seling details,
    contohnya jika penjumlahan dari price dari products 20000 maka total_price yang dikirim dari sellings harusnya 20000
  2. code sellings digenerate otomatis dengan format SELL0000 increment kereset ketika tahun baru
  3. stock di product berkurang sesuai qty
  4. buat class custom validation new CheckProductStock qty harus tidak melebihi stock yang ada di product
  • table:
Schema::create('sellings', function (Blueprint $table) {
    $table->id();
    $table->foreigId('member_id')->nullable()->constrained();
    $table->date('date');
    $table->string('code');
    $table->double('payed_money');
    $table->double('money_changes');
    $table->double('total_price');
    $table->double('total_qty');
    $table->timestamps();
});

Schema::create('selling_details', function (Blueprint $table) {
    $table->id();
    $table->foreigId('selling_id')->constrained();
    $table->foreigId('product_id')->constrained();
    $table->double('price');
    $table->double('qty');
    $table->timestamps();
});
  • request:
$rules = [
    "payed_money" => ["required", "gte:money_changes"],
    "money_changes" => ["required", "lte:payed_money"],
    "total_price" => ["required", new ShouldSameWithSellingDetail("total_price")],
    "total_qty" => ["required", new ShouldSameWithSellingDetail("total_qty")],
    "products" => ["array"],
    "products.product_id" => ["required"],
    "products.selling_id" => ["required"],
    "products.price" => ["required", "number"],
    "products.qty" => ["required", "number", "min:1", new CheckProductStock],
];

json format

  • request:
{
  "payed_money": 50000,
  "money_changes": 30000,
  "total_price": 20000,
  "total_qty": 10,
  "products": [
    {
      "product_id": 1,
      "selling_id": 1,
      "price": 5000,
      "qty": 2,
    }
    {
      "product_id": 2,
      "selling_id": 1,
      "price": 10000,
      "qty": 1,
    }
  ]
}
  • response:
  1. create
{
  "success": true,
  "message": "Congratulations! success to create member",
  "data": []
}
  1. detail
{
  "success": true,
  "message": "",
  "data": {
    "date": "2022-06-24",
    "code": "SELL2022060001"
    "payed_money": 50000,
    "money_changes": 30000,
    "total_price": 20000,
    "total_qty": 10,
    "products": [
      {
        "product_id": 1,
        "selling_id": 1,
        "price": 5000,
        "qty": 2,
        "product_name": "chiki-chiki"
      }
      {
        "product_id": 2,
        "selling_id": 1,
        "price": 10000,
        "qty": 1,
        "product_name": "chocolatos"
      }
    ]
  }
}
  1. list / index
{
  "success": true,
  "message": "",
  "data": [
    {
      "date": "2022-06-24",
      "code": "SELL2022060001"
      "payed_money": 50000,
      "money_changes": 30000,
      "total_price": 20000,
      "total_qty": 10,
      "products": [
        {
          "product_id": 1,
          "selling_id": 1,
          "price": 5000,
          "qty": 2,
          "product_name": "chiki-chiki"
        }
        {
          "product_id": 2,
          "selling_id": 1,
          "price": 10000,
          "qty": 1,
          "product_name": "chocolatos"
        }
      ]
    }
  ]
}

Success Criteria

200 OK, 401 Unathorized, 500 internal server error

create crud master member (backend)

Overview

Setiap toko memiliki member, member adalah customer yang sudah berlangganan dan ingin mendaftar menjadi member, nantinya fitur ini berguna ketika member membeli produk ata jasa akan ada bonus menarik (diskon atau yang lain)

Proposed Work

buat url path lakasir.local/api/master/member, dan berhasil melakukan operasi CRUD

rules

code untuk member dibuat menjadi increment berdasarkan CUS0000

  • table:
Schema::create('members', function (Blueprint $table) {
    $table->id();
    $table->string('name');
    $table->string('code');
    $table->string('address')->nullable();
    $table->string('email')->nullable()->unique();
    $table->timestamps();
});
  • request:
$rules = [
    "name" => ["required", "min:3"],
];

json format

  • request:
{ 
  "name": "member 1",
  "address": "jl merdeka",
  "email": "[email protected]",
}
  • response:
  1. create / update / delete
{ 
  "success": true,
  "message": "Congratulations! success to create / update / delete member",
  "data": []
}
  1. detail
{ 
  "success": true,
  "message": "",
  "data": { 
    "name": "member 1",
    "address": "jl merdeka",
    "email": "[email protected]",
    "code": "CUS20220001"
  }
}
  1. list / index
{ 
  "success": true,
  "message": "",
  "data": [ 
    { 
      "name": "member 1",
      "address": "jl merdeka",
      "email": "[email protected]",
      "code": "CUS20220001"
    }
  ]
}

Success Criteria

200 OK, 401 Unathorized, 500 internal server error

[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders when I try to log in

I have installed and configured successfully. After I try to login using my credentials the submit button keep loading and nothing happens. So I inspected and I Got this,
"app.js:96477 [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "loading"
found in
---> at resources/js/components/Button/Button.vue

warn | @ | app.js:96477
  | (anonymous) | @ | app.js:100520
  | reactiveSetter | @ | app.js:96903
  | proxySetter | @ | app.js:100473
  | clicked | @ | app.js:2010
  | invokeWithErrorHandling | @ | app.js:97706
  | invoker | @ | app.js:98031
  | original._wrapper | @ | app.js:103390
"
Screenshot 2020-12-21 13:15:39

add notifications if stock will or has ran out in api

Overview

we need to implement notifications in Flutter. Then, in API, we should use FCM (if you need something better than this). We must notify the user when the stock has run out for this one.

Issues

We use tenancy, and that makes the API kinda of complicated when you use cron, broadcasting or queue

What we want to add

  1. minimum_stock_nofication key params on settings table
  2. how to implement the notification, do we need sent the notification to all users, or only a few user by setting
  3. cron to handle the notification
  4. be aware on performance
  5. FCM library
  6. permission to update the minimum_stock_notification, and the key is set the minimum stock notification

Add product upload in product resources

Based on our need for uploading image products, previously we decided to add the gallery to afford our flow of uploading images, but filament had a similar flow with ours, so right now, we decided to add upload images product in product resources

  1. create data in the UploadedImage model
  2. get the URL, then change the hero_images state with those URLs, but mark this one, we show the images as an array, but then we save it as a string/text

Add Point in Customer

Tambahkan button tambah point di samping button delete untuk memunculkan modal form input yang berfungsi menambahkan point ke customer
Screenshot from 2020-08-15 07-01-52

Composer install and Docker compose fail

It's return error when i run composer install or composer update command

[RuntimeException]
The `url` supplied for the path (../packages/livewire-components) repository does not exist

And when I run docker-compose up -d, it's return this error:

PHP Fatal error:  Uncaught Error: Class "Illuminate\Foundation\Application" not found in /home/syofyan/dreamworld/open-source/lakasir/bootstrap/app.php:14
Stack trace:
#0 /home/syofyan/dreamworld/open-source/lakasir/artisan(20): require_once()
#1 {main}
  thrown in /home/syofyan/dreamworld/open-source/lakasir/bootstrap/app.php on line 14

Company Menu

Tambahkan menu company yang dimiliki oleh owner, tampillanya seperti tampilan profil

Submit Button not working on forms

Hi, Thanks for the awesome POS system. I was trying to set up and do some testing, but cant move ahead from login page. The installation and Database set up is all done correctly. On form submit for login, it does not work! I don't see anything in the network tab.

Upon debugging I figured the button component with type submit does not work. It works well if I use a simple input type submit on forms. Please help!

Thanks,
Mufaddal.
Screenshot from 2020-10-12 07-56-55

Barcode Scanning

How do we scan products from the seller login? I tried clicking on the brcode icon, but this does not work. Any help is greatly appreciated.

Problems for install Laravel/horizon on Windows

I testing on XAMPP over Windows 10.

The error is:
Problem 1
- laravel/horizon is locked to version v4.3.5 and an update of this package was not requested.
- laravel/horizon v4.3.5 requires ext-pcntl * -> it is missing from your system. Install or enable PHP's pcntl extension.

To enable extensions, verify that they are enabled in your .ini files:
- C:\xampp\php\php.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.

craete crud master category (backend)

Overview

Setiap produk toko harus mempunyai kategory, dan sudah mempunyai data seeder data kategory UMUM, ini natinya akan menjadi kateogory default ketika toko akan membuat produk

Proposed Work

buat url path lakasir.local/api/master/category berhasil melakukan operasi CRUD

rules

  • table:
Schema::create('categories', function (Blueprint $table) {
    $table->id();
    $table->string('name');
    $table->timestamps();
});
  • request:
$rules = [
    "name" => "required"
];

json format

  • request:
{ 
  "name": "UMUM"
}
  • response:
  1. create / update / delete
{ 
  "success": true,
  "message": "Congratulations! success to create / update / delete category",
  "data": []
}
  1. detail
{ 
  "success": true,
  "message": "",
  "data": {
      "name": "UMUM"
  }
}
  1. list
{ 
  "success": true,
  "message": "",
  "data": [
    {
        "name": "UMUM"
    },
  ]
}

Success Criteria

200 OK, 401 Unathorized, 500 internal server error

Add import excel menu for filament

To give a simple way to add the product, we need to add an import product feature in lakasir because sometimes merchant do not want to add their product one by one, this is the table we need to handle:

Category Name SKU Stock Non Stock Type Unit
Food Fried Chicken FC0001 10 Yes/No/Blank product/service pcs
Driink Ice Tea IT0001 10 Yes/No/Blank product/service pcs

What we have to:

  1. add the export feature to download that example sheet; we can use CSV/xlsx
  2. create the upload feature to import that updated example sheet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.