How tahasinx/project_pharmax works
Pharmax is a pharmacy-management application with a session-authenticated Laravel backend and Inertia/Vue interface. Users sign in, then manage pharmacy operations—catalog, purchasing and stock, dispensing/POS and invoices, and finance/reporting—through server-driven pages. A separate platform-admin area manages tenant companies, provisioning, backups, schema upgrades, and billing. The README documents the major screens and capabilities; sampled source confirms Inertia rendering and some inventory/accounting operations, but does not expose every controller’s internal call graph, so uncertain subsystem wiring is omitted.
Main entry points: web.php Web routes · app.js Inertia app shell · Models Eloquent domain models · StockController.php Stock operations
Components 22
Web application
- Web routes
routes/web.php - Session authentication
app/Http/Controllers/Auth/AuthenticatedSessionController.php - Pharmacy interface
resources/js/Pages - Platform interface
resources/js/Pages/Platform - Inertia app shell
resources/js/app.js
Pharmacy operations
- Catalog and customers
app/Http/Controllers/MedicineController.php - Purchasing
app/Http/Controllers/PurchaseController.php - Stock operations
app/Http/Controllers/StockController.php - Sales and invoices
app/Http/Controllers/InvoiceController.php - Prescriptions and compliance
app/Http/Controllers/PharmacyController.php - Inventory allocation
app/Domain/Inventory/FefoAllocator.php
Finance and oversight
- Reports and dashboard
app/Http/Controllers/ReportController.php - Ledger posting
app/Domain/Finance/JournalPoster.php - Audit recording
app/Domain/Audit/AuditRecorder.php - Data import and export
app/Http/Controllers/DataExportController.php
Tenant platform
- Company administration
app/Http/Controllers/Platform/CompanyController.php - Tenant provisioning
app/Services/Platform/CompanyProvisioner.php - Platform operations
app/Http/Controllers/Platform/OperationsController.php
Application state
- Eloquent domain models
app/Models - MySQL databases
Other components
- Pharmacy user
- Platform admin
Connections 37
- Pharmacy user → Web routes: opens screens
- Platform admin → Web routes: opens screens
- Web routes → Session authentication: dispatches login
- Session authentication → Inertia app shell: renders login
- Session authentication → Web routes: redirects home
- Web routes → Catalog and customers: dispatches requests
- Web routes → Purchasing: dispatches requests
- Web routes → Stock operations: dispatches requests
- Web routes → Sales and invoices: dispatches requests
- Web routes → Prescriptions and compliance: dispatches requests
- Web routes → Reports and dashboard: dispatches requests
- Web routes → Data import and export: dispatches requests
- Web routes → Company administration: dispatches requests
- Web routes → Platform operations: dispatches requests
- Catalog and customers → Inertia app shell: renders pages
- Purchasing → Inertia app shell: renders pages
- Stock operations → Inertia app shell: renders pages
- Sales and invoices → Inertia app shell: renders pages
- Prescriptions and compliance → Inertia app shell: renders pages
- Reports and dashboard → Inertia app shell: renders pages
- Company administration → Inertia app shell: renders pages
- Platform operations → Inertia app shell: renders pages
- Inertia app shell → Pharmacy interface: resolves pages
- Inertia app shell → Platform interface: resolves pages
- Catalog and customers → Eloquent domain models: reads and writes
- Purchasing → Eloquent domain models: reads and writes
- Stock operations → Eloquent domain models: reads and writes
- Sales and invoices → Eloquent domain models: reads and writes
- Prescriptions and compliance → Eloquent domain models: reads and writes
- Reports and dashboard → Eloquent domain models: queries records
- Eloquent domain models → MySQL databases: persists records
- Stock operations → Inventory allocation: allocates stock
- Prescriptions and compliance → Ledger posting: posts entries
- Company administration → Tenant provisioning: starts provisioning
- Company administration → Eloquent domain models: manages companies
- Platform operations → Eloquent domain models: reads company data
- Data import and export → Eloquent domain models: imports or exports