Skip to content

About

BioVera Pro, a comprehensive pharmacy management desktop application

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

13 Commits

Folders and files

Repository files navigation

BioVera Pro Logo

πŸ’Š BioVera Pro

A comprehensive pharmacy management desktop application

Java 21 JavaFX 21 MySQL 8.0 Windows License

Features β€’ Getting Started β€’ Architecture β€’ Database β€’ Contributing


πŸ“– About

BioVera Pro is a full-featured desktop application designed to streamline pharmacy operations. Built with Java and JavaFX, it provides an intuitive interface for managing products, sales, suppliers, orders, clients, and employees β€” all backed by a MySQL database with role-based access control.

Whether you're running a small independent pharmacy or managing a larger operation, BioVera Pro gives you the tools to track inventory, process sales, manage supplier orders, and generate insightful reports β€” all from a single, polished desktop interface.

✨ Features

Module Description
πŸ” Authentication Secure login system with role-based access (Admin / Employee)
πŸ“Š Dashboard Real-time statistics and key performance indicators
πŸ’Š Product Management Full CRUD for pharmaceutical products with barcode support and low-stock alerts
πŸ›’ Sales Management Point-of-sale interface with automatic stock deduction and receipt generation
πŸ“¦ Order Management Supplier order tracking with status workflow (Pending β†’ Received β†’ Cancelled)
πŸ‘₯ Client Management Client database with medical history tracking
🏭 Supplier Management Supplier directory with contact information
πŸ‘€ User Management Admin panel for managing system users and employees
πŸ“„ Reports & Export Generate and export reports as PDF documents
πŸ—ƒοΈ Database Backup Built-in database backup functionality
πŸ“‹ Activity Logs Full audit trail of all system actions
πŸ”” Notifications Toast notification system for real-time user feedback
πŸŒ™ Dark Mode Toggle between light and dark themes

πŸ“Έ Screenshots

Login Screen Dashboard

Product Management Order Management

Reports & Stats

πŸ› οΈ Tech Stack

Technology Purpose
Java 21 Core language
JavaFX 21 UI framework (FXML + CSS)
MySQL 8.0 Relational database
MySQL Connector/J 8.0.33 JDBC driver
OpenPDF 1.3.42 PDF report generation
jpackage Native Windows executable packaging

πŸ“‹ Prerequisites

Before running BioVera Pro, make sure you have the following installed:

Requirement Version Link
JDK 21+ Download
MySQL 8.0+ Download
JavaFX SDK 21 Included in lib/lib/

πŸš€ Getting Started

1. Clone the repository

git clone https://github.com/Raed-Jani/pharmacy_management_system.git
cd pharmacy

2. Set up the database

Start your MySQL server, then run the provided SQL script:

mysql -u root -p < database/pharmacie_db.sql

This will:

  • Create the pharmacie_db database with all required tables
  • Set up database indexes and optimized views
  • Create MySQL users with appropriate privileges
  • Insert sample data for testing

Note

Default database users created by the script:

User Password Privileges
admin_pharmacie admin_password_123 Full access
employe_pharmacie employe_password_123 Limited access

3. Configure the database connection

Open src/com/pharmacie/utils/DBConnection.java and set your MySQL root password:

private static final String DB_PASSWORD = "YOUR_MYSQL_PASSWORD"; // ← Replace this

4. Compile and run

Option A β€” Using IntelliJ IDEA (Recommended)

  1. Open the project in IntelliJ IDEA
  2. Right-click the resources/ folder β†’ Mark Directory as β†’ Resources Root
  3. Add all JARs from lib/ and lib/lib/ to your module dependencies
  4. Add VM options for JavaFX modules:
    --module-path lib/lib --add-modules javafx.controls,javafx.fxml,javafx.graphics,javafx.base
    
  5. Run Launcher.java

Option B β€” Using the command line

# Compile
javac --release 21 \
  -d out/production/pharmacie \
  -cp "lib/mysql-connector-j-8.0.33.jar;lib/openpdf-1.3.42.jar;lib/lib/javafx.base.jar;lib/lib/javafx.controls.jar;lib/lib/javafx.fxml.jar;lib/lib/javafx.graphics.jar" \
  -sourcepath src \
  src/com/pharmacie/Launcher.java

