/Pharmacy_Management_System

Website which is used to manage the pharmacy shop with billing facility and manage stocks !!

Primary LanguageJavaScript

Pharmacy_Management_System

Website which is used to manage the pharmacy shop with billing facility and manage stocks !!

How To Run?

To run this website run this command on command prompt on root folder.

npm start or node app.js

It will run under the url http://127.0.0.1:3000/

Login Details

Email and Password for Website:

Admin :
Email :admin@cq.com
Password: admincq

Vendor :
Email :vendor@cq.com
Password: admincq

Shopkeeper:
Email : shopkeeper@cq.com
Password: admincq

Features

  • Dynamic Data by mongoose database
  • Different View For Shopkeeper, Admin and Vendor
  • Manage Billings
  • Manage Stocks
  • Responsive Layout
  • Mobile Friendly
  • Open Source

How to Use ?

  1. Use mongorestore command to add database to your Local Machine.
  2. Run Mongo Server
  3. Run Server File app.js
  4. Run local host on port number 8000

Pre-requisites

  • Node JS (Tested on v12.14.0)
  • Mongoose
  • Pre-requisites or Dependencies(Below)

Dependencies :

  • Mongoose
  • Express
  • Express-Session
  • PATH
  • EJS
  • Bcrypt
  • HTTP
  • Express
npm install express
  • EJS
npm install ejs
  • Express-Session
npm install express-session
  • Mongoose
npm install mongoose
  • Dotenv
npm install dotenv
  • Bcrpty
npm install bcrpty  / npm i bcrpty

Schema

User Schema

Name Type Required Unique Encrpyted
Name String Yes No No
Email String Yes Yes No
Password String Yes No Yes
DOB String Yes No No
Role String Yes No No
billDetails ObjectId No No No
userdetails ObjectId No No No

Stock Schema

Name Type
User ObjectId
MedicineType ObjectId
NoofStock Number
Price Number
isActive Boolean

ShopItem Schema

Name Type
User ObjectId
MedicineType ObjectId
NoofStock Number
Price Number
boughtFrom Boolean

PlacedOrder Schema

Name Type
CustomerName String
DoctorName String
Contact String
Address String
Items Array

Medicine Schema

Name Type
Name String

PlacedOrder Schema

Name Type
CustomerName String
DoctorName String
Contact String
Items Array
Total Number

Directory

|___ Root
|   |--- app.js
|   |
|   |--- Controller
|   |    |--- billing.js
|   |    |--- index.js
|   |    |--- medicine.js
|   |    |--- shopitem.js
|   |    |--- stock-shopitem.js
|   |    |--- user.js
|   |    |--- user-details.js
|   |
|   |
|   |--- Middlewares
|   |    |--- middleware.js
|   |
|   |--- Models
|   |    |--- billingSchema.js
|   |    |--- medSchema.js
|   |    |--- placedOrderSchema.js
|   |    |--- shopSchema.js
|   |    |--- stockSchema.js
|   |    |--- userDetailsSchema.js
|   |    |--- UserSchema.js
|   |
|   |--- Public
|   |    |--- css (Static)
|   |    |--- images (Static)
|   |    |--- script (Static)
|   |
|   |--- Routes
|   |    |--- Handlers
|   |    |    |--- admin.js
|   |    |    |--- shopkeeper.js
|   |    |    |--- user.js
|   |    |    |--- login.js
|   |    |--- index.js
|   |
|   |--- viwes
|   |    |--- partials
|   |    |    |--- sidebar.ejs
|   |    |--- addMedicine.ejs
|   |    |--- addStock.ejs
|   |    |--- billingLogs.ejs
|   |    |--- buystock.ejs
|   |    |--- changepassword.ejs
|   |    |--- dashboard.ejs
|   |    |--- login.ejs
|   |    |--- manageMedicines.ejs
|   |    |--- orderMedicines.ejs
|   |    |--- profile.ejs
|   |    |--- recentOrders.ejs
|   |    |--- shopkeeperstable.ejs
|   |    |--- stockdetails.ejs
|   |    |--- vendorstable.ejs
|   |    |--- vendorstock.ejs