Skip to content

ShadiBahaa/online-pharmacy-system

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Online Pharmacy System

This is a full-stack Online Pharmacy System designed to ease the sale of medications and includes user authentication, order processing, product management, and payment integration. It features a modular backend with a separate MongoDB container for database storage. The backend is built with Node.js and Express, while the frontend will be implemented separately.

Table of Contents

Features

  • Authentication: User login, signup, and JWT-based authorization.
  • Order Management: Ability to create, update, and view orders.
  • Product Management: CRUD operations for pharmacy products.
  • Payment Integration: Integration with payment providers.
  • Alternative Medicine: Suggesting alternatives for medicines.
  • Wishlist: Users can add products to their wishlist.
  • Cart: Add and manage products in the cart.
  • Error Handling & Validation: Includes custom error handling middleware and Joi validation for inputs.

Tech Stack

  • Backend: Node.js, Express.js
  • Database: MongoDB (via Mongoose)
  • Containerization: Docker (for backend and MongoDB)
  • Validation: Joi
  • Authorization: JWT (JSON Web Tokens)

Installation

Prerequisites

  • Docker: You need Docker installed to run the application in containers.
  • Node.js & npm (optional for local dev).

Steps to Run Locally

  1. Clone the repository:

    git clone https://github.com/MustafaShokry/online-pharmacy-system.git
    cd online-pharmacy-system
  2. Install dependencies (if not using Docker):

    npm install
  3. Start the app (local):

    npm run dev

Docker Setup

Start using Docker Compose:

docker-compose up --build

This will start the backend on http://localhost:3000 and MongoDB on port 27017.

To stop the containers:

docker-compose down

Folder Structure

.
├── src
│   ├── config        # MongoDB connection, environment config
│   ├── modules       # Feature-based modules (auth, orders, products, etc.)
│   │   └── auth
│   │       ├── auth.controller.js
│   │       ├── auth.service.js
│   │       ├── auth.routes.js
│   │       └── auth.model.js
│   ├── middleware    # Error handling, validation, etc.
│   ├── utils         # Utility functions
│   └── app.js        # Express app setup
├── index.js          # Entry point
├── Dockerfile
├── docker-compose.yml
├── .env
└── README.md

License

MIT License


About

online-pharmacy-system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 87.5%
  • SCSS 12.2%
  • Other 0.3%