Skip to content

Latest commit

 

History

81 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Pharma Core

Description

Pharma Core is a modern, cloud-based, multi-tenant pharmacy management platform designed specifically for officines in Burundi. It completely digitizes daily pharmacy operations—transforming everything from point-of-sale (POS) and inventory tracking to patient and supplier management into a single, seamless digital experience. By automating stock levels and surfacing intelligent alerts (like low stock or expiring medications), Pharma-Core empowers pharmacies to stop worrying about logistics and start focusing on delivering better patient care, all while guaranteeing complete data isolation and top-tier security.

Pharma Core isn't only pharmacy-facing: it also gives patients their own self-service portal. Patients sign up independently, browse nearby pharmacies, search medication availability, place and track orders, message the pharmacy, rate their experience, and keep a personal medication/health history—all from their own account, separate from the pharmacy's dashboard.

Home page

✨ Key Features

Product Description page

  • Point of Sale (POS): Fast and comprehensive checkout experience integrated directly with live inventory.
  • Smart Inventory Management: Automated, live updates on stock when items are sold or received from restock orders.
  • Intelligent Alerts: Automated push notifications in a centralized dashboard bell for low-stock and expiring-soon products based on custom thresholds (seuils).
  • Patient & Supplier Tracking (pharmacy-side CRM): Built-in modular CRM to log patient records, purchase history, and allergies at the point of sale, and to manage local/international suppliers.

Patient Portal

  • Patient Portal (patient-side app): A separate self-service experience where patients create their own account and can browse nearby pharmacies, search medication availability, place and track orders, message the pharmacy directly, rate their experience, and view their own order and medication history—independent of the pharmacy dashboard.
  • Analytics & Reporting: A real-time data overview to monitor daily sales metrics, alongside one-click full history JSON exports for local audits or external accounting.
  • Tailored for Burundi: Supports native business onboarding fields essential for local compliance (Devise FBU, NIF, RC, Commune, Province).
  • Multi-Tenant Security: Secure infrastructure ensuring strict Row Level Security (RLS) so that every pharmacy's data is heavily isolated and protected.

🌍 Impact for Pharmacies in Burundi

  • Eradicating Waste & Stockouts: Expiration and reorder alerts help prevent costly medical waste and ensure that critical medicines are never unexpectedly out of stock.
  • Modernizing the Ecosystem: Brings pharmacies away from paper ledgers or expensive, localized legacy software to an affordable, unified, and always-accessible cloud solution.
  • Regulatory Readiness: Makes compliance and audits a breeze by standardizing data collection (NIF/RC) and enabling instant data exports.

Architecture

pharma_care/
├── backend/    Express + Supabase (auth, CRUD, notifications, JSON export)
└── frontend/   React + Vite + TypeScript + Tailwind (Home, Auth, Dashboard, Patient Portal)
  • Two account types share the platform: facility_admin (pharmacy staff) and patient (self-service), each with their own signup flow, role-guarded routes, and dedicated API surface.
  • Each authenticated pharmacy gets its own row-scoped data (RLS on every table).
  • Authentication, deletion, sales checkout, restock receiving, alerts, and JSON export all live in the backend.
  • The frontend talks to the backend at /api/* (proxied by Vite in dev): /api/data serves the facility dashboard, while /api/patient serves the patient portal (pharmacy/medicine search, orders, messaging, ratings, notifications, profile).

How to?

1. Start the backend

cd backend
cp .env.example .env   # paste your Supabase keys
npm install
npm run dev            # http://localhost:3000

2. Start the frontend

cd frontend
cp .env.example .env   # VITE_SUPABASE_URL + VITE_SUPABASE_ANON_KEY
npm install
npm run dev            # http://localhost:5173

Visit http://localhost:5173 — sign up as a pharmacy to explore the dashboard, or sign up as a patient to explore the patient portal.

Features

Pharmacy side (facility_admin)

  • Landing page — services overview (POS, inventory, patients, suppliers, analytics, alerts) with Pharma Core branding.
  • Signup / Login — collects all pharmacy onboarding fields (Nom, Adresse, Commune, Province, Téléphone, Devise FBU, NIF, RC, alertes).
  • Dashboard — per-pharmacy isolated tables for POS, inventory, patients, suppliers, and restock orders. Stocks update live on sale and reception.
  • Patient records (CRM) — log walk-in patient info, contact details, allergies, and purchase history against POS sales.
  • Alerts — backend computes low-stock and expiring-soon alerts from your seuils; surfaced in the dashboard bell.
  • JSON export — full history download from the sidebar or settings page.
  • Logout & Delete account — both available from the dashboard sidebar.

Patient side (patient)

  • Signup / Login — patients create their own independent account (no pharmacy affiliation required).
  • Pharmacy & medicine search — browse nearby pharmacies and check medication availability across them.
  • Orders — place orders with a pharmacy, track status, and cancel if needed.
  • Prescriptions & health records — view prescription files and keep a personal medication/drug history.
  • Messaging — chat directly with a pharmacy about an order or question.
  • Notifications — order updates and pharmacy responses surfaced in-app.
  • Ratings — rate and review pharmacies after service.
  • Profile management — patients manage their own contact and account details.

Shared

  • Language switch - french and English both available
  • Dark/Light Mode - pages night mode integration

Pharmacy revenue card

Tech Stack

  • Frontend: React 18.3 + Vite + TypeScript + React Compiler.
  • Backend API: Node 22
  • Database & Auth: SupaBase (PostgreSQL + Auth + Row Level Security)
  • Routing: React Router
  • Styling: Tailwind CSS

About

This project is a local pharmacy management system designed to track inventories, sales, and customer data entirely offline. It allows pharmacists to monitor crucial metrics like total revenue, estimated sales, and profit margins. It also integrates a patient portal that helps them identify nearby open pharmacies and check if they have wanted-meds.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages