This project is a Pharmacy Management System that allows customers and employees to manage pharmacy-related activities such as logging in, viewing drug details, placing orders, submitting feedback, and more. The system is built using Node.js, Express.js, and MySQL.
- Customer and Employee login
- Customer sign-up
- View drug details
- Place orders
- Submit feedback and queries
- View customer and order details
- Delete customer account
- Node.js
- MySQL
-
Clone the repository:
git clone https://github.com/NiteeshL/PharmaForge cd PharmaForge
-
Install dependencies:
npm install
-
Set up the MySQL database:
- Create a MySQL database named
pharmacy
. - Import the SQL script from
sql.txt
to create the necessary tables and insert initial data.
- Create a MySQL database named
-
Configure the database connection:
- Update the MySQL connection details in
server.js
:const connection = mysql.createConnection({ host: 'localhost', user: 'root', password: 'your-password', database: 'pharmacy' });
- Update the MySQL connection details in
-
Start the server:
node server.js
-
Access the application:
- Open a web browser and navigate to
http://localhost:3000
.
- Open a web browser and navigate to
/PharmaForge
├── public
│ ├── customer.html
│ ├── login.html
│ ├── query.html
│ ├── view.html
│ ├── styles.css
├── server.js
├── sql.txt
└── README.md
- POST /login: Handle login for both customers and employees.
- GET /getCustomerDetails: Fetch customer details.
- POST /signup: Handle customer sign-up.
- POST /deleteAccount: Delete customer account.
- GET /getOrderDetails: Fetch order details for a customer.
- POST /submitOrder: Submit a new order.
- GET /getAllOrders: Fetch all order details.
- GET /getDrugDetails: Fetch all drug details.
- POST /addDrug: Add a new drug.
- POST /removeDrug: Remove a drug.
- POST /subtractQuantity: Subtract quantity from a drug.
- POST /submitFeedback: Submit feedback.
- GET /getFeedback: Fetch all feedback.
- POST /submitQuery: Submit a query.
- GET /getQuery: Fetch all queries.
- GET /getContactDetails: Fetch contact details.
This project is licensed under the MIT License.