How karanei-kimutai/findurdrugs works
FindUrDrugs supports medicine discovery and pharmacy operations through a Node.js/TypeScript API backed by PostgreSQL, with an Android client described in the README but absent from the supplied tree. Customers search stocked medicines by location and price, then place delivery orders or pickup reservations; pharmacies manage inventory and advance those requests. Authentication and premium-entitlement checks support these flows. The graph reflects sampled backend handlers and documented database setup; Android implementation details are unavailable.
Main entry points: server.ts Express API · db.ts Database connection · authMiddleware.ts JWT and roles · authRoutes.ts Auth routes
Components 20
API and access
- Express API
backend/src/server.ts - Auth routes
backend/src/routes/authRoutes.ts - Authentication
backend/src/controllers/authController.ts - JWT and roles
backend/src/middleware/authMiddleware.ts
Medicine discovery
- Search routes
backend/src/routes/searchRoutes.ts - Medicine search
backend/src/controllers/searchController.ts
Pharmacy operations
- Inventory routes
backend/src/routes/inventoryRoutes.ts - Inventory management
backend/src/controllers/inventoryController.ts - Order routes
backend/src/routes/orderRoutes.ts - Delivery orders
backend/src/controllers/orderController.ts - Reservation routes
backend/src/routes/reservationRoutes.ts - Pickup reservations
backend/src/controllers/reservationController.ts
Persistence and benefits
- Subscription routes
backend/src/routes/subscriptionRoutes.ts - Premium status
backend/src/controllers/subscriptionController.ts - Database connection
backend/src/config/db.ts - Relational schema
database/schema/01_init.sql - PostgreSQL
Other components
- Android client
- Pharmacy user
- RevenueCat
Connections 29
- Android client → Express API: sends API requests
- Pharmacy user → Express API: sends API requests
- Express API → Auth routes: mounts routes
- Express API → Search routes: mounts routes
- Express API → Inventory routes: mounts routes
- Express API → Order routes: mounts routes
- Express API → Reservation routes: mounts routes
- Express API → Subscription routes: mounts routes
- Auth routes → JWT and roles: checks access
- Auth routes → Authentication: dispatches to
- Search routes → Medicine search: dispatches to
- Inventory routes → JWT and roles: checks access
- Inventory routes → Inventory management: dispatches to
- Order routes → JWT and roles: checks access
- Order routes → Delivery orders: dispatches to
- Reservation routes → JWT and roles: checks access
- Reservation routes → Pickup reservations: dispatches to
- Subscription routes → JWT and roles: checks access
- Subscription routes → Premium status: dispatches to
- Authentication → Database connection: queries users
- Medicine search → Database connection: queries medicines
- Inventory management → Database connection: manages stock
- Delivery orders → Database connection: queries and updates
- Delivery orders → Premium status: checks premium
- Pickup reservations → Database connection: queries and updates
- Premium status → RevenueCat: verifies entitlement
- Database connection → PostgreSQL: connects to
- Relational schema → PostgreSQL: defines tables
- Express API → Database connection: checks health