Skip to content

Kndn15/OnlinePharma-Project-Spring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’Š Online Pharmacy Portal

This project is aimed at building an Online Pharmacy System, where users can register, browse drugs, manage orders, and perform operations through a secure and interactive web portal.


πŸš€ TECHNOLOGIES USED

Frontend πŸ“«

Server Side ⚑

Development πŸ”­

Development Tools πŸ“Ί

Database πŸ“¦


πŸ› οΈ Installation & Setup Guide

βœ… Prerequisites

Make sure the following are installed:

  • Java JDK 17+
  • Node.js (v14+)
  • npm or yarn
  • MySQL Server
  • Maven
  • IDE (VS Code or Eclipse)
  • React.js (already cloned project)

πŸ”§ Backend Setup (Spring Boot + MySQL)

πŸ“‚ 1. Clone the Repository

git clone https://github.com/manilaxmisisvas/Online_Pharma_team4.git
cd onlinepharma_backend

πŸ—„οΈ Database Setup

1. Install MySQL and create a new database

CREATE DATABASE online_pharmacy;

2. Configure database connection in application.properties

spring.datasource.url=jdbc:mysql://localhost:3306/online_pharmacy
spring.datasource.username=your_username
spring.datasource.password=your_password

πŸš€ 3. Build and Run the Spring Boot App

mvn clean install
mvn spring-boot:run

Backend will run at: http://localhost:8080


🌐 Frontend Setup (React.js)

1. Navigate to Frontend Directory

cd ../Online_Pharma_team4/frontend

2. Install Dependencies

npm install

3. Start React App

npm start

Frontend will run at: http://localhost:5173


πŸ“¬ Postman Collection (API Testing)

You can test backend APIs using Postman.

πŸ›  Usage

1. Open [Postman](https://www.postman.com/downloads/)
2. Import the collection and environment files
3. Select the environment in Postman
4. Test endpoints (e.g., `/api/auth/login`, `/api/drugs`, `/api/order`)

Use Bearer Token auth after login for protected routes.


πŸ§ͺ Test the Application

1. Open `http://localhost:5173`
2. Register/Login
3. Explore:  Drug browsing & ordering, Cart handling, Admin functions

πŸ“Œ Features

πŸ” Authentication & Authorization

  • User login/logout
  • Admin approvals

πŸ’Š Drug Management (Admin)

  • Add, update, delete drugs
  • Search by ID or name

πŸ‘₯ Member Management

  • Admin:

    • View, update, disable, delete members
  • Members:

    • Edit profile (email, phone, etc.)

πŸ›’ Medicine Order

  • Add multiple drugs to cart
  • Auto-calculate total
  • Prevent order of out-of-stock items
  • Update stock on order
  • Auto-clear cart on completion

🧩 Modules

  • Login & Registration
  • Drug Management
  • User/Member Management
  • Order & Cart Handling

πŸ–ΌοΈ UI View

Register Page

Register Page

Login Page

Login Page

User Dashboard

User Dashboard

User Profile

User Profile

Admin Dashboard

Admin Dashboard

Add Product

Add Product

View Products

View Products

View Users

View Users

My Cart

My Cart

Payment (Razorpay)

Payment

User Table (Database)

User DB

Drug Table (Database)

Drug DB

Drug Order Table (Database)

Drug_Order DB


Releases

No releases published

Packages

No packages published