A comprehensive pharmaceutical service management application built with ASP.NET Core and Vue.js
The Pharma Management System is a full-stack web application designed to streamline pharmaceutical service operations, including pharmacy details management, service booking, on-site appointments, and order entry processing. The system enables efficient tracking and management of pharmaceutical services from booking through completion.
- Operational Efficiency: Centralizes pharmaceutical service management in a unified platform
- Service Quality: Standardizes service workflows and ensures consistent delivery
- Data Accessibility: Provides real-time access to pharmacy information and service records
- Compliance: Maintains detailed audit trails and documentation for regulatory requirements
- Cost Reduction: Reduces manual processes and improves resource allocation
- Pharmacy Administrators: Manage pharmacy details and operations
- Service Technicians: Track on-site visits and service appointments
- Operations Managers: Monitor service delivery and performance metrics
- Support Staff: Handle customer inquiries and service bookings
Eliminates fragmented pharmaceutical service management by providing a centralized system for:
- Pharmacy information management
- Service appointment scheduling
- On-site service tracking
- Order entry and processing
- Hours of operation management
- Contact and communication tracking
- Service booking completion rate
- Average service response time
- Customer satisfaction scores
- Data accuracy and completeness
- System uptime and availability
- User adoption rate
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Client Browser β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββ
β HTTPS
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββ
β PharmaClient (ASP.NET Core 5.0) β
β ββββββββββββββββββββββββββββββββ β
β β Vue.js SPA (Vuetify) β β
β β - Components β β
β β - Router β β
β β - Vuex Store β β
β ββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββ
β HTTP/HTTPS API Calls
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββ
β PharmaCoreApi (ASP.NET Core 3.1) β
β ββββββββββββββββββββββββββββββββββββββββ β
β β Controllers β β
β β - PharmaController β β
β β - FileController β β
β ββββββββββββββ¬ββββββββββββββββββββββββββ β
β β β
β ββββββββββββββΌββββββββββββββββββββββββββ β
β β CouchDB Repository Layer β β
β β - CRUD Operations β β
β β - Query Handling β β
β ββββββββββββββ¬ββββββββββββββββββββββββββ β
ββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββ
β HTTP API
ββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββ
β Apache CouchDB β
β - Document Storage β
β - Views & Queries β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Vue.js SPA: Single-page application providing user interface
- Vuetify: Material Design component framework
- Vue Router: Client-side routing and navigation
- Vuex: State management for application data
- Components:
- Service booking and management
- Pharmacy details display
- Calendar/scheduling interface
- On-site appointment tracking
- Order entry lists
- Product management
- PharmaController: Handles pharmacy and service-related operations
- FileController: Manages file uploads and downloads
- CouchRepository: Data access layer for CouchDB operations
- Helper Classes: Encryption (AES), stream handling, extensions
- NLog: Structured logging and diagnostics
- Application Insights: Monitoring and telemetry
- User Interaction: User interacts with Vue.js frontend
- State Management: Vuex store manages application state
- API Requests: Frontend makes HTTP calls to PharmaCoreApi
- Business Logic: API controllers process requests
- Data Layer: CouchRepository interacts with CouchDB
- Response: Data flows back through layers to frontend
- UI Update: Vue components reactively update display
- Apache CouchDB: NoSQL document database for data persistence
- Azure Application Insights: Application performance monitoring
- File System: Document and file storage
- External HTTP Services: Configured via HttpClient
Backend:
- ASP.NET Core 3.1 / 5.0
- C# / .NET
- NLog for logging
- Microsoft.ApplicationInsights
- Newtonsoft.Json
Frontend:
- Vue.js 2.6
- Vuetify 2.5 (Material Design)
- Vue Router 3.5
- Vuex 3.6
- Moment.js for date handling
Database:
- Apache CouchDB (NoSQL document database)
The Pharma application uses NLog as its primary logging framework for structured logging and diagnostics in the backend (PharmaCoreApi).
- File Logging: All logs (including trace-level) are written to daily log files under the
Logdirectory, with detailed timestamps, messages, and stack traces for exceptions. - Application Insights Integration: NLog is extended with the
Microsoft.ApplicationInsights.NLogTargetto send logs and telemetry data directly to Azure Application Insights for centralized monitoring, performance tracking, and diagnostics. - Exception Handling: The backend uses a global exception handler (see
ExtensionHelper.ConfigureExceptionHandler) to capture unhandled exceptions, log them using NLog, and return standardized error responses. - Configuration: Logging rules and targets are defined in
nlog.config, specifying log levels, output formats, and destinations (file and Application Insights). - Telemetry Context: Additional context properties (such as thread ID) are attached to Application Insights logs for enhanced traceability.
Key Files:
PharmaCoreApi/nlog.config: NLog configuration (targets, rules, Application Insights integration)PharmaCoreApi/Startup.cs: NLog initialization and logger injectionPharmaCoreApi/Helper/ExtensionHelper.cs: Centralized exception logging
Benefits:
- Centralized and persistent log storage (file and cloud)
- Real-time monitoring and alerting via Azure Application Insights
- Detailed error tracking and diagnostics for faster troubleshooting
- Compliance with operational and audit requirements
For more details, see the nlog.config file and the ConfigureExceptionHandler method in the backend source code.
Development Tools:
- Vue CLI 4.5
- Babel
- ESLint
- Sass/SCSS
Pharma/
βββ Pharma.sln # Visual Studio solution file
β
βββ PharmaClient/ # Frontend ASP.NET Core + Vue.js application
β βββ PharmaClient.csproj # Client project file (.NET 5.0)
β βββ Program.cs # Application entry point
β βββ Startup.cs # ASP.NET Core configuration
β βββ appsettings.json # Application configuration
β βββ appsettings.Development.json # Development environment config
β β
β βββ clientapp/ # Vue.js SPA
β β βββ package.json # NPM dependencies
β β βββ vue.config.js # Vue CLI configuration
β β βββ babel.config.js # Babel transpiler config
β β βββ public/ # Static assets
β β β βββ index.html # HTML entry point
β β β
β β βββ src/ # Vue.js source code
β β βββ App.vue # Root Vue component
β β βββ main.js # Vue application entry
β β βββ components/ # Vue components
β β β βββ calender.vue # Calendar/scheduling
β β β βββ Modal.vue # Modal dialogs
β β β βββ OnSiteApp.vue # On-site appointments
β β β βββ OrderEntryList.vue # Order management
β β β βββ PharmaDetails.vue # Pharmacy details display
β β β βββ ProductList.vue # Product catalog
β β β βββ ServiceBook.vue # Service booking
β β β βββ StartService.vue # Service initiation
β β β βββ ViewOnSite.vue # On-site view
β β β βββ Exceptions/ # Error handling components
β β β βββ ServiceBookPanels/ # Service booking sub-components
β β βββ Model/ # Data models
β β βββ plugins/ # Vue plugins (Vuetify)
β β βββ router/ # Vue Router configuration
β β βββ store/ # Vuex state management
β β
β βββ Properties/
β βββ launchSettings.json # Launch profiles
β
βββ PharmaCoreApi/ # Backend REST API
βββ PharmaCoreApi.csproj # API project file (.NET Core 3.1)
βββ Program.cs # Application entry point
βββ Startup.cs # API configuration and DI
βββ appsettings.json # API configuration
βββ appsettings.Development.json # Development config
βββ nlog.config # NLog logging configuration
β
βββ Controllers/ # API endpoints
β βββ PharmaController.cs # Pharmacy operations
β βββ FileController.cs # File handling
β
βββ DBContext/ # Data access layer
β βββ CouchRepository.cs # CouchDB implementation
β βββ ICouchRepository.cs # Repository interface
β
βββ Helper/ # Utility classes
β βββ Aes.cs # AES encryption
β βββ ExtensionHelper.cs # Extension methods
β βββ StreamHelper.cs # Stream utilities
β βββ TrimmingConverter.cs # JSON trimming
β
βββ Models/ # Data transfer objects
β βββ PharmaDetails.cs # Pharmacy entity
β βββ Documents.cs # Document model
β βββ DrugDetails.cs # Drug information
β βββ ErrorDetails.cs # Error handling
β βββ [Other models] # Various DTOs
β
βββ Properties/
βββ launchSettings.json # Launch profiles
βββ serviceDependencies*.json # Azure dependencies
- PharmaClient: Frontend web application serving Vue.js SPA
- PharmaCoreApi: RESTful API backend for data operations
- Controllers: HTTP endpoint handlers
- DBContext: Database abstraction and CouchDB integration
- Helper: Utility functions for encryption, streams, extensions
- Models: Data structures and DTOs
- Components: Reusable Vue UI components
- Store: Centralized Vuex state management
- appsettings.json: Database connection strings, API URLs, secrets
- nlog.config: Logging configuration and targets
- vue.config.js: Vue CLI and webpack configuration
- package.json: NPM dependencies and scripts
- launchSettings.json: Development server profiles
Backend Requirements:
- .NET Core 3.1 SDK (for PharmaCoreApi)
- .NET 5.0 SDK (for PharmaClient)
- Download from: https://dotnet.microsoft.com/download
Frontend Requirements:
- Node.js: v14.x or v16.x
- NPM: v6.x or higher (comes with Node.js)
- Download from: https://nodejs.org/
Database:
- Apache CouchDB: v3.x or higher
- Installation guide: https://docs.couchdb.org/en/stable/install/index.html
- Default port: 5984
- Required permissions: Database admin access
Cloud Services (Optional):
- Azure Application Insights: For monitoring and telemetry
- Instrumentation key required in appsettings.json
Configure the following in PharmaCoreApi/appsettings.json:
{
"CouchDB": {
"URL": "http://localhost:5984",
"User": "admin:password_in_base64",
"Database": "pharma_db"
},
"ApplicationInsights": {
"InstrumentationKey": "your-instrumentation-key"
}
}π Secure Handling:
- Never commit credentials to version control
- Use User Secrets for local development:
dotnet user-secrets set "CouchDB:User" "admin:yourpassword"
- Use Azure Key Vault or environment variables in production
- The project uses UserSecretsId:
bb2197da-9e03-4b44-9845-cda88f4848cb
- Windows: Windows 10/11, Windows Server 2016+
- Linux: Ubuntu 18.04+, Debian 10+, RHEL 7+
- macOS: macOS 10.15 (Catalina) or higher
git clone <repository-url>
cd Pharmacd PharmaCoreApi
dotnet restoreEdit appsettings.Development.json or use User Secrets:
dotnet user-secrets set "CouchDB:URL" "http://localhost:5984"
dotnet user-secrets set "CouchDB:User" "admin:yourpassword"
dotnet user-secrets set "CouchDB:Database" "pharma_db"dotnet buildcd ../PharmaClient/clientappnpm installUpdate API base URL in frontend configuration if needed (typically in environment files or Vuex store).
curl -X PUT http://admin:password@localhost:5984/pharma_dbOr use the CouchDB web interface (Fauxton):
- Navigate to
http://localhost:5984/_utils - Create a new database named
pharma_db
Create .env.local in PharmaClient/clientapp/:
VUE_APP_API_BASE_URL=https://localhost:5001
VUE_APP_ENABLE_LOGGING=true{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning"
}
},
"AllowedHosts": "*",
"CouchDB": {
"URL": "http://localhost:5984",
"User": "<username>:<password>",
"Database": "pharma_db"
},
"ApplicationInsights": {
"InstrumentationKey": "your-key-here"
}
}Terminal 1 - Backend API:
cd PharmaCoreApi
dotnet runAPI will be available at: https://localhost:5001 and http://localhost:5000
Terminal 2 - Frontend Client:
cd PharmaClient
dotnet runClient will be available at: https://localhost:5003 (or configured port)
Terminal 3 - Vue.js Dev Server (optional):
cd PharmaClient/clientapp
npm run serveVue dev server: http://localhost:8080
# From repository root
dotnet run --project PharmaCoreApi/PharmaCoreApi.csproj
dotnet run --project PharmaClient/PharmaClient.csproj# Backend API
docker build -t pharma-api:latest -f PharmaCoreApi/Dockerfile .
# Frontend Client
docker build -t pharma-client:latest -f PharmaClient/Dockerfile .Create docker-compose.yml:
version: '3.8'
services:
couchdb:
image: couchdb:3
ports:
- "5984:5984"
environment:
COUCHDB_USER: admin
COUCHDB_PASSWORD: password
volumes:
- couchdb-data:/opt/couchdb/data
pharma-api:
image: pharma-api:latest
ports:
- "5001:80"
environment:
CouchDB__URL: http://couchdb:5984
CouchDB__User: admin:password
CouchDB__Database: pharma_db
depends_on:
- couchdb
pharma-client:
image: pharma-client:latest
ports:
- "5003:80"
depends_on:
- pharma-api
volumes:
couchdb-data:Run containers:
docker-compose up -d# Backend
cd PharmaCoreApi
dotnet publish -c Release -o ./publish
# Frontend
cd PharmaClient/clientapp
npm run buildcd PharmaCoreApi/publish
dotnet PharmaCoreApi.dll-
Check API Health:
curl https://localhost:5001/api/health
-
Verify CouchDB Connection:
curl http://localhost:5984/_all_dbs
-
Access Frontend:
- Navigate to
https://localhost:5003 - Verify login page loads
- Check browser console for errors
- Navigate to
-
Review Logs:
- Check
PharmaCoreApi/Log/directory for NLog outputs - Review Application Insights for telemetry (if configured)
- Check
# Run all unit tests
dotnet test
# Run with coverage
dotnet test /p:CollectCoverage=true /p:CoverageReportFormat=opencover# Ensure test database is available
# Run integration tests
dotnet test --filter Category=Integrationcd PharmaClient/clientapp
# Run Vue component tests
npm run test:unit
# Run end-to-end tests
npm run test:e2eBackend:
# Code analysis (configure in .csproj)
dotnet build /p:RunAnalyzers=trueFrontend:
cd PharmaClient/clientapp
# ESLint
npm run lint
# Fix auto-fixable issues
npm run lint -- --fix- Minimum Coverage: 70%
- Critical Paths: 90%
- Controllers: 80%
- Utilities/Helpers: 85%
- Build: Must succeed without errors
- Tests: 100% pass rate
- Code Coverage: β₯ 70%
- Security Vulnerabilities: 0 critical or high
- Code Smells: < 5 major issues
- Duplication: < 3%
- User Authentication: Configured in ASP.NET Core Identity (or custom implementation)
- API Authorization: Bearer token-based authentication
- Role-Based Access Control: Admin, ServiceTech, User roles
- CORS Policy: Configured in Startup.cs for allowed origins
- Development: .NET User Secrets (
dotnet user-secrets) - Staging/Production: Azure Key Vault or environment variables
- Database Credentials: Base64-encoded in appsettings, encrypted in transit
- API Keys: Never hardcode; use configuration providers
- Encryption: AES encryption for sensitive data (see
Helper/Aes.cs)
| Classification | Examples | Handling Requirements |
|---|---|---|
| Public | Product catalog, hours | No special handling |
| Internal | Service logs, analytics | Restricted to authorized users |
| Confidential | Customer PII, pharmacy details | Encrypted at rest and in transit |
| Restricted | Authentication credentials | Encrypted, access-logged, vault-stored |
- β Always use HTTPS in production
- β Enable HSTS (HTTP Strict Transport Security)
- β Implement proper input validation and sanitization
- β Use parameterized queries to prevent injection attacks
- β
Keep dependencies updated (use
dotnet outdatedandnpm audit) - β Enable Content Security Policy (CSP) headers
- β Implement rate limiting on API endpoints
- β Log security events for audit trails
- β Regular security scanning with tools like SonarQube
- CouchDB admin credentials in Base64 (consider OAuth integration)
- CORS policy must be tightly controlled for production
- Application Insights may log sensitive data; configure filtering
- File uploads require size limits and content-type validation
Recommended Pipeline (Azure DevOps / GitHub Actions):
- Source: Trigger on push to main/develop branches
- Build:
- Restore NuGet packages
- Build .NET projects
- Run NPM install and build
- Test:
- Run unit tests
- Run integration tests
- Generate code coverage reports
- Quality Gates:
- SonarQube analysis
- Security vulnerability scan
- Package:
- Create deployment artifacts
- Build Docker images
- Deploy:
- Deploy to target environment
- Run smoke tests
- Notify: Send deployment status notifications
- Purpose: Active development and testing
- URL:
https://dev.pharma.local - Database: dev_pharma_db
- Auto-deploy: On commit to
developbranch
- Purpose: Quality assurance testing, pre-production validation
- URL:
https://qa.pharma.local - Database: qa_pharma_db
- Deploy: Manual approval from develop branch
- Purpose: Final user acceptance testing before production
- URL:
https://uat.pharma.local - Database: uat_pharma_db
- Deploy: Manual approval from QA branch or after QA sign-off
- Purpose: Live production environment
- URL:
https://pharma.yourcompany.com - Database: prod_pharma_db
- Deploy: Manual approval from
mainbranch - Backup: Automated daily backups
# 1. Build artifacts
dotnet publish PharmaCoreApi/PharmaCoreApi.csproj -c Release -o ./artifacts/api
cd PharmaClient/clientapp && npm run build && cd ../..
# 2. Stop running services
systemctl stop pharma-api
systemctl stop pharma-client
# 3. Backup current version
cp -r /var/www/pharma-api /var/www/pharma-api.backup
cp -r /var/www/pharma-client /var/www/pharma-client.backup
# 4. Deploy new version
cp -r ./artifacts/api/* /var/www/pharma-api/
cp -r ./PharmaClient/clientapp/dist/* /var/www/pharma-client/
# 5. Update configuration
cp appsettings.Production.json /var/www/pharma-api/appsettings.json
# 6. Start services
systemctl start pharma-api
systemctl start pharma-client
# 7. Verify deployment
curl https://localhost:5001/api/healthname: Deploy to Production
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- name: Build and Publish
run: |
dotnet publish -c Release
- name: Deploy to Server
# Add deployment steps# 1. Stop current services
systemctl stop pharma-api pharma-client
# 2. Restore from backup
rm -rf /var/www/pharma-api
rm -rf /var/www/pharma-client
mv /var/www/pharma-api.backup /var/www/pharma-api
mv /var/www/pharma-client.backup /var/www/pharma-client
# 3. Restart services
systemctl start pharma-api pharma-client
# 4. Verify rollback
curl https://localhost:5001/api/health# Restore from CouchDB backup
curl -X POST http://admin:password@localhost:5984/_replicate \
-H "Content-Type: application/json" \
-d '{
"source": "pharma_db_backup_YYYYMMDD",
"target": "pharma_db",
"create_target": true
}'- Version Bump: Update version in project files
- Changelog: Document changes in CHANGELOG.md
- Tag Release: Create Git tag (e.g.,
v1.2.0) - Build Artifacts: Generate release artifacts
- QA Approval: Obtain sign-off from QA team
- Deploy to Production: Execute deployment
- Smoke Tests: Verify critical functionality
- Monitor: Watch logs and metrics for issues
- Announce: Notify stakeholders of release
- Development:
https://localhost:5001 - Production:
https://api.pharma.yourcompany.com
GET /api/Pharma/GetPharmaDetails/{id}
- Description: Retrieve pharmacy details by ID
- Auth: Required (Bearer token)
- Parameters:
id(string) - Pharmacy identifier - Response:
200 OKwith PharmaDetails object
POST /api/Pharma/SavePharmaDetails
- Description: Create or update pharmacy details
- Auth: Required
- Body: PharmaDetails object (JSON)
- Response:
201 Createdwith saved entity
GET /api/Pharma/ListPharmas
- Description: List all pharmacies
- Auth: Required
- Query Params:
page,limit,search - Response:
200 OKwith array of pharmacies
PUT /api/Pharma/UpdatePharmaDetails/{id}
- Description: Update existing pharmacy
- Auth: Required
- Parameters:
id(string) - Body: UpdatePharmaDetails object
- Response:
200 OK
DELETE /api/Pharma/DeletePharma/{id}
- Description: Delete pharmacy record
- Auth: Required (Admin only)
- Parameters:
id(string) - Response:
204 No Content
POST /api/File/Upload
- Description: Upload file/document
- Auth: Required
- Body: Multipart form data
- Response:
200 OKwith file metadata
GET /api/File/Download/{id}
- Description: Download file by ID
- Auth: Required
- Parameters:
id(string) - Response:
200 OKwith file stream
Request:
GET /api/Pharma/GetPharmaDetails/123 HTTP/1.1
Host: localhost:5001
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Response:
{
"id": "123",
"name": "Central Pharmacy",
"address": "123 Main St, City, State 12345",
"phone": "(555) 123-4567",
"email": "contact@centralpharmacy.com",
"hoursOfOperation": {
"monday": "9:00 AM - 6:00 PM",
"tuesday": "9:00 AM - 6:00 PM",
"saturday": "10:00 AM - 4:00 PM"
},
"services": ["Prescription", "Consultation", "Delivery"]
}Request:
POST /api/Pharma/SavePharmaDetails HTTP/1.1
Host: localhost:5001
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json
{
"name": "New Pharmacy",
"address": "456 Oak Ave, Town, State 67890",
"phone": "(555) 987-6543",
"email": "info@newpharmacy.com"
}Response:
{
"id": "124",
"name": "New Pharmacy",
"address": "456 Oak Ave, Town, State 67890",
"phone": "(555) 987-6543",
"email": "info@newpharmacy.com",
"createdAt": "2026-01-07T10:30:00Z"
}- Type: Bearer Token (JWT)
- Header:
Authorization: Bearer <token> - Token Lifetime: 60 minutes
- Refresh: Use refresh token endpoint
| Status Code | Description | Example |
|---|---|---|
| 200 | Success | Request completed successfully |
| 201 | Created | Resource created successfully |
| 400 | Bad Request | Invalid input parameters |
| 401 | Unauthorized | Missing or invalid token |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Resource not found |
| 500 | Internal Server Error | Server-side error |
Error Response Format:
{
"statusCode": 400,
"message": "Invalid pharmacy ID format",
"details": "The ID must be a valid GUID",
"timestamp": "2026-01-07T10:30:00Z",
"path": "/api/Pharma/GetPharmaDetails/invalid-id"
}// Using Axios in Vue.js
import axios from 'axios';
async function createPharmacy() {
try {
const response = await axios.post('/api/Pharma/SavePharmaDetails', {
name: 'West Side Pharmacy',
address: '789 West Blvd, City, State 11111',
phone: '(555) 222-3333',
email: 'westside@pharmacy.com',
hoursOfOperation: {
monday: '8:00 AM - 8:00 PM',
tuesday: '8:00 AM - 8:00 PM',
wednesday: '8:00 AM - 8:00 PM',
thursday: '8:00 AM - 8:00 PM',
friday: '8:00 AM - 8:00 PM',
saturday: '9:00 AM - 5:00 PM',
sunday: 'Closed'
}
});
console.log('Pharmacy created:', response.data);
return response.data;
} catch (error) {
console.error('Error creating pharmacy:', error);
throw error;
}
}// Vuex action for service booking
async bookService({ commit }, serviceData) {
commit('SET_LOADING', true);
try {
const response = await this.$http.post('/api/Service/Book', {
pharmacyId: serviceData.pharmacyId,
serviceType: serviceData.serviceType,
scheduledDate: serviceData.date,
technicianId: serviceData.technicianId,
notes: serviceData.notes
});
commit('ADD_BOOKING', response.data);
commit('SET_LOADING', false);
return response.data;
} catch (error) {
commit('SET_ERROR', error.message);
commit('SET_LOADING', false);
throw error;
}
}1. User navigates to "Add Pharmacy" page
2. Fills out pharmacy details form
3. Uploads pharmacy license documents
4. Submits form
5. System validates inputs
6. API saves data to CouchDB
7. Confirmation email sent
8. User redirected to pharmacy details view
1. User searches for pharmacy
2. Views pharmacy details and available services
3. Selects service type (e.g., "Equipment Maintenance")
4. Chooses date/time from calendar
5. Assigns technician
6. Adds pre-service notes
7. Confirms booking
8. System creates service record
9. Technician receives notification
10. Booking appears in calendar view
A pharmacy needs monthly equipment calibration:
- Pharmacy admin logs in
- Navigates to "Service Book" component
- Selects "Preventive Maintenance" service
- Schedules recurring monthly appointment
- System generates service orders
- Technicians receive automated notifications
- Service completion tracked in "Service" panel
- Post-service reports uploaded via FileController
Equipment malfunction requiring immediate attention:
- Pharmacy calls support hotline
- Support staff creates "OnSiteApp" entry
- Priority marked as "Emergency"
- System notifies available technicians
- Technician accepts assignment
- Real-time status updates in "ViewOnSite"
- Issue documented in "Comments" panel
- Resolution recorded and signed off
We follow Git Flow branching model:
main (production)
βββ release/v1.x (release candidates)
βββ develop (integration branch)
βββ feature/pharmacy-search (new features)
βββ feature/service-calendar
βββ bugfix/order-entry-validation (bug fixes)
βββ hotfix/security-patch (critical fixes)
Branch Naming Conventions:
feature/<short-description>- New featuresbugfix/<issue-number>-<description>- Bug fixeshotfix/<critical-issue>- Production hotfixesrelease/v<version>- Release branchesdocs/<topic>- Documentation updates
Follow Conventional Commits specification:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, no logic change)refactor: Code refactoringperf: Performance improvementstest: Adding or updating testschore: Build process or auxiliary tool changesci: CI/CD pipeline changes
Examples:
feat(pharmacy): add pharmacy search filtering
Implement advanced search with filters for location,
services, and hours of operation.
Closes #123
fix(service-book): resolve date picker timezone issue
Fixed bug where service appointments were being scheduled
in incorrect timezone causing booking conflicts.
Fixes #456
-
Create Feature Branch
git checkout develop git pull origin develop git checkout -b feature/your-feature-name
-
Make Changes
- Write clean, documented code
- Follow coding standards
- Add unit tests
- Update documentation
-
Commit Changes
git add . git commit -m "feat(module): descriptive message"
-
Push to Remote
git push origin feature/your-feature-name
-
Open Pull Request
- Title: Clear, concise description
- Description: What, why, how
- Link related issues
- Add screenshots/GIFs if UI changes
- Request reviewers
-
Code Review
- Address review comments
- Update code as needed
- Push updates to same branch
-
Merge Requirements
- β All CI checks pass
- β At least 2 approvals
- β No merge conflicts
- β Code coverage maintained
- β Documentation updated
-
Merge to Develop
- Use "Squash and merge" for feature branches
- Use "Merge commit" for release branches
- Delete feature branch after merge
- Follow Microsoft C# Coding Conventions
- Use PascalCase for public members
- Use camelCase for private fields, parameters
- Prefix interfaces with
I(e.g.,ICouchRepository) - Use meaningful, descriptive names
- Add XML documentation comments for public APIs
- Keep methods focused (Single Responsibility Principle)
- Maximum method length: 50 lines
- Follow Vue.js Style Guide
- Use camelCase for variables and functions
- Use PascalCase for component names
- 2-space indentation
- Use ES6+ features (arrow functions, destructuring, async/await)
- Prefer
constoverlet, avoidvar - Add JSDoc comments for complex functions
- Component file naming:
PascalCase.vue
- Maximum line length: 120 characters
- Use meaningful variable names (avoid
x,temp,data) - No commented-out code in commits
- Remove console.log statements before committing
- Use TODO comments sparingly with issue references
As a Reviewer:
- β Verify code meets functional requirements
- β Check for security vulnerabilities
- β Ensure proper error handling
- β Validate test coverage
- β Review for performance issues
- β Confirm documentation is updated
- β Provide constructive, specific feedback
- β Approve or request changes within 24 hours
Review Checklist:
- Code compiles without errors
- All tests pass
- No security vulnerabilities introduced
- Follows coding standards
- Properly handles edge cases
- Sufficient logging added
- Documentation updated
- No hardcoded values or secrets
- API changes backward compatible (or documented)
- In development
Added
- Initial release of Pharma Management System
- Pharmacy details management
- Service booking functionality
- On-site appointment tracking
- Order entry processing
- Calendar/scheduling interface
- File upload/download capabilities
- CouchDB integration
- NLog structured logging
- Application Insights monitoring
- Vue.js SPA with Vuetify UI
- RESTful API with ASP.NET Core
- User authentication and authorization
- Hours of operation management
- Contact management
- Pre/post-service workflows
- Exception handling components
Known Issues
- Calendar timezone handling needs improvement
- File upload size limited to 10MB
- Search functionality does not support fuzzy matching
- Advanced Search: Fuzzy matching, filters, autocomplete
- Mobile App: React Native companion app
- Reporting Dashboard: Analytics and KPIs visualization
- Email Notifications: Automated service reminders
- Multi-language Support: i18n implementation
- Inventory Management: Track pharmacy inventory levels
- Prescription Integration: Connect with prescription systems
- SMS Notifications: Two-way SMS for appointments
- Offline Mode: PWA with offline capabilities
- Advanced Analytics: ML-based insights and predictions
- Third-party Integrations: Pharmacy benefit managers (PBMs)
- E-signature Support: Digital signatures for service completion
- Video Consultation: Telemedicine integration
- Advanced Scheduling: AI-powered technician routing
- Blockchain for audit trails
- IoT device integration
- Voice assistant integration (Alexa, Google Assistant)
- Advanced reporting with Power BI embedding
- Multi-tenant architecture for SaaS offering
- CouchDB Migration: Evaluate migration to MongoDB or PostgreSQL by Q4 2026
- .NET Core 3.1: Upgrade to .NET 6+ LTS (End of support: Dec 2022)
- Vue 2: Migrate to Vue 3 Composition API by Q3 2026
Symptoms: PharmaCoreApi crashes immediately after starting Cause: CouchDB connection failure Fix:
# Check CouchDB is running
curl http://localhost:5984
# Verify credentials in appsettings.json
# Ensure database exists
curl -X PUT http://admin:password@localhost:5984/pharma_dbSymptoms: Frontend loads but displays white screen Cause: Build configuration or router issue Fix:
# Clear node_modules and reinstall
cd PharmaClient/clientapp
rm -rf node_modules package-lock.json
npm install
# Rebuild
npm run build
# Check browser console for errorsSymptoms: API calls fail with CORS policy error
Cause: Frontend origin not allowed in API CORS configuration
Fix:
Edit PharmaCoreApi/Startup.cs:
services.AddCors(options =>
{
options.AddPolicy("AllowedOrigins",
builder => builder
.WithOrigins("https://localhost:5003", "http://localhost:8080")
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials());
});Symptoms: Upload button doesn't work or returns 413 error
Cause: Request size limit exceeded
Fix:
Add to PharmaCoreApi/Startup.cs:
services.Configure<FormOptions>(options =>
{
options.MultipartBodyLengthLimit = 52428800; // 50 MB
});Enable Detailed Logging:
// appsettings.Development.json
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"Microsoft": "Information",
"Microsoft.AspNetCore": "Debug"
}
}
}Vue.js Debug Mode:
// main.js
Vue.config.devtools = true;
Vue.config.productionTip = false;
Vue.config.silent = false;Check Logs:
# API logs
tail -f PharmaCoreApi/Log/internal-nlog.txt
tail -f PharmaCoreApi/Log/nlog-all-*.log
# System logs (Linux)
journalctl -u pharma-api -f- Maximum file upload size: 50 MB
- Concurrent users: Tested up to 100 simultaneous users
- CouchDB view queries may be slow for large datasets (>100k records)
- Calendar component doesn't support drag-and-drop rescheduling
- Reports generated synchronously (may timeout for large datasets)
Q: How do I reset my database?
curl -X DELETE http://admin:password@localhost:5984/pharma_db
curl -X PUT http://admin:password@localhost:5984/pharma_dbQ: Can I run this on Windows Server? A: Yes, install .NET runtime and IIS with ASP.NET Core hosting bundle.
Q: How do I add a new API endpoint? A: Create method in appropriate controller, follow RESTful conventions, add route attribute.
Q: How do I customize the Vue.js theme?
A: Edit PharmaClient/clientapp/src/plugins/vuetify.js to change Vuetify theme colors.
Q: Where are uploaded files stored?
A: Check FileController.cs - likely in file system or CouchDB attachments.
- Name: [Product Owner Name]
- Email: product.owner@yourcompany.com
- Role: Defines product vision, prioritizes features, stakeholder liaison
- Name: [Tech Lead Name]
- Email: tech.lead@yourcompany.com
- Role: Architecture decisions, code reviews, technical direction
- Backend Lead: backend.lead@yourcompany.com
- Frontend Lead: frontend.lead@yourcompany.com
- DevOps Engineer: devops@yourcompany.com
- QA Lead: qa.lead@yourcompany.com
- Level 1 Support: support@yourcompany.com
- On-Call Rotation: oncall@yourcompany.com (24/7)
- Business Hours: Monday-Friday, 9 AM - 6 PM EST
- Emergency Hotline: +1 (555) 999-9999
- Level 1: Support team (support@yourcompany.com)
- Level 2: Development team leads
- Level 3: Technical owner / Senior architects
- Critical: Product owner + CTO
- Slack: #pharma-team, #pharma-support
- Email: pharma-team@yourcompany.com
- Jira: [Project Board URL]
- Wiki: [Confluence/Documentation URL]
This project is proprietary software developed by [Your Company Name].
Copyright Β© 2026 [Your Company Name]. All rights reserved.
- This software is licensed for internal use only
- Redistribution, modification, or commercial use is prohibited without written permission
- All rights reserved by [Your Company Name]
- Unauthorized copying, distribution, or use may result in legal action
This project uses open-source components with the following licenses:
- ASP.NET Core: MIT License
- Vue.js: MIT License
- Vuetify: MIT License
- NLog: BSD License
- CouchDB: Apache License 2.0
Full list of dependencies and licenses available in THIRD-PARTY-NOTICES.txt
- This software may contain confidential and proprietary information
- Usage is subject to company policies and agreements
- For licensing inquiries, contact: legal@yourcompany.com
- Patent pending (if applicable)
For questions, issues, or contributions:
- Check Documentation: Review this README and code comments
- Search Issues: Check existing GitHub issues
- Ask the Team: Post in #pharma-team Slack channel
- Create Issue: Open a new GitHub issue with details
- Contact Support: Email support@yourcompany.com
Built with β€οΈ by the Pharma Development Team
Last Updated: January 7, 2026