Skip to content

JustAGek/Medics

Repository files navigation

Medics

A pharmacy management platform with a Flutter mobile app, a FastAPI backend, and a Tauri desktop client. The system covers catalog and inventory, OCR invoice scanning, stock transfers, role-based access, and analytics for single or multi-branch pharmacies.

Highlights

  • Multi-org, multi-branch, role-based access control
  • Drug catalog with generics, packaging, registrations, and attachments
  • Inventory management with FIFO batch tracking and expiry alerts
  • OCR invoice scanning (Gemini) with review and confirmation flow
  • Stock transfers, shortages tracking, and supplier workflows
  • Desktop POS client (Tauri + React)

Screenshots

POS Terminal Receipt
POS terminal with cart and checkout Printed receipt view
Inventory Alerts
Inventory list with stock status Alerts and expiring items

Cross-branch search and stock view

Repo Structure

  • medics-backend/ - FastAPI backend (SQLAlchemy async + Alembic + PostgreSQL)
  • medics-flutter/ - Flutter mobile app (Riverpod + GoRouter)
  • medics-desktop/ - Tauri desktop app (React + Vite)
  • scripts/ - helper scripts (seed, install)
  • data/sample/ - sample datasets

Quick Start

Backend (Docker Compose)

From the repo root:

cd medics-backend
docker compose up --build

Notes:

  • Postgres 17 + FastAPI app with hot reload.
  • Alembic migrations run on container start.
  • bcrypt is pinned in requirements.txt for compatibility.

Flutter Mobile App

From the repo root:

cd medics-flutter
flutter pub get
flutter run

Notes:

  • The default backend base URL is configured for Genymotion host at 10.0.3.2:8000.

Desktop App (Tauri)

From the repo root:

cd medics-desktop
npm install
npm run dev

For a Tauri build:

npm run tauri dev

Seed the Drug Catalog

The catalog seed script loads and normalizes EDA JSON data into PostgreSQL.

python scripts/seed_catalog.py --db-url "postgresql://user:pass@host:5432/medics" --json-file data/sample/sample_medicines.json

Environment variable alternative:

DATABASE_URL="postgresql://user:pass@host:5432/medics" python scripts/seed_catalog.py

Sample Data Files

  • data/sample/sample_medicines.json - primary EDA JSON used by the seed script.
  • data/sample/medicines.json - extended EDA sample data.
  • data/sample/drug_packages.csv - package/price samples used during catalog exploration.

Security and Secrets

This repo includes service-account.json files for local development. Do not commit real credentials in production environments. Use environment-specific secrets management and replace any local files with your own credentials.

License

Proprietary. All rights reserved.

About

A pharmacy system on progress that will innovate the old inputs standard.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors