PharmaTrack is a free, modern solution designed to empower small and medium-sized pharmacies with the tools they need to operate efficiently and safely. It offers:
-
User Management Secure handling of user accounts, roles, and permissions.
-
Task Management Create and assign tasks to pharmacy staff with calendar views for daily, weekly, and monthly planning.
-
Inventory Management Track product inventory with full support for stock-in/stock-out using UPC barcode scanners. All transactions are logged for audit and history.
-
Drug Interactions Check for interactions between up to 10 drugs simultaneously. Search by product (e.g., Advil) or active ingredient (e.g., Ibuprofen).
-
Drug & Ingredient Lookup Access rich details about drugs and ingredients including brand names, market availability, and product details.
Data Sources:
- Drug Product data: Health Canada Drug Database
- Drug Interactions: DDInter Database
This guide walks you through running and deploying PharmaTrack on Windows. Development is cross-platform using Docker, while production deployment is Windows-only—services are installed as Windows Services and configured to start automatically with the operating system.
-
Administrator Privileges Required when running deployment scripts that install services.
-
PowerShell 7+ Run scripts with execution enabled:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
-
Docker CLI / Docker Desktop Needed for containerized deployment:
docker version
-
.NET SDK 6+ Required to build and publish the services:
dotnet --list-sdks
PharmaTrack/
├── .github/ # GitHub workflows and metadata
├── Auth.API/ # Auth API service
├── Drug.API/ # Drug API service
├── Inventory.API/ # Inventory API service
├── PharmaTrack.Core/ # Core DB Models and DTOs
├── PharmaTrack.Host/ # Host to serve static files for PWA
├── PharmaTrack.PWA/ # Progressive Web App frontend
├── PharmaTrack.Shared/ # Shared services and configurations between APIs
├── PharmaTrack.WPF/ # WPF Client
├── Schedule.API/ # Schedule API service
├── compose.yaml # Docker Compose configuration
├── deploy.ps1 # Publishes and installs services as Windows Services
├── PharmaTrack.sln # Visual Studio solution file
├── README.md # This file
└── publish/ # Output folder for published builds via deployment script
For local development, you have two supported workflows:
-
Start backend services via Docker Compose:
cd path\to\PharmaTrack dotnet build docker compose up --build -d
-
Open the solution in Visual Studio, set
PharmaTrack.PWAas the startup project, and run/debug the app.
- Open the solution in Visual Studio
- Start any API project individually (e.g.,
Auth.API,Drug.API, etc.) - Run and debug the PWA or other client apps as needed
Note: Running services as Windows Services is not intended for local development. Use Docker or Visual Studio instead.
To perform a full production-like deployment on a local machine, use the interactive PowerShell script deploy.ps1. This script provides a guided setup with dependency checks, service publishing, and initial data seeding.
-
Open PowerShell as Administrator
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass cd path\to\PharmaTrack
-
Ensures dependencies:
- .NET 9 SDK is installed (via
wingetif missing) - SQL Server Express is installed and running
dotnet-efCLI tool is installed
- .NET 9 SDK is installed (via
-
Publishes and deploys services:
- Builds each backend API as a self-contained Windows executable
- Installs/removes Windows Services automatically with friendly names and descriptions
- Publishes the PWA and copies it into the Host's
wwwroot
-
Optional Prompts:
- Run EF Core database migrations
- Deploy WPF client and create desktop shortcut
- Import initial drug/interaction data via API endpoints
- Register a default admin user
cd path\to\PharmaTrack
.\deploy.ps1Note: This must be run as Administrator.
Follow the on-screen prompts to complete setup.
Development Environment:
- PWA:
http://localhost:8080 - Auth API:
http://localhost:8081 - Drug API:
http://localhost:8082 - Inventory API:
http://localhost:8083 - Schedule API:
http://localhost:8084
Production Environment:
- PWA:
http://localhost:9090 - Auth API:
http://localhost:9091 - Drug API:
http://localhost:9092 - Inventory API:
http://localhost:9093 - Schedule API:
http://localhost:9094
This script must be run as Administrator.
Fix: Right-click PowerShell → Run as Administrator.
Docker CLI not found. Please install Docker Desktop or Docker CLI before running this script.
Fix: Install Docker Desktop and restart PowerShell.
Symptom: Services fail to start or port conflicts occur Fix:
- Run
docker compose downto stop containers - Check for port conflicts on ports like 8082, 5432, etc.
Fix:
- Ensure you're running PowerShell as Administrator
- Check
Event Viewer > Windows Logs > Applicationfor errors - Check the status of services
services.msc - Use
sc delete <ServiceName>to remove a service manually if needed
This project, PharmaTrack, is licensed under the Apache License 2.0.
You are free to use, modify, and distribute this software, provided that you:
- Include proper attribution to the original author.
- Retain the license and notice files in any redistribution.
See the NOTICE file for attribution details.
© 2025 Ali Bahaloo