Imported from acmadu/givorpartners (
AGENTS.md). Install upstream withnpx skills add acmadu/givorpartners. Copyright stays with the author.
Agent Instructions
MongoDB-backed PyQt5 POS system with two desktop apps: center/ (dealer/product/stock management) and pos/ (checkout screen). Both import shared code from common/ and talk to each other only through MongoDB — there is no direct RPC between the two apps. See README.md for install, config.json format, and DB schema.
Architecture
- Entry points:
start_center.py,start_pos.py. Each callscommon/mongo_startup.py(tries to auto-start MongoDB via Podman/systemd) then connects viacommon/database.py. - Both apps use a
QStackedWidgetpage-navigation pattern: seecenter/main_window.py/pos/main_window.pyfor how pages are registered and switched (pages.setCurrentWidget(page)). common/database.pyauto-migrates legacy Turkish field/collection names (e.g.barkod→barcode,bayi_kodu→dealer_code) to English on first connection — don't reintroduce Turkish field names in new schema code.common/settings.pymanagesconfig.json(git-ignored;config.json.exampleis the template copied on first run). The defaultmongo_uriin settings.py points to the production GivorPartners MongoDB Atlas cluster — be careful not to run destructive DB scripts against it; pointconfig.jsonat a local/test Mongo instance instead.common/remote_config.pylets center push per-dealer settings (theme, font_scale, auto-update flag) into aremote_configscollection.common/style.pyholds the single "Night Mint" dark theme (build_qss()/set_theme()); apply new UI through this, not ad-hoc stylesheets.- Auto-update lives in
common/updater.py(checksversion.jsonfrom the URL inversion.py, verifies SHA-256 before running the installer).common/auto_updater.pyis a legacy compatibility shim — don't add new logic there.
Conventions
- UI text and error messages are Turkish; code identifiers (variables, DB fields) are English. Files use
# -*- coding: utf-8 -*-and JSON I/O usesensure_ascii=False.
Build and Test
- Tests use
unittest, not pytest:python -m unittest tests.test_product_pricing. - Packaging is PyInstaller (
yazarkasa-kasa.spec,yazarkasa-merkez.spec) + Inno Setup for Windows installers. Build viabuild_center.bat/.sh,build_pos.bat/.sh,build_all.bat/.sh,build_setup.bat; Linux packaging viainstaller/build_appimage.sh/installer/build_deb.sh. Full details in BUILD_EXE.md. - Deployment/versioning workflow: DAGITIM_REHBERI.md, BAYILERE_DEPLOYMENT_REHBERI.md, DEPLOYMENT_OZET.md. System/architecture background: SISTEM.md, TEKNIK_ANALIZ.md.