# Run
java --module-path lib/lib \
  --add-modules javafx.controls,javafx.fxml,javafx.graphics,javafx.base \
  -cp "out/production/pharmacie;lib/mysql-connector-j-8.0.33.jar;lib/openpdf-1.3.42.jar" \
  com.pharmacie.Launcher

5. Build a standalone executable (Windows)

A PowerShell script is included to package the app as a native Windows .exe using jpackage:

.\Build_BioVera_Exe.ps1

The executable will be generated at output_exe/BioVera Pro/BioVera Pro.exe.

You can also create a desktop shortcut:

.\Create_Desktop_Shortcut.ps1

πŸ”‘ Default Login Credentials

Username Password Role
admin password123 Administrator
employe1 password123 Employee
employe2 password123 Employee

Warning

These are development credentials. Change all default passwords before deploying to a production environment.

πŸ—οΈ Architecture

The project follows a clean layered architecture (Model β†’ DAO β†’ Service β†’ UI):

src/com/pharmacie/
β”‚
β”œβ”€β”€ Launcher.java                  # Application entry point
β”œβ”€β”€ MainApp.java                   # JavaFX Application class
β”‚
β”œβ”€β”€ model/                         # πŸ“¦ Data models (POJOs)
β”‚   β”œβ”€β”€ Client.java
β”‚   β”œβ”€β”€ CommandeFournisseur.java
β”‚   β”œβ”€β”€ Fournisseur.java
β”‚   β”œβ”€β”€ LigneCommandeFournisseur.java
β”‚   β”œβ”€β”€ LigneVente.java
β”‚   β”œβ”€β”€ LogActivite.java
β”‚   β”œβ”€β”€ Produit.java
β”‚   β”œβ”€β”€ Utilisateur.java
β”‚   └── Vente.java
β”‚
β”œβ”€β”€ dao/                           # πŸ—„οΈ Data Access Objects (JDBC)
β”‚   β”œβ”€β”€ ClientDAO.java
β”‚   β”œβ”€β”€ CommandeFournisseurDAO.java
β”‚   β”œβ”€β”€ FournisseurDAO.java
β”‚   β”œβ”€β”€ LigneCommandeFournisseurDAO.java
β”‚   β”œβ”€β”€ LigneVenteDAO.java
β”‚   β”œβ”€β”€ LogActiviteDAO.java
β”‚   β”œβ”€β”€ ProduitDAO.java
β”‚   β”œβ”€β”€ UtilisateurDAO.java
β”‚   └── VenteDAO.java
β”‚
β”œβ”€β”€ service/                       # βš™οΈ Business logic layer
β”‚   β”œβ”€β”€ AuthenticationService.java
β”‚   β”œβ”€β”€ DashboardStatisticsService.java
β”‚   β”œβ”€β”€ DatabaseBackupService.java
β”‚   β”œβ”€β”€ ExportService.java
β”‚   β”œβ”€β”€ GestionClientService.java
β”‚   β”œβ”€β”€ GestionCommande.java
β”‚   β”œβ”€β”€ GestionStock.java
β”‚   └── GestionVente.java
β”‚
β”œβ”€β”€ ui/                            # πŸ–₯️ User interface layer
β”‚   β”œβ”€β”€ controller/                #    FXML Controllers (12 screens)
β”‚   β”‚   β”œβ”€β”€ AccueilController.java
β”‚   β”‚   β”œβ”€β”€ BaseController.java
β”‚   β”‚   β”œβ”€β”€ ConsultationLogsController.java
β”‚   β”‚   β”œβ”€β”€ DashboardController.java
β”‚   β”‚   β”œβ”€β”€ GestionClientsController.java
β”‚   β”‚   β”œβ”€β”€ GestionCommandesController.java
β”‚   β”‚   β”œβ”€β”€ GestionFournisseursController.java
β”‚   β”‚   β”œβ”€β”€ GestionProduitsController.java
β”‚   β”‚   β”œβ”€β”€ GestionUtilisateursController.java
β”‚   β”‚   β”œβ”€β”€ GestionVentesController.java
β”‚   β”‚   β”œβ”€β”€ LoginController.java
β”‚   β”‚   └── RapportsController.java
β”‚   └── notification/
β”‚       └── ToastNotification.java
β”‚
β”œβ”€β”€ util/
β”‚   └── ThemeManager.java          # 🎨 Light/Dark theme toggling
β”œβ”€β”€ utils/
β”‚   └── DBConnection.java          # πŸ”— Database connection manager
└── exception/                     # ❌ Custom exceptions
    β”œβ”€β”€ ConnexionEchoueeException.java
    β”œβ”€β”€ ProduitIntrouvableException.java
    └── StockInsuffisantException.java

πŸ—„οΈ Database Schema

The application uses 10 tables organized around core pharmacy operations:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Utilisateur β”‚     β”‚    Client     β”‚     β”‚    Fournisseur       β”‚
│──────────────│     │──────────────│     │──────────────────────│
β”‚ id_utilisateurβ”‚    β”‚ id_client    β”‚     β”‚ id_fournisseur       β”‚
β”‚ login        β”‚     β”‚ nom          β”‚     β”‚ nom_societe          β”‚
β”‚ mot_de_passe β”‚     β”‚ prenom       β”‚     β”‚ adresse              β”‚
β”‚ role         β”‚     β”‚ telephone    β”‚     β”‚ telephone            β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚ email        β”‚     β”‚ email                β”‚
       β”‚             β”‚ historique_  β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚             β”‚  medical     β”‚                β”‚
       β”‚             β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜                β”‚
       β”‚                    β”‚                        β”‚
       β–Ό                    β–Ό                        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    Vente     β”‚     β”‚ LigneVente   β”‚     β”‚ CommandeFournisseur  β”‚
│──────────────│     │──────────────│     │──────────────────────│
β”‚ id_vente     │◄───▢│ id_vente     β”‚     β”‚ id_commande          β”‚
β”‚ date_vente   β”‚     β”‚ id_produit   β”‚     β”‚ date_creation        β”‚
β”‚ total_vente  β”‚     β”‚ quantite     β”‚     β”‚ date_reception       β”‚
β”‚ id_client    β”‚     β”‚ prix_appliqueβ”‚     β”‚ statut               β”‚
β”‚ id_utilisateurβ”‚    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚ id_fournisseur       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚                        β”‚
                            β–Ό                        β–Ό
                     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                     β”‚   Produit    β”‚     β”‚   LigneCommande      β”‚
                     │──────────────│     │──────────────────────│
                     β”‚ id_produit   │◄───▢│ id_commande          β”‚
                     β”‚ nom          β”‚     β”‚ id_produit           β”‚
                     β”‚ code_barre   β”‚     β”‚ quantite_commandee   β”‚
                     β”‚ prix_unitaireβ”‚     β”‚ prix_achat           β”‚
                     β”‚ quantite_stockβ”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚ seuil_alerte β”‚
                     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ LogActivite  β”‚     Tracks all system actions
│──────────────│     for auditing purposes
β”‚ id_log       β”‚
β”‚ date_action  β”‚
β”‚ type_action  β”‚
β”‚ description  β”‚
β”‚id_utilisateurβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Database views included for quick analytics:

View Purpose
V_Produits_Alerte Products below their stock alert threshold
V_CA_Journalier Daily revenue summary
V_Top_Produits Best-selling products ranking

πŸ“ Project Structure

pharmacie/
β”œβ”€β”€ src/                           # Java source code
β”œβ”€β”€ resources/
β”‚   β”œβ”€β”€ fxml/                      # FXML view definitions (11 screens)
β”‚   β”œβ”€β”€ css/                       # Stylesheets (light & dark themes)
β”‚   └── images/                    # Application icons and assets
β”œβ”€β”€ database/
β”‚   └── pharmacie_db.sql           # Complete database setup script
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ mysql-connector-j-8.0.33.jar
β”‚   β”œβ”€β”€ openpdf-1.3.42.jar
β”‚   └── lib/                       # JavaFX SDK JARs & native DLLs
β”œβ”€β”€ Build_BioVera_Exe.ps1          # Build native Windows executable
β”œβ”€β”€ Create_Desktop_Shortcut.ps1    # Create desktop shortcut
β”œβ”€β”€ app_icon.ico                   # Windows executable icon
β”œβ”€β”€ .editorconfig                  # Code style configuration
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
└── README.md

πŸ“„ License

This project is licensed under the MIT License.

πŸ‘¨β€πŸ’» Author

Raed Jani β€” GitHub


About

BioVera Pro, a comprehensive pharmacy management desktop application

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages