A comprehensive e-commerce platform for managing and selling pharmaceutical products online.
Features β’ Installation β’ Usage β’ Admin Panel β’ Tech Stack
MedNet is a modern, full-featured online pharmacy platform built with Laravel 12. It provides a complete e-commerce solution for selling medicines, supplements, and first-aid products with advanced features like prescription management, inventory tracking, promotional campaigns, and comprehensive admin analytics. Live Deployed Server Link: https://mednet-gyfn.onrender.com
- π¦ Product Catalog: Browse 200+ medical products across three categories:
- π Medicines (prescription & non-prescription)
- πΏ Supplements & Vitamins
- π₯ First Aid Supplies
- π Advanced Search: Real-time search with product name, generic name, and description matching
- π·οΈ Smart Filtering: Filter by category, manufacturer, price range, and stock status
- π° Discounts: Automatic discount calculations with updated pricing display
- ποΈ Shopping Cart:
- Add/remove products with quantity control
- Real-time cart count updates
- Prescription upload for restricted medicines
- Cart persistence across sessions
- β‘ Quick Buy: One-click purchase for frequently ordered items
- π Wishlist Management: Save favorite products for later
- π Address Management:
- Multiple saved addresses with alias names
- Inside/Outside Dhaka distinction for shipping
- Default address selection
- Easy address CRUD operations
- π³ Secure Checkout:
- Order summary with itemized pricing
- Cash on Delivery payment method
- Prescription verification for restricted products
- Order confirmation with detailed receipt
- π¦ Order Tracking:
- View order history
- Track order status (pending, processing, shipped, delivered, cancelled)
- Order details with product list
- Delivery time estimates
- π€ Profile Management: Update personal information
- π Account Security: Email verification and password management
- π Address Book: Manage multiple delivery addresses
- π Order History: Complete purchase history with reorder capability
- π¬ Support Feedback System: Submit queries and issues
- π§ Email Notifications: Order confirmations and updates
- β Help Center: FAQ and product information
- π Real-time Statistics:
- Total revenue and sales metrics
- Product inventory status
- Order volume tracking
- User registration trends
- π Visual Analytics:
- Sales charts and graphs
- Revenue by product category
- Top-selling products
- Order status distribution
- Monthly/weekly/daily trends
- β Add Products: Complete product creation with:
- Name, generic name, and description
- Dosage and manufacturer details
- Pricing with discount support
- Stock quantity and low stock threshold
- Expiry date tracking
- Category and tag assignment
- Image upload
- Side effects documentation
- Prescription requirement flag
- βοΈ Edit Products: Update all product details
- ποΈ Delete Products: Remove discontinued items
- π¦ Stock Management:
- Automatic stock status (normal/low_stock/out_of_stock)
- Bulk stock updates
- Expiry date alerts
- π Product Search: Quick product lookup in admin panel
- π Order Overview:
- List all orders with filtering
- Order status tracking
- Customer information
- Order value and items
- β
Order Processing:
- Update order status
- Mark as shipped/delivered
- Cancel orders with reason
- View order details
- π Prescription Approval:
- Review uploaded prescriptions
- Approve/reject prescription-required orders
- Prescription image viewer
- Order notes and communication
- π₯ User Administration:
- View all registered users
- User search and filtering
- Account status management
- Ban/unban users
- View user order history
- π« Email Banning: Block email addresses from registration
- π User Analytics: Registration trends and user activity
- π¨ Promotion Slider:
- Upload promotional banners
- Set display order
- Enable/disable promotions
- Add title and description
- Alt text for accessibility
- Manage up to 6 active promotions
- π― Discount Campaigns: Create product-specific discounts
- π¨ Feedback System:
- View customer support requests
- Categorize feedback (bug, feature request, general)
- Assign status (pending, in progress, resolved, closed)
- Respond to customer queries
- Priority management
- π Sales Reports: Generate revenue reports by date range
- π Inventory Reports: Stock levels and low stock alerts
- π Performance Metrics: Key business indicators
- Framework: Laravel 12.0
- PHP Version: 8.2+
- Database: SQLite (portable and included)
- Authentication: Laravel Breeze
- ORM: Eloquent
- CSS Framework: Tailwind CSS 3.0
- JavaScript: Vanilla JS with Alpine.js components
- Build Tool: Vite
- Icons: Font Awesome / Heroicons
- Code Quality: Laravel Pint (PHP CS Fixer)
- Debugging: Laravel Telescope (optional)
- API Testing: Laravel Pail
- Development Server: Laravel Sail (Docker) or Artisan serve
- PHP >= 8.2
- Composer
- Node.js >= 18.x & NPM
- SQLite extension enabled
- Git
git clone https://github.com/samixshady/MedNet.git
cd MedNetcomposer installnpm install# Copy the example environment file
cp .env.example .env
# Generate application key
php artisan key:generateThe project includes a pre-populated SQLite database with 205+ products. If you want to start fresh:
# Run migrations
php artisan migrate
# Seed the database with sample data
php artisan db:seed
# Create admin user
php artisan db:seed --class=CreateAdminSeederphp artisan storage:link# For development
npm run dev
# For production
npm run buildphp artisan serveVisit http://127.0.0.1:8000 in your browser.
- Email:
admin@admin.com - Password:
adminadmin
- Email:
duck@duck.com - Password:
password
β οΈ Important: Change these credentials in production!
- Register/Login: Create an account or log in at the homepage
- Browse Products: Navigate through Medicine, Supplements, or First Aid categories
- Search: Use the search bar to find specific products
- Add to Cart: Select products and specify quantity
- Upload Prescription: For prescription medicines, upload your prescription in cart
- Checkout: Add delivery address and complete your order
- Track Orders: View order status in your profile
- Admin Login: Access admin panel at
/admin/login - Dashboard: View analytics and quick stats
- Manage Products: Add, edit, or remove products
- Process Orders: Review and update order status
- Review Prescriptions: Approve prescription-based orders
- User Management: Monitor and manage user accounts
- Promotions: Update promotional banners
- Support: Respond to customer feedback
MedNet/
βββ app/
β βββ Http/
β β βββ Controllers/ # Application controllers
β β β βββ Admin/ # Admin panel controllers
β β β βββ Auth/ # Authentication controllers
β β β βββ ...
β β βββ Middleware/ # Custom middleware
β β βββ Requests/ # Form request validation
β βββ Models/ # Eloquent models
β β βββ User.php
β β βββ Product.php
β β βββ Order.php
β β βββ ...
β βββ Policies/ # Authorization policies
β βββ Providers/ # Service providers
βββ database/
β βββ migrations/ # Database migrations
β βββ seeders/ # Database seeders
β βββ factories/ # Model factories
β βββ database.sqlite # SQLite database
βββ public/
β βββ css/ # Compiled CSS
β βββ js/ # Compiled JavaScript
β βββ storage/ # Public storage symlink
βββ resources/
β βββ css/ # Source CSS files
β βββ js/ # Source JavaScript files
β βββ views/ # Blade templates
βββ routes/
β βββ web.php # Web routes
β βββ auth.php # Authentication routes
β βββ console.php # Console commands
βββ storage/
β βββ app/
β βββ public/ # User uploaded files
β βββ products/ # Product images
β βββ promotions/ # Promotion banners
βββ tests/ # Application tests
- β CSRF Protection: All forms protected with CSRF tokens
- β SQL Injection Prevention: Using Eloquent ORM with prepared statements
- β XSS Protection: Automatic output escaping with Blade templates
- β Password Hashing: Bcrypt hashing for user passwords
- β Email Verification: Optional email verification for new accounts
- β Admin Middleware: Role-based access control for admin routes
- β File Upload Validation: Strict validation for prescription uploads
- β Session Security: Secure session management
- β Rate Limiting: API rate limiting to prevent abuse
- users: User accounts with admin flags
- products: Product catalog with pricing, stock, and metadata
- categories: Product categorization
- orders: Customer orders with status tracking
- order_items: Individual items within orders
- carts: Shopping cart items
- quick_buys: Saved items for quick purchasing
- addresses: Customer delivery addresses
- promotions: Promotional banner management
- support_feedback: Customer support tickets
- banned_emails: Email blacklist
# Run migrations
php artisan migrate
# Seed database with products
php artisan db:seed
# Create admin user
php artisan db:seed --class=CreateAdminSeeder
# Import MySQL data to SQLite
php artisan db:seed --class=MySQLDataImportSeeder
# Assign random product images
php artisan db:seed --class=AssignRandomImagesSeeder
# Clear application cache
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear
# Run code formatter
./vendor/bin/pintKey configurations in .env:
APP_NAME=MedNet
APP_ENV=local
APP_DEBUG=true
APP_URL=http://localhost
DB_CONNECTION=sqlite
DB_DATABASE=/absolute/path/to/database.sqlite
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=nullProduct images and promotional banners are stored in:
storage/app/public/products/storage/app/public/promotions/
Accessed via the public symlink: public/storage/
MedNet is fully responsive and works seamlessly across:
- π» Desktop computers
- π± Mobile phones
- π² Tablets
- π₯οΈ Large displays
Solution: Run php artisan storage:link
Solution:
chmod -R 775 storage bootstrap/cacheSolution: Ensure .env has correct DB_DATABASE path
Solution: Run npm run build
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Samix Shady
- GitHub: @samixshady
- Project Link: https://github.com/samixshady/MedNet
- Laravel Framework
- Tailwind CSS
- Laravel Breeze for authentication scaffolding
- All open-source contributors
For support, email support@mednet.com or create an issue in the GitHub repository.
β Star this repository if you find it helpful!
Made with β€οΈ using Laravel