How malisunny543-pixel/pg-manager works
PGMS is a Flask-based, multi-property paying-guest management application with Admin, Manager/Warden, and Tenant portals. The principal workflow is staff managing properties and beds, allocating tenants, then handling billing and checkout; tenants use self-service for invoices, payments, complaints, notices, and checkout requests. Blueprints call service functions, which access MySQL through the database layer. README capabilities include RBAC, property isolation, bed concurrency/lifecycle, utility billing, audit trails, and reports. Service internals not shown are represented by their exact paths; links are limited to documented or indexed relationships.
Main entry points: db/__init__.py Database API · audit_service.py Audit trail · admin/__init__.py Admin portal · app/__init__.py Flask factory
Components 17
Web entry and security
- Flask factory
app/__init__.py - Authentication
app/auth/__init__.py - Session and RBAC
app/extensions.py
Property operations
- Admin portal
app/admin/__init__.py - Manager portal
app/manager/__init__.py - Property and rooms
app/services/property_service.py - Bed allocation
app/services/allocation_service.py
Finance and occupancy
- Invoices and payments
app/services/billing_service.py - Reports and dashboards
app/services/report_service.py
Resident services
- Tenant portal
app/tenant/__init__.py - Complaint handling
app/services/complaint_service.py - Notices and alerts
app/services/notice_service.py
Persistence and audit
- Audit trail
app/services/audit_service.py - Database API
app/db/__init__.py - Connection pool
app/db/connection.py - MySQL database
database/schema.sql
Other components
- Portal users
Connections 33
- Portal users → Flask factory: opens portal
README.md - Flask factory → Authentication: registers blueprint
app/__init__.py - Flask factory → Admin portal: registers blueprint
app/__init__.py - Flask factory → Manager portal: registers blueprint
app/__init__.py - Flask factory → Tenant portal: registers blueprint
app/__init__.py - Admin portal → Session and RBAC: guards routes
app/admin/__init__.py - Manager portal → Session and RBAC: guards routes
app/manager/__init__.py - Tenant portal → Session and RBAC: guards routes
app/tenant/__init__.py - Admin portal → Property and rooms: manages properties
app/admin/__init__.py - Admin portal → Bed allocation: operates allocations
app/admin/__init__.py - Manager portal → Property and rooms: manages rooms
app/manager/__init__.py - Manager portal → Bed allocation: checks in tenants
app/manager/__init__.py - Tenant portal → Invoices and payments: views invoices
app/tenant/__init__.py - Tenant portal → Complaint handling: submits complaints
app/tenant/__init__.py - Tenant portal → Notices and alerts: reads notices
app/tenant/__init__.py - Admin portal → Invoices and payments: generates invoices
app/admin/__init__.py - Admin portal → Reports and dashboards: views reports
README.md - Bed allocation → Audit trail: records actions
app/services/allocation_service.py - Invoices and payments → Audit trail: records actions
app/services/billing_service.py - Complaint handling → Audit trail: records actions
app/services/complaint_service.py - Notices and alerts → Audit trail: records actions
app/services/notice_service.py - Property and rooms → Audit trail: records actions
app/services/property_service.py - Authentication → Audit trail: records actions
- Authentication → Database API: queries users
- Bed allocation → Database API: uses transactions
app/services/allocation_service.py - Invoices and payments → Database API: queries and writes
app/services/billing_service.py - Complaint handling → Database API: queries and writes
app/services/complaint_service.py - Notices and alerts → Database API: queries and writes
app/services/notice_service.py - Property and rooms → Database API: queries and writes
app/services/property_service.py - Reports and dashboards → Database API: queries data
app/services/report_service.py - Audit trail → Database API: writes records
app/services/audit_service.py - Database API → Connection pool: delegates queries
app/db/__init__.py - Connection pool → MySQL database: reads and writes