PillStack is an online pharamcy linked to PillStack's online clinic. This MERN stack project aims to eradicate the challenges associated with physical hospital visits by providing a complete digital healthcare solution.
This project serves as a learning opportunity to collaborate effectively within a team setting, specifically focusing on the development of a MERN Stack project. The primary objectives include gaining practical experience in meeting both Functional and Non-Functional Requirements, navigating diverse APIs, and cultivating a consistent coding style.
- The system currently does not allow the user to top up their wallet balance. However in the future we intend to add this feature.
- The system does not verify the user's email upon registeration.
- The system does not provide real life tracking of orders.
- The system does not have an interface for people in charge of delivery.
- For reporting bugs or offering contributions or enhancements please check our Contributions section below.
- Landing Page
- Login Page
- Patient home page
- Buy medicines
- View cart
- View orders' status
- chat with pharmacists
- Pharmacist's home page
- Pharmacist manage medicine stock
- Pharmacist add medicine
- Pharmacist view and archive medicines
- Pharmacist get a sales report
- chat with a patient
- Admin Home Page
- Admin view Users' Info
- Admin add new system admin
- Admin accept/reject pharmacists' requests to join platform
- Admin get a pharmacy sales report
- Use 4-space indentation.
- Line length should not exceed 80 characters.
- End statements with semicolons.
- Variables: camelCase
- Functions: snake_case
- Group related files into directories (e.g., /src, /tests).
- Use comments to explain complex logic or non-obvious code parts.
- Use concise and descriptive commit messages following the conventional commits specification.
MERN Stack is a popular and robust combination of technologies used for building web applications. The acronym MERN stands for MongoDB, Express.js, React, and Node.js, which are the four core technologies that make up this stack.
- Node.js: A JavaScript runtime for server-side development.
- Express.js: A web application framework for Node.js.
- MongoDB: A NoSQL database for storing application data.
- Socket.IO: A JavaScript library for enabling real-time, bidirectional communication between web clients and servers.
- React.js: A JavaScript library for building user interfaces.
- Axios: A promise-based HTTP client for making HTTP requests.
- Postman : For testing API endpoints during development.
- Guest:
As a Guest, I could:
- Register as a patient.
- Submit a request to register as a pharmacist .
- Patient:
As a Patient, I could:
- Add prescription medicines based on a recent prescription.
- Add/Update/Delete items to my cart.
- Choose to pay for an order using wallet,credit card,or cash on delivery.
- View my current and past orders.
- Cancel an order.
- Chat with a pharmacist.
- add a new delivery address.
- Reset a forgotten password through OTP sent to email.
- Pharmacist As a Pharmacist, I could:
- View available quantity and sales of each medicine.
- Add a medicine with details.
- Edit medicine details and price.
- Archive/unarchive medicines.
- Chat with a doctor from clinic.
- Reset a forgotten password through OTP sent to email.
- Admin: As a Doctor, I could:
- View total sales report.
- View available medicine.
- Archive/unarchive medicines.
- Add another administrator with specific credentials.
- Remove a pharmacist/patient/admin from the system.
- View and accept or reject a pharmacist's request to join the platform.
- Add/update/delete health packages.
- Reset a forgotten password through OTP sent to email.
Patient order cancellation function:
Cart delete item function:
Admin get all users on the platform function:
1.Clone Repository to your device https://github.com/advanced-computer-lab-2023/Pill-Stack-Pharmacy.git
2.Open 2 terminals
3.In the first terminal run the following commands:
cd backend
npm install
cd src
nodemon app.js
4.In the second terminal run the following commands:
cd frontend
npm install
cd src
npm start
Your default browser should automatically open on the web application's address.
Our APIs are divided into 6 APIs:
-
Request Body:
{username:'Rawan', name:'RawanM',email:'[email protected]',password:'mdmd123',dob: '1990-01-01',gender: 'female',mobile:'0122354554',EmergencyContact_Name:'rouu',EmergencyContact_MobileNumber:'01233334455',EmergencyContact_Relation:'Mother'}
-
Request Body:
{Username: 'Rou', password:'Mssaie1234', email:'[email protected]'}
-
Request Body:
{email:'[email protected]'}
-
Request Body:
{otp: '78548',email:'[email protected]',newPassword:'Mass1254'}
-
Request Body:
{email:'[email protected]',newPassword:'Mass1254'}
-
Request Body:
{email:'[email protected]', otp:'12458'}
-
Request Body:
{username:'Rawan', name:'RawanM',email:'[email protected]',password:'mdmd123',dob: '1990-01-01',hourly_rate: 50, affiliation:'Pharmacy Affiliation',educational_background: "Pharmacy Education Background",IDDocument:'file content here',pharmacyDegreeDocument: 'file content here',workingLicenseDocument: 'file content here'}
Monthly sales statistics regarding wallet, credit, cash, and cancelled orders
View all medicines listed
Patient's past orders
Adding a new delivery address
Patient's delivery addresses
Patient's cart
Adding items to cart
- Open
http://localhost:3001/
to view the login page in your browser.
- Register as a patient in order to be able to login into the system.
- Upon successful registeration, a redirection to the login page will occur.
- Upon successful login, a redirection to the home page will occur
- In order to start shopping, click on
Buy Medicine
- To streamline your selection process, you can filter medicines by their category using the drop-down list.
- Alternatively, you can quickly find a specific medicine by using the search bar.
- Browse and select the medicines you want to purchase. If you want to know more about a specific medicine, click on its image. For each chosen medicine, click on
ADD TO CART
. - Navigate to your shopping cart by clicking on the small cart icon at the top of the page to review your selections and proceed to checkout
- Shopping Cart and CheckOut Page
- Choose your preferred shipping method and apply discount code if you have during the checkout process.
- After selecting your shipping method, proceed to the payment step by clicking on
Checkout
. - choose your address and payment method as prompted then click on
Pay
to complete your purchase. - Upon successful payment, you will be redirected to a "Thank You" page where you can view your order details and access tracking information for your order.
- To view all the orders you've made on your account, navigate back to the home page by clicking the back button and select on
My
in the sidebar thenOrders
. You can view all your orders through this page.
- Open
http://localhost:3001/
to view the login page in your browser.
- Register as a pharmacist in order to be able to login into the system.
- Upon successful registeration, a redirection to the login page will occur.
- Upon successful login, a redirection to the home page will occur
- Through Stock Management, pharmacist can manage medicines.
- To streamline your selection process, you can filter medicines by their category using the drop-down list.
- Alternatively, you can quickly find a specific medicine by using the search bar.
7.Through Sales Report, patient can view monthly statitics regarding medicine sales.
- To add a new medicine you should fill in the following form
- to see the available medicines
- As a pharmacist you can chat with a patient
-
Open
http://localhost:3000/
to view the landing page in your browser.
-
Enter your credentials and a redirection the the admin-home page will occur.
-
Through
Medicine Control
, the admin can view the medicine on the platform and archive/unarchive any medicine. -
Through
pharmacist requests
, the admin can view all requests sumbitted and accept or reject.6.Through
Sales Report
, admin can view monthly statitics regarding medicine sales. -
Through
Users
, the admin can view all users on the system and remove any user or add new Admin.
Thank you for considering contributing to our project! We welcome contributions from everyone.
- Reporting Bugs: If you find a bug or issue, please send us an email on
[email protected]
mentioning the issue with a clear description. - Fixing Bugs: Fork the repository, create a new branch, and submit a pull request referencing the issue.
- Requesting Features: Propose new features by emailing us on
[email protected]
to discuss changes. - Implementing Features: Coordinate with developers before implementing new features.
- The Stripe is licensed under the Apache License 2.0