{"id":50681169,"url":"https://github.com/bintang-r/pos-system-django-real-implementation","last_synced_at":"2026-06-08T19:03:46.305Z","repository":{"id":348732969,"uuid":"1199108266","full_name":"bintang-r/pos-system-django-real-implementation","owner":"bintang-r","description":"RestFul API POS (Point Of Sale) implementation with Django Framework Python ","archived":false,"fork":false,"pushed_at":"2026-04-02T18:01:20.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-03T03:18:56.689Z","etag":null,"topics":["api","application","authentication","django","django-framework","django-project","django-rest-framework","jwt","python","restful-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bintang-r.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-02T03:53:13.000Z","updated_at":"2026-04-02T18:19:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bintang-r/pos-system-django-real-implementation","commit_stats":null,"previous_names":["bintang-r/pos-system-django-real-implementation"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/bintang-r/pos-system-django-real-implementation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bintang-r%2Fpos-system-django-real-implementation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bintang-r%2Fpos-system-django-real-implementation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bintang-r%2Fpos-system-django-real-implementation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bintang-r%2Fpos-system-django-real-implementation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bintang-r","download_url":"https://codeload.github.com/bintang-r/pos-system-django-real-implementation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bintang-r%2Fpos-system-django-real-implementation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34076000,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","application","authentication","django","django-framework","django-project","django-rest-framework","jwt","python","restful-api"],"created_at":"2026-06-08T19:03:45.607Z","updated_at":"2026-06-08T19:03:46.297Z","avatar_url":"https://github.com/bintang-r.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🛒 POS System Django - Real Implementation\n\nSistem Point of Sale (POS) backend dengan fitur Manajemen Produk, Autentikasi JWT, dan Transaksi otomatis (Potong Stok).\n\n![Django](https://img.shields.io/badge/Django-6.0.3-092E20?logo=django)\n![Python](https://img.shields.io/badge/Python-3.14-blue?logo=python)\n![MySQL](https://img.shields.io/badge/MySQL-8.0-orange?logo=mysql)\n![License](https://img.shields.io/badge/License-MIT-green)\n\nSistem backend **Point of Sale (POS)** berbasis **Django REST Framework** dengan fitur:\n\n- Manajemen Produk\n- Autentikasi JWT\n- Sistem Transaksi otomatis (dengan pemotongan stok)\n\n---\n\n## 🚀 Prasyarat (Prerequisites)\n\nSebelum memulai, pastikan Anda telah menginstal:\n\n- **Python 3.10+**\n- **Laragon** (untuk MySQL Database)\n- **Git**\n\n---\n\n## 🛠️ Langkah Instalasi\n\n### 1. Persiapan Folder \u0026 Virtual Environment\n\nBuka terminal (PowerShell/CMD) di folder proyek Anda:\n\n```powershell\n# Buat virtual environment\npython -m venv venv\n\n# Aktifkan venv\n.\\venv\\Scripts\\activate\n```\n\n### 2. Instalasi Library\n\nInstal semua dependensi yang dibutuhkan:\n\n```powershell\npip install django djangorestframework djangorestframework-simplejwt django-environ mysqlclient pymysql faker\n```\n\n### 3 Konfigurasi Database (MySQL Laragon)\n\n1. Buka Laragon dan pastikan MySQL berjalan.\n\n2. Buka HeidiSQL, buat database baru dengan nama pos_db.\n\n3. Pastikan core/settings.py sudah terkonfigurasi untuk MySQL.\n\n### 4 Migrasi Database\n\nJalankan perintah ini untuk membuat struktur tabel di MySQL:\n\n```powershell\n# Membuat file migrasi\npython manage.py makemigrations\n\n# Menerapkan migrasi ke MySQL\npython manage.py migrate\n\n# Membuat akun Superuser untuk akses admin\npython manage.py createsuperuser\n```\n\n### 5 Membuat Akun Admin\n\n```powershell\npython manage.py createsuperuser\n```\n\n---\n\n## 🛠️ Langkah Awal: Membuat Struktur Proyek\n\nJika Anda ingin membangun ulang atau menambah aplikasi, berikut adalah urutan perintah yang kita gunakan:\n\n```bash\n# 1. Membuat Folder Utama \u0026 Project\ndjango-admin startproject core .\n\n# 2. Membuat Folder Apps (untuk merapikan struktur)\nmkdir apps\ncd apps\npython ../manage.py startapp users\npython ../manage.py startapp products\npython ../manage.py startapp transactions\ncd ..\n```\n\n---\n\n### 📦 Menjalankan Data Seeder\n\n```powershell\npython manage.py seed_products\n```\n\n### 🔌 Dokumentasi API Endpoints\n\nGunakan Postman untuk melakukan tes pada endpoint berikut:\n\n#### 🔐 Autentikasi (JWT)\n\n| Method | Endpoint           | Description                   |\n| ------ | ------------------ | ----------------------------- |\n| POST   | /api/auth/login/   | Login \u0026 Mendapatkan JWT Token |\n| POST   | /api/auth/refresh/ | Memperbarui Token             |\n\n#### 🍎 Produk (CRUD)\n\n| Method | Endpoint            | Description                |\n| ------ | ------------------- | -------------------------- |\n| GET    | /api/products/      | List semua produk          |\n| POST   | /api/products/      | Tambah produk baru (Admin) |\n| PUT    | /api/products/{id}/ | Update produk              |\n| DELETE | /api/products/{id}/ | Hapus produk               |\n\n#### 🛒 Transaksi\n\n| Method | Endpoint                    | Description                       |\n| ------ | --------------------------- | --------------------------------- |\n| POST   | /api/transactions/checkout/ | Melakukan transaksi \u0026 potong stok |\n\n---\n\n## Format Body Checkout (JSON):\n\n```json\n{\n  \"items\": [\n    { \"product\": 1, \"quantity\": 2 },\n    { \"product\": 5, \"quantity\": 1 }\n  ]\n}\n```\n\n---\n\n## 🧪 Menjalankan Unit Test\n\n```powershell\npython manage.py test\n```\n\n---\n\n### 📂 Struktur Proyek\n\n- core/: Pengaturan utama Django \u0026 Routing global.\n- apps/users/: Custom User Model \u0026 Manajemen Role.\n- apps/products/: Logika produk \u0026 Seeder.\n- apps/transactions/: Logika transaksi \u0026 Service Layer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbintang-r%2Fpos-system-django-real-implementation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbintang-r%2Fpos-system-django-real-implementation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbintang-r%2Fpos-system-django-real-implementation/lists"}