How ebrahimgad123/pharm-backend works
Project Type and Purpose
• This is a backend-only REST API service (Node.js + Express + TypeScript) that manages an online pharmacy system: patients, pharmacists, administrators, orders, carts, chat messaging, prescriptions, and payments.
File Structure Analysis
• Top‐level “server” folder with typical MVC layers under src/:
• routes/ → defines HTTP endpoints
• controllers/ → request handlers & orchestration
• services/ → third‐party integrations (e.g., email)
• models/ → data schema/entities (MongoDB or SQL ORM)
• middleware/ → authentication, RBAC, error handling
• config/ → DB connection, environment config
• utils/, validation/ → helper classes, JWT token generation, input schemas
• Postman collections under server/*_postman show the client personas (patient, pharmacist, admin, chat).
README Insights
• The README is minimal, but the file structure and Postman examples indicate a layered REST API that:
• Secures endpoints via JWT
• Implements role‐based access control
• Offers CRUD operations for users, products, orders
• Supports real‐time‐style chat via HTTP endpoints