How nwgkgit/pharma works
This Expo pharmacy app lets staff browse stock, place orders that reduce quantities and create transaction history, and manage inventory by adding, editing, or deleting medicines. Navigation leads from the tab bar into the home, transaction, and inventory-management screens; context providers expose medicine and transaction state to those flows. Medicine records use SQLite, while transaction history is persisted in AsyncStorage. The README also highlights expiration dates and quantity tracking; source excerpts are limited, so only documented capabilities and visible calls are linked.
Main entry points: AddStackNavigator.js Inventory routes · MedicineContext.js Medicine state · BottomTabNavigator.js Main tabs · DeleteMedicineScreen.js Select stock to delete
Components 23
App navigation
- App providers
App.js - Main tabs
components/navigation/BottomTabNavigator.js - Inventory routes
components/navigation/AddStackNavigator.js
Inventory management
- Inventory actions
components/screens/AddScreen.js - New medicine form
components/NewMedicineForm.js - Find medicine to edit
components/EditSearch.js - Edit medicine form
components/EditMedicineForm.js - Find existing stock
components/AddExistSearch.js - Add existing stock
components/screens/AddExistingMedicineForm.js - Select stock to delete
components/screens/DeleteMedicineScreen.js - Deletion selection card
components/MedicineCardDel.js - Delete confirmation
components/DeleteModal.js - Stock and quantity card
components/MedicineCard.jsx - Medicine selection card
components/MedicineCardWithoutAmount.js
Orders and history
- Stock browser
components/screens/HomeScreen.js - Order confirmation
components/OrderModal.jsx - Transaction history
components/screens/TransactionScreen.js - Transaction display
components/TransactionCard.js
State and persistence
- Medicine state
components/contexts/MedicineContext.js - Transaction state
components/contexts/TransactionContext.js - Inventory SQLite
database/database.js - Transaction storage
Other components
- Pharmacy staff
Connections 30
- Pharmacy staff → Main tabs: uses app
components/navigation/BottomTabNavigator.js - App providers → Main tabs: renders
App.js - App providers → Medicine state: provides state
App.js - App providers → Transaction state: provides state
App.js - Main tabs → Stock browser: routes to
components/navigation/BottomTabNavigator.js - Main tabs → Transaction history: routes to
components/navigation/BottomTabNavigator.js - Main tabs → Inventory routes: routes to
components/navigation/BottomTabNavigator.js - Inventory routes → Inventory actions: routes to
components/navigation/AddStackNavigator.js - Inventory routes → Find medicine to edit: routes to
components/navigation/AddStackNavigator.js - Inventory routes → Edit medicine form: routes to
components/navigation/AddStackNavigator.js - Inventory routes → New medicine form: routes to
components/navigation/AddStackNavigator.js - Inventory routes → Find existing stock: routes to
components/navigation/AddStackNavigator.js - Inventory routes → Add existing stock: routes to
components/navigation/AddStackNavigator.js - Inventory routes → Select stock to delete: routes to
components/navigation/AddStackNavigator.js - Stock browser → Medicine state: reads stock
components/screens/HomeScreen.js - Stock browser → Stock and quantity card: renders
components/screens/HomeScreen.js - Stock browser → Order confirmation: opens order
components/screens/HomeScreen.js - Order confirmation → Medicine state: updates quantities
components/OrderModal.jsx - Order confirmation → Transaction state: records sale
components/OrderModal.jsx - Transaction history → Transaction state: reads history
components/screens/TransactionScreen.js - Transaction history → Transaction display: renders
components/screens/TransactionScreen.js - Find medicine to edit → Medicine state: reads stock
components/EditSearch.js - Find medicine to edit → Medicine selection card: renders
components/EditSearch.js - Find existing stock → Medicine state: reads stock
components/AddExistSearch.js - Find existing stock → Medicine selection card: renders
components/AddExistSearch.js - Select stock to delete → Medicine state: reads stock
components/screens/DeleteMedicineScreen.js - Select stock to delete → Deletion selection card: renders
components/screens/DeleteMedicineScreen.js - Select stock to delete → Delete confirmation: opens confirmation
components/screens/DeleteMedicineScreen.js - Medicine state → Inventory SQLite: reads and writes
components/contexts/MedicineContext.js - Transaction state → Transaction storage: loads and saves
components/contexts/TransactionContext.js