MedRev is a comprehensive web application designed to help users browse, search, and review medicines. It provides detailed medical information and allows a community-driven approach to sharing experiences with different medications.
- User Authentication: Secure JWT-based Login and Registration. Accessible anywhere via clean, responsive modals.
- Medicine Directory: Browse a vast list of medicines with details like strength, generic name, manufacturer, unit price, and more.
- Advanced Filtering & Search: Find medicines by searching or filtering by specific attributes (e.g., Dosage Form, Type).
- Medicine Details: View in-depth information about a medicine, including pharmacology, indications, dosage, side effects, and precautions.
- Community Reviews: Authenticated users can write, edit, and delete reviews, including a 5-star rating system for medicines.
- User Profile: A clean, minimalistic profile page for users to manage their personal information and keep track of their past reviews.
- Framework: Next.js (React)
- Styling: Tailwind CSS
- UI Components: custom components built with Base UI / Shadcn, and Lucide React for icons.
- HTTP Client: Axios
- State/Auth: React Hooks, JWT Decode, LocalStorage
- Framework: Django & Django REST Framework (DRF)
- Database: PostgreSQL
- Authentication: SimpleJWT (JSON Web Tokens)
- Utilities: Django CORS Headers, Django Filters
MedRev/
├── backend/ # Django application
│ ├── backend/ # Core settings and routing
│ ├── medicines/ # Medicine models, views, and API
│ ├── reviews/ # Review system models and API
│ ├── users/ # Custom user models and authentication
│ └── manage.py
├── frontend/ # Next.js application
│ ├── src/
│ │ ├── app/ # Pages (medicines, profile, auth routing)
│ │ ├── components/ # Reusable UI components (Navbar, Modals, Shadcn UI)
│ │ ├── hooks/ # Custom React hooks (e.g., useDebounce)
│ │ └── lib/ # Axios configuration and utilities
│ ├── public/ # Static assets
│ ├── tailwind.config.ts
│ └── package.json
└── README.md
- Node.js (v18+)
- Python 3.10+
- PostgreSQL
- Navigate to the backend directory:
cd backend - Create and activate a virtual environment:
python -m venv venv # Windows: venv\Scripts\activate # macOS/Linux: source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Set up Environment Variables:
Copy
.env.sampleto.envand update the database credentials and secret key.cp .env.sample .env
- Set up your PostgreSQL database matching the settings in
.env(Default DB Name:MedRev). - Run migrations to create the database tables:
python manage.py makemigrations python manage.py migrate
- Start the development server:
The backend will run on
python manage.py runserver
http://localhost:8000
- Open a new terminal and navigate to the frontend directory:
cd frontend - Install NPM packages:
npm install
- Set up Environment Variables:
Copy
.env.sampleto.env.localto point the frontend to your local backend.cp .env.sample .env.local
- Start the Next.js development server:
The frontend will run on
npm run dev
http://localhost:3000
- Open
http://localhost:3000in your browser. - Browse the list of medicines.
- Click Sign Up to create an account and leave a review.
- Manage your account and see your past activities on the Profile page